projects
/
sudo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a74cdaf
)
added -u username support
author
Todd C. Miller
<Todd.Miller@courtesan.com>
Mon, 8 Jul 1996 00:33:07 +0000
(
00:33
+0000)
committer
Todd C. Miller
<Todd.Miller@courtesan.com>
Mon, 8 Jul 1996 00:33:07 +0000
(
00:33
+0000)
testsudoers.c
patch
|
blob
|
history
diff --git
a/testsudoers.c
b/testsudoers.c
index 0a5c786584bd1938e7df651e4047701de3944bd2..a1a562e0447f22d4c409ffcde2ae2ab38639eda8 100644
(file)
--- a/
testsudoers.c
+++ b/
testsudoers.c
@@
-253,8
+253,10
@@
main(argc, argv)
yydebug = 1;
#endif
- if (argc != 4) {
- (void) fprintf(stderr, "usage: %s <command> <user> <host>\n", argv[0]);
+ if (argc == 6 && strcmp(argv[1], "-u") == 0) {
+ runas_user = argv[2];
+ } else if (argc != 4) {
+ (void) fprintf(stderr, "usage: %s [-u user] <command> <user> <host>\n", argv[0]);
exit(1);
}