diff options
Diffstat (limited to 'openbsd-compat/bsd-cray.c')
-rw-r--r-- | openbsd-compat/bsd-cray.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/openbsd-compat/bsd-cray.c b/openbsd-compat/bsd-cray.c index f1bbd7dec..c02e63261 100644 --- a/openbsd-compat/bsd-cray.c +++ b/openbsd-compat/bsd-cray.c | |||
@@ -1,10 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: bsd-cray.c,v 1.17 2007/08/15 09:17:43 dtucker Exp $ | ||
3 | * | 2 | * |
4 | * bsd-cray.c | 3 | * bsd-cray.c |
5 | * | 4 | * |
6 | * Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>) | 5 | * Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>) |
7 | * Significant portions provided by | 6 | * Significant portions provided by |
8 | * Wayne Schroeder, SDSC <schroeder@sdsc.edu> | 7 | * Wayne Schroeder, SDSC <schroeder@sdsc.edu> |
9 | * William Jones, UTexas <jones@tacc.utexas.edu> | 8 | * William Jones, UTexas <jones@tacc.utexas.edu> |
10 | * | 9 | * |
@@ -268,7 +267,7 @@ cray_setup (uid_t uid, char *username, const char *command) | |||
268 | usent.uname = username; | 267 | usent.uname = username; |
269 | usent.host = hostname; | 268 | usent.host = hostname; |
270 | usent.ttyn = ttyn; | 269 | usent.ttyn = ttyn; |
271 | usent.caller = IA_SSHD; | 270 | usent.caller = IA_SSHD; |
272 | usent.pswdlist = &pwdacm; | 271 | usent.pswdlist = &pwdacm; |
273 | usent.ueptr = &ue; | 272 | usent.ueptr = &ue; |
274 | usent.flags = IA_INTERACTIVE | IA_FFLAG; | 273 | usent.flags = IA_INTERACTIVE | IA_FFLAG; |
@@ -352,7 +351,7 @@ cray_setup (uid_t uid, char *username, const char *command) | |||
352 | /* | 351 | /* |
353 | * These are failed return codes from ia_user() | 352 | * These are failed return codes from ia_user() |
354 | */ | 353 | */ |
355 | switch (ia_rcode) | 354 | switch (ia_rcode) |
356 | { | 355 | { |
357 | case IA_BADAUTH: | 356 | case IA_BADAUTH: |
358 | printf("Bad authorization, access denied.\n"); | 357 | printf("Bad authorization, access denied.\n"); |
@@ -407,7 +406,7 @@ cray_setup (uid_t uid, char *username, const char *command) | |||
407 | */ | 406 | */ |
408 | ia_failure(&fsent, &fret); | 407 | ia_failure(&fsent, &fret); |
409 | 408 | ||
410 | exit(1); | 409 | exit(1); |
411 | } | 410 | } |
412 | 411 | ||
413 | ia_mlsrcode = IA_NORMAL; | 412 | ia_mlsrcode = IA_NORMAL; |
@@ -441,7 +440,7 @@ cray_setup (uid_t uid, char *username, const char *command) | |||
441 | * There is no return because ia_failure exits. | 440 | * There is no return because ia_failure exits. |
442 | */ | 441 | */ |
443 | ia_failure(&fsent,&fret); | 442 | ia_failure(&fsent,&fret); |
444 | exit(1); | 443 | exit(1); |
445 | } | 444 | } |
446 | 445 | ||
447 | /* Provide login status information */ | 446 | /* Provide login status information */ |
@@ -526,7 +525,7 @@ cray_setup (uid_t uid, char *username, const char *command) | |||
526 | break; | 525 | break; |
527 | default: | 526 | default: |
528 | valid_acct = nam2acid(acct_name); | 527 | valid_acct = nam2acid(acct_name); |
529 | if (valid_acct == -1) | 528 | if (valid_acct == -1) |
530 | printf( | 529 | printf( |
531 | "Account id not found for" | 530 | "Account id not found for" |
532 | " account name \"%s\"\n\n", | 531 | " account name \"%s\"\n\n", |
@@ -576,9 +575,9 @@ cray_setup (uid_t uid, char *username, const char *command) | |||
576 | exit(1); | 575 | exit(1); |
577 | } | 576 | } |
578 | 577 | ||
579 | /* | 578 | /* |
580 | * Now set shares, quotas, limits, including CPU time for the | 579 | * Now set shares, quotas, limits, including CPU time for the |
581 | * (interactive) job and process, and set up permissions | 580 | * (interactive) job and process, and set up permissions |
582 | * (for chown etc), etc. | 581 | * (for chown etc), etc. |
583 | */ | 582 | */ |
584 | if (setshares(ue.ue_uid, valid_acct, printf, 0, 0)) { | 583 | if (setshares(ue.ue_uid, valid_acct, printf, 0, 0)) { |
@@ -656,7 +655,7 @@ drop_cray_privs() | |||
656 | usrv.sv_minlvl = sysv.sy_minlvl; | 655 | usrv.sv_minlvl = sysv.sy_minlvl; |
657 | usrv.sv_actlvl = sysv.sy_minlvl; | 656 | usrv.sv_actlvl = sysv.sy_minlvl; |
658 | usrv.sv_maxlvl = sysv.sy_maxlvl; | 657 | usrv.sv_maxlvl = sysv.sy_maxlvl; |
659 | } | 658 | } |
660 | usrv.sv_actcmp = 0; | 659 | usrv.sv_actcmp = 0; |
661 | usrv.sv_valcmp = sysv.sy_valcmp; | 660 | usrv.sv_valcmp = sysv.sy_valcmp; |
662 | 661 | ||