- Timestamp:
- Nov 8, 2009, 5:23:09 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/common/oursrc/accountadm/admof.c
r907 r1347 8 8 * Outputs "yes" and exits with status 33 if the given principal is an 9 9 * administrator of the locker. 10 * 11 * Requires tokens (to authenticate/encrypt the connection to the 12 * ptserver) unless -noauth is given. 10 13 */ 11 14 … … 78 81 { 79 82 /* Get arguments. */ 80 if (argc != 3) 81 die("Usage: %s LOCKER PRINCIPAL\n", argv[0]); 82 const char *locker = argv[1], *name = argv[2]; 83 const char *locker, *name; 84 afs_int32 secLevel; 85 86 if (argc == 3) { 87 locker = argv[1]; 88 name = argv[2]; 89 secLevel = 3; 90 } else if (argc == 4 && strcmp("-noauth", argv[1]) == 0) { 91 locker = argv[2]; 92 name = argv[3]; 93 secLevel = 0; 94 } else { 95 die("Usage: %s [-noauth] LOCKER PRINCIPAL\n", argv[0]); 96 } 83 97 84 98 /* Convert the locker into a directory. */ … … 141 155 die("internal error: pioctl: %m\n"); 142 156 143 if (pr_Initialize( 3, (char *)AFSDIR_CLIENT_ETC_DIRPATH, cell) != 0)157 if (pr_Initialize(secLevel, (char *)AFSDIR_CLIENT_ETC_DIRPATH, cell) != 0) 144 158 die("internal error: pr_Initialize failed\n"); 145 159
Note: See TracChangeset
for help on using the changeset viewer.