Check return value of open
Check return value of open

We should terminate because if these open() calls fail we are not
able to recover from chroot() later.

Addressing:

8. openscap-1.3.2/src/OVAL/probes/probe/worker.c:995: negative_return_fn: Function "open(".", 0)" returns a negative number. [Note: The source code implementation of the function has been overridden by a user model.]
9. openscap-1.3.2/src/OVAL/probes/probe/worker.c:995: assign: Assigning: "probe->real_cwd_fd" = "open(".", 0)".
19. openscap-1.3.2/src/OVAL/probes/probe/worker.c:1170: negative_returns: "probe->real_cwd_fd" is passed to a parameter that cannot be negative.
  1168|   			return NULL;
  1169|   		}
  1170|-> 		if (fchdir(probe->real_cwd_fd) != 0) {
  1171|   			dE("fchdir failed: %s", strerror(errno));
  1172|   			close(probe->real_cwd_fd);

8. openscap-1.3.2/src/OVAL/probes/probe/worker.c:995: negative_return_fn: Function "open(".", 0)" returns a negative number. [Note: The source code implementation of the function has been overridden by a user model.]
9. openscap-1.3.2/src/OVAL/probes/probe/worker.c:995: assign: Assigning: "probe->real_cwd_fd" = "open(".", 0)".
19. openscap-1.3.2/src/OVAL/probes/probe/worker.c:1165: negative_returns: "probe->real_cwd_fd" is passed to a parameter that cannot be negative.
  1163|   		if (chroot(".") == -1) {
  1164|   			dE("chroot(\".\") failed: %s", strerror(errno));
  1165|-> 			close(probe->real_cwd_fd);
  1166|   			probe->real_cwd_fd = -1;
  1167|   			SEXP_free(probe_out);

OpenSCAP/openscap,OpenSCAP/openscap,OpenSCAP/openscap,OpenSCAP/openscap,OpenSCAP/openscap,OpenSCAP/openscap