PERFORCE change 43057 for review
Andrew Reisse
areisse at FreeBSD.org
Wed Nov 26 15:00:25 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=43057
Change 43057 by areisse at areisse_ibook on 2003/11/26 06:59:57
newrole reports errors
Affected files ...
.. //depot/projects/trustedbsd/sedarwin/sebsd_cmds/newrole/sebsd_newrole.c#3 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin/sebsd_cmds/newrole/sebsd_newrole.c#3 (text+ko) ====
@@ -209,6 +209,7 @@
}
free(labeltext);
+ int error;
if (argc == 0) {
char *shell_argv[2];
@@ -216,12 +217,14 @@
shell_argv[1] = NULL;
printf("Executing default shell (%s) with context %s\n",
pw->pw_shell, new_context);
- mac_execve(pw->pw_shell, shell_argv, environ, execlabel);
+ error = mac_execve(pw->pw_shell, shell_argv, environ, execlabel);
} else {
printf("Executing program (%s) with context %s\n",
argv[0], new_context);
- mac_execve(argv[0], argv, environ, execlabel);
+ error = mac_execve(argv[0], argv, environ, execlabel);
}
+ if (error)
+ perror ("exec");
}
void
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list