Changeset 1598 for trunk/server/common/oursrc
- Timestamp:
- Aug 21, 2010, 3:09:23 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/common/oursrc/accountadm/admof.c
r1597 r1598 40 40 #define STR(x) _STR(x) 41 41 42 #define OVERLORDS "system:scripts-root" 42 #define SYSADMINS "system:scripts-root" 43 #define SYSADMIN_CELL "athena.mit.edu" 43 44 44 45 static bool … … 243 244 int rights = parse_rights(nplus, &p, user); 244 245 rights &= ~parse_rights(nminus, &p, user); 245 #ifdef OVERLORDS 246 if (~rights & PRSFS_ADMINISTER && ismember(user, OVERLORDS)) { 247 openlog("admof", 0, LOG_AUTHPRIV); 248 syslog(LOG_NOTICE, "giving %s admin rights on %s", user, locker); 249 closelog(); 250 rights |= PRSFS_ADMINISTER; 246 pr_End(); 247 248 #ifdef SYSADMINS 249 if (~rights & PRSFS_ADMINISTER) { 250 strncpy(cell, SYSADMIN_CELL, MAXCELLCHARS - 1); 251 if (pr_Initialize(secLevel, (char *)AFSDIR_CLIENT_ETC_DIRPATH, cell) == 0) { 252 if (ismember(user, SYSADMINS)) { 253 openlog("admof", 0, LOG_AUTHPRIV); 254 syslog(LOG_NOTICE, "giving %s admin rights on %s", user, locker); 255 closelog(); 256 rights |= PRSFS_ADMINISTER; 257 } 258 pr_End(); 259 } 260 /* If not, that's okay -- the normal codepath ran fine, so don't error */ 251 261 } 252 262 #endif 253 254 pr_End();255 263 256 264 /* Output whether the user is an administrator. */
Note: See TracChangeset
for help on using the changeset viewer.