- if (p == NULL) fatal("No UDB entry for %s", username);
- if(uid != p->ue_uid)
- fatal("UDB etnry %s uid(%d) does not match uid %d\n",
- username, p->ue_uid, uid);
- for(j = 0; p->ue_acids[j] != -1 && j < MAXVIDS; j++) {
- accts[naccts] = p->ue_acids[j];
- naccts++;
- }
- endudb(); /* close the udb */
-
- if (naccts != 0) {
- /* Perhaps someday we'll prompt users who have multiple accounts
- to let them pick one (like CRI's login does), but for now just set
- the account to the first entry. */
- if (acctid(0, accts[0]) < 0)
- fatal("System call acctid failed, accts[0]=%d",accts[0]);
+ if (p == NULL)
+ fatal("No UDB entry for %.100s", username);
+ if (uid != p->ue_uid)
+ fatal("UDB etnry %.100s uid(%d) does not match uid %d",
+ username, p->ue_uid, uid);
+ for (j = 0; p->ue_acids[j] != -1 && j < MAXVIDS; j++) {
+ accts[naccts] = p->ue_acids[j];
+ naccts++;
+ }
+ endudb(); /* close the udb */
+
+ if (naccts != 0) {
+ /* Perhaps someday we'll prompt users who have multiple accounts
+ to let them pick one (like CRI's login does), but for now just set
+ the account to the first entry. */
+ if (acctid(0, accts[0]) < 0)
+ fatal("System call acctid failed, accts[0]=%d", accts[0]);