diff options
-rw-r--r-- | CREDITS | 3 | ||||
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | openbsd-compat/bsd-cray.c | 109 | ||||
-rw-r--r-- | openbsd-compat/bsd-cray.h | 3 |
5 files changed, 90 insertions, 43 deletions
@@ -88,11 +88,12 @@ Tom Bertelson's <tbert@abac.com> - AIX auth fixes | |||
88 | Tor-Ake Fransson <torake@hotmail.com> - AIX support | 88 | Tor-Ake Fransson <torake@hotmail.com> - AIX support |
89 | Tudor Bosman <tudorb@jm.nu> - MD5 password support | 89 | Tudor Bosman <tudorb@jm.nu> - MD5 password support |
90 | Udo Schweigert <ust@cert.siemens.de> - ReliantUNIX support | 90 | Udo Schweigert <ust@cert.siemens.de> - ReliantUNIX support |
91 | Wendy Palm <wendyp at cray.com> - Cray fixes. | ||
91 | Zack Weinberg <zack@wolery.cumb.org> - GNOME askpass enhancement | 92 | Zack Weinberg <zack@wolery.cumb.org> - GNOME askpass enhancement |
92 | 93 | ||
93 | Apologies to anyone I have missed. | 94 | Apologies to anyone I have missed. |
94 | 95 | ||
95 | Damien Miller <djm@mindrot.org> | 96 | Damien Miller <djm@mindrot.org> |
96 | 97 | ||
97 | $Id: CREDITS,v 1.75 2003/11/21 12:48:55 djm Exp $ | 98 | $Id: CREDITS,v 1.76 2004/01/30 03:34:21 dtucker Exp $ |
98 | 99 | ||
@@ -11,6 +11,8 @@ | |||
11 | [sftp-batch.sh] | 11 | [sftp-batch.sh] |
12 | - (dtucker) [configure.ac] Add --without-zlib-version-check. Feedback from | 12 | - (dtucker) [configure.ac] Add --without-zlib-version-check. Feedback from |
13 | tim@, ok several | 13 | tim@, ok several |
14 | - (dtucker) [configure.ac openbsd-compat/bsd-cray.c openbsd-compat/bsd-cray.h] | ||
15 | Bug #775: Cray fixes from wendy at cray.com | ||
14 | 16 | ||
15 | 20040128 | 17 | 20040128 |
16 | - (dtucker) [regress/README.regress] Add tcpwrappers issue, noted by tim@ | 18 | - (dtucker) [regress/README.regress] Add tcpwrappers issue, noted by tim@ |
@@ -1780,4 +1782,4 @@ | |||
1780 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. | 1782 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. |
1781 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au | 1783 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au |
1782 | 1784 | ||
1783 | $Id: ChangeLog,v 1.3203 2004/01/30 03:20:59 dtucker Exp $ | 1785 | $Id: ChangeLog,v 1.3204 2004/01/30 03:34:21 dtucker Exp $ |
diff --git a/configure.ac b/configure.ac index c037ee7c8..97ef89a16 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.190 2004/01/30 03:20:59 dtucker Exp $ | 1 | # $Id: configure.ac,v 1.191 2004/01/30 03:34:22 dtucker Exp $ |
2 | 2 | ||
3 | AC_INIT | 3 | AC_INIT |
4 | AC_CONFIG_SRCDIR([ssh.c]) | 4 | AC_CONFIG_SRCDIR([ssh.c]) |
@@ -360,6 +360,10 @@ mips-sony-bsd|mips-sony-newsos4) | |||
360 | MANTYPE=man | 360 | MANTYPE=man |
361 | ;; | 361 | ;; |
362 | *-*-unicosmk*) | 362 | *-*-unicosmk*) |
363 | AC_DEFINE(NO_SSH_LASTLOG) | ||
364 | AC_DEFINE(SETEUID_BREAKS_SETUID) | ||
365 | AC_DEFINE(BROKEN_SETREUID) | ||
366 | AC_DEFINE(BROKEN_SETREGID) | ||
363 | AC_DEFINE(USE_PIPES) | 367 | AC_DEFINE(USE_PIPES) |
364 | AC_DEFINE(DISABLE_FD_PASSING) | 368 | AC_DEFINE(DISABLE_FD_PASSING) |
365 | LDFLAGS="$LDFLAGS" | 369 | LDFLAGS="$LDFLAGS" |
@@ -367,14 +371,20 @@ mips-sony-bsd|mips-sony-newsos4) | |||
367 | MANTYPE=cat | 371 | MANTYPE=cat |
368 | ;; | 372 | ;; |
369 | *-*-unicosmp*) | 373 | *-*-unicosmp*) |
374 | AC_DEFINE(SETEUID_BREAKS_SETUID) | ||
375 | AC_DEFINE(BROKEN_SETREUID) | ||
376 | AC_DEFINE(BROKEN_SETREGID) | ||
370 | AC_DEFINE(WITH_ABBREV_NO_TTY) | 377 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
371 | AC_DEFINE(USE_PIPES) | 378 | AC_DEFINE(USE_PIPES) |
372 | AC_DEFINE(DISABLE_FD_PASSING) | 379 | AC_DEFINE(DISABLE_FD_PASSING) |
373 | LDFLAGS="$LDFLAGS" | 380 | LDFLAGS="$LDFLAGS" |
374 | LIBS="$LIBS -lgen -lacid" | 381 | LIBS="$LIBS -lgen -lacid -ldb" |
375 | MANTYPE=cat | 382 | MANTYPE=cat |
376 | ;; | 383 | ;; |
377 | *-*-unicos*) | 384 | *-*-unicos*) |
385 | AC_DEFINE(SETEUID_BREAKS_SETUID) | ||
386 | AC_DEFINE(BROKEN_SETREUID) | ||
387 | AC_DEFINE(BROKEN_SETREGID) | ||
378 | AC_DEFINE(USE_PIPES) | 388 | AC_DEFINE(USE_PIPES) |
379 | AC_DEFINE(DISABLE_FD_PASSING) | 389 | AC_DEFINE(DISABLE_FD_PASSING) |
380 | AC_DEFINE(NO_SSH_LASTLOG) | 390 | AC_DEFINE(NO_SSH_LASTLOG) |
diff --git a/openbsd-compat/bsd-cray.c b/openbsd-compat/bsd-cray.c index f2ac428cc..f630366be 100644 --- a/openbsd-compat/bsd-cray.c +++ b/openbsd-compat/bsd-cray.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: bsd-cray.c,v 1.12 2003/06/03 02:45:27 dtucker Exp $ | 2 | * $Id: bsd-cray.c,v 1.13 2004/01/30 03:34:22 dtucker Exp $ |
3 | * | 3 | * |
4 | * bsd-cray.c | 4 | * bsd-cray.c |
5 | * | 5 | * |
@@ -59,6 +59,28 @@ | |||
59 | #include <ia.h> | 59 | #include <ia.h> |
60 | #include <urm.h> | 60 | #include <urm.h> |
61 | #include "ssh.h" | 61 | #include "ssh.h" |
62 | |||
63 | #include "includes.h" | ||
64 | #include "sys/types.h" | ||
65 | |||
66 | #ifndef HAVE_STRUCT_SOCKADDR_STORAGE | ||
67 | # define _SS_MAXSIZE 128 /* Implementation specific max size */ | ||
68 | # define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr)) | ||
69 | |||
70 | # define ss_family ss_sa.sa_family | ||
71 | #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */ | ||
72 | |||
73 | #ifndef IN6_IS_ADDR_LOOPBACK | ||
74 | # define IN6_IS_ADDR_LOOPBACK(a) \ | ||
75 | (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \ | ||
76 | ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1)) | ||
77 | #endif /* !IN6_IS_ADDR_LOOPBACK */ | ||
78 | |||
79 | #ifndef AF_INET6 | ||
80 | /* Define it to something that should never appear */ | ||
81 | #define AF_INET6 AF_MAX | ||
82 | #endif | ||
83 | |||
62 | #include "log.h" | 84 | #include "log.h" |
63 | #include "servconf.h" | 85 | #include "servconf.h" |
64 | #include "bsd-cray.h" | 86 | #include "bsd-cray.h" |
@@ -182,7 +204,7 @@ cray_setup (uid_t uid, char *username, const char *command) | |||
182 | /* passwd stuff for ia_user */ | 204 | /* passwd stuff for ia_user */ |
183 | passwd_t pwdacm, pwddialup, pwdudb, pwdwal, pwddce; | 205 | passwd_t pwdacm, pwddialup, pwdudb, pwdwal, pwddce; |
184 | ia_user_ret_t uret; /* stuff returned from ia_user */ | 206 | ia_user_ret_t uret; /* stuff returned from ia_user */ |
185 | ia_user_t usent /* ia_user main structure */ | 207 | ia_user_t usent; /* ia_user main structure */ |
186 | int ia_rcode; /* ia_user return code */ | 208 | int ia_rcode; /* ia_user return code */ |
187 | ia_failure_t fsent; /* ia_failure structure */ | 209 | ia_failure_t fsent; /* ia_failure structure */ |
188 | ia_failure_ret_t fret; /* ia_failure return stuff */ | 210 | ia_failure_ret_t fret; /* ia_failure return stuff */ |
@@ -501,54 +523,54 @@ cray_setup (uid_t uid, char *username, const char *command) | |||
501 | break; | 523 | break; |
502 | default: | 524 | default: |
503 | valid_acct = nam2acid(acct_name); | 525 | valid_acct = nam2acid(acct_name); |
504 | if (valid_acct == -1) { | 526 | if (valid_acct == -1) |
505 | printf( | 527 | printf( |
506 | "Account id not found for" | 528 | "Account id not found for" |
507 | " account name \"%s\"\n\n", | 529 | " account name \"%s\"\n\n", |
508 | acct_name); | 530 | acct_name); |
509 | break; | 531 | break; |
510 | } | ||
511 | /* | ||
512 | * If an account was given, search the user's | ||
513 | * acids array to verify they can use this account. | ||
514 | */ | ||
515 | if ((valid_acct != -1) && | ||
516 | !(ue.ue_permbits & PERMBITS_ACCTID)) { | ||
517 | for (i = 0; i < MAXVIDS; i++) { | ||
518 | if (ue.ue_acids[i] == -1) | ||
519 | break; | ||
520 | if (valid_acct == ue.ue_acids[i]) | ||
521 | break; | ||
522 | } | ||
523 | if (i == MAXVIDS || | ||
524 | ue.ue_acids[i] == -1) { | ||
525 | fprintf(stderr, "Cannot set" | ||
526 | " account name to " | ||
527 | "\"%s\", permission " | ||
528 | "denied\n\n", acct_name); | ||
529 | valid_acct = -1; | ||
530 | } | ||
531 | } | ||
532 | } | 532 | } |
533 | } else { | ||
534 | /* | 533 | /* |
535 | * The client isn't connected to a terminal and can't | 534 | * If an account was given, search the user's |
536 | * respond to an acid prompt. Use default acid. | 535 | * acids array to verify they can use this account. |
537 | */ | 536 | */ |
538 | debug("cray_setup: ttyname false case, %.100s", | 537 | if ((valid_acct != -1) && |
539 | ttyname); | 538 | !(ue.ue_permbits & PERMBITS_ACCTID)) { |
540 | valid_acct = ue.ue_acids[0]; | 539 | for (i = 0; i < MAXVIDS; i++) { |
540 | if (ue.ue_acids[i] == -1) | ||
541 | break; | ||
542 | if (valid_acct == ue.ue_acids[i]) | ||
543 | break; | ||
544 | } | ||
545 | if (i == MAXVIDS || | ||
546 | ue.ue_acids[i] == -1) { | ||
547 | fprintf(stderr, "Cannot set" | ||
548 | " account name to " | ||
549 | "\"%s\", permission " | ||
550 | "denied\n\n", acct_name); | ||
551 | valid_acct = -1; | ||
552 | } | ||
553 | } | ||
541 | } | 554 | } |
542 | } else { | 555 | } else { |
543 | /* | 556 | /* |
544 | * The user doesn't have the askacid permbit set or | 557 | * The client isn't connected to a terminal and can't |
545 | * only has one valid account to use. | 558 | * respond to an acid prompt. Use default acid. |
546 | */ | 559 | */ |
560 | debug("cray_setup: ttyname false case, %.100s", | ||
561 | ttyname); | ||
547 | valid_acct = ue.ue_acids[0]; | 562 | valid_acct = ue.ue_acids[0]; |
548 | } | 563 | } |
549 | if (acctid(0, valid_acct) < 0) { | 564 | } else { |
550 | printf ("Bad account id: %d\n", valid_acct); | 565 | /* |
551 | exit(1); | 566 | * The user doesn't have the askacid permbit set or |
567 | * only has one valid account to use. | ||
568 | */ | ||
569 | valid_acct = ue.ue_acids[0]; | ||
570 | } | ||
571 | if (acctid(0, valid_acct) < 0) { | ||
572 | printf ("Bad account id: %d\n", valid_acct); | ||
573 | exit(1); | ||
552 | } | 574 | } |
553 | 575 | ||
554 | /* | 576 | /* |
@@ -778,4 +800,17 @@ cray_set_tmpdir(struct utmp *ut) | |||
778 | ut->ut_jid = jid; | 800 | ut->ut_jid = jid; |
779 | strncpy(ut->ut_tpath, cray_tmpdir, TPATHSIZ); | 801 | strncpy(ut->ut_tpath, cray_tmpdir, TPATHSIZ); |
780 | } | 802 | } |
781 | #endif | 803 | #endif /* UNICOS */ |
804 | |||
805 | #ifdef _UNICOSMP | ||
806 | #include <pwd.h> | ||
807 | /* | ||
808 | * Set job id and create tmpdir directory. | ||
809 | */ | ||
810 | void | ||
811 | cray_init_job(struct passwd *pw) | ||
812 | { | ||
813 | initrm_silent(pw->pw_uid); | ||
814 | return; | ||
815 | } | ||
816 | #endif /* _UNICOSMP */ | ||
diff --git a/openbsd-compat/bsd-cray.h b/openbsd-compat/bsd-cray.h index a121ea152..de6ba1a8d 100644 --- a/openbsd-compat/bsd-cray.h +++ b/openbsd-compat/bsd-cray.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bsd-cray.h,v 1.10 2003/08/29 16:59:52 mouring Exp $ */ | 1 | /* $Id: bsd-cray.h,v 1.11 2004/01/30 03:34:22 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>) | 4 | * Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>) |
@@ -53,7 +53,6 @@ extern char cray_tmpdir[]; | |||
53 | # define MAXHOSTNAMELEN 64 | 53 | # define MAXHOSTNAMELEN 64 |
54 | #endif | 54 | #endif |
55 | #ifndef _CRAYT3E | 55 | #ifndef _CRAYT3E |
56 | # include <sys/ttold.h> | ||
57 | # define TIOCGPGRP (tIOC|20) | 56 | # define TIOCGPGRP (tIOC|20) |
58 | #endif | 57 | #endif |
59 | 58 | ||