diff options
-rw-r--r-- | CREDITS | 1 | ||||
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | acconfig.h | 9 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | session.c | 26 | ||||
-rw-r--r-- | uidswap.c | 11 |
6 files changed, 52 insertions, 1 deletions
@@ -45,6 +45,7 @@ Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes | |||
45 | Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes | 45 | Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes |
46 | Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches | 46 | Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches |
47 | Matt Richards <v2matt@btv.ibm.com> - AIX patches | 47 | Matt Richards <v2matt@btv.ibm.com> - AIX patches |
48 | Michael Stone <mstone@cs.loyola.edu> - Irix enhancements | ||
48 | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch | 49 | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch |
49 | Niels Kristian Bech Jensen <nkbj@image.dk> - Assorted patches | 50 | Niels Kristian Bech Jensen <nkbj@image.dk> - Assorted patches |
50 | Peter Kocks <peter.kocks@baygate.com> - Makefile fixes | 51 | Peter Kocks <peter.kocks@baygate.com> - Makefile fixes |
@@ -1,6 +1,8 @@ | |||
1 | 20000628 | 1 | 20000628 |
2 | - (djm) Fixes to lastlog code for Irix | 2 | - (djm) Fixes to lastlog code for Irix |
3 | - (djm) Use atomicio in loginrec | 3 | - (djm) Use atomicio in loginrec |
4 | - (djm) Patch from Michael Stone <mstone@cs.loyola.edu> to add support for | ||
5 | Irix 6.x array sessions, project id's, and system audit trail id. | ||
4 | 6 | ||
5 | 20000627 | 7 | 20000627 |
6 | - (djm) Fixes to login code - not setting li->uid, cleanups | 8 | - (djm) Fixes to login code - not setting li->uid, cleanups |
diff --git a/acconfig.h b/acconfig.h index 20211a0af..0a042587f 100644 --- a/acconfig.h +++ b/acconfig.h | |||
@@ -15,6 +15,15 @@ | |||
15 | /* Define if you want to enable AIX4's authenticate function */ | 15 | /* Define if you want to enable AIX4's authenticate function */ |
16 | #undef WITH_AIXAUTHENTICATE | 16 | #undef WITH_AIXAUTHENTICATE |
17 | 17 | ||
18 | /* Define if you have/want arrays (cluster-wide session managment, not C arrays) */ | ||
19 | #undef WITH_IRIX_ARRAY | ||
20 | |||
21 | /* Define if you want IRIX project management */ | ||
22 | #undef WITH_IRIX_PROJECT | ||
23 | |||
24 | /* Define if you want IRIX audit trails */ | ||
25 | #undef WITH_IRIX_AUDIT | ||
26 | |||
18 | /* Location of random number pool */ | 27 | /* Location of random number pool */ |
19 | #undef RANDOM_POOL | 28 | #undef RANDOM_POOL |
20 | 29 | ||
diff --git a/configure.in b/configure.in index ca433e569..c1bcb3424 100644 --- a/configure.in +++ b/configure.in | |||
@@ -90,7 +90,9 @@ case "$host" in | |||
90 | CFLAGS="$CFLAGS -I/usr/local/include" | 90 | CFLAGS="$CFLAGS -I/usr/local/include" |
91 | LDFLAGS="$LDFLAGS" | 91 | LDFLAGS="$LDFLAGS" |
92 | MANTYPE='$(CATMAN)' | 92 | MANTYPE='$(CATMAN)' |
93 | AC_MSG_WARN([*** Irix 6.x is not tested, please report you experiences *** ]) | 93 | AC_DEFINE(WITH_IRIX_ARRAY) |
94 | AC_DEFINE(WITH_IRIX_PROJECT) | ||
95 | AC_DEFINE(WITH_IRIX_AUDIT) | ||
94 | no_libsocket=1 | 96 | no_libsocket=1 |
95 | no_libnsl=1 | 97 | no_libnsl=1 |
96 | ;; | 98 | ;; |
@@ -28,6 +28,10 @@ RCSID("$OpenBSD: session.c,v 1.20 2000/06/18 04:42:54 markus Exp $"); | |||
28 | #include "auth.h" | 28 | #include "auth.h" |
29 | #include "auth-options.h" | 29 | #include "auth-options.h" |
30 | 30 | ||
31 | #ifdef WITH_IRIX_PROJECT | ||
32 | #include <proj.h> | ||
33 | #endif /* WITH_IRIX_PROJECT */ | ||
34 | |||
31 | /* types */ | 35 | /* types */ |
32 | 36 | ||
33 | #define TTYSZ 64 | 37 | #define TTYSZ 64 |
@@ -799,6 +803,9 @@ do_child(const char *command, struct passwd * pw, const char *term, | |||
799 | extern char **environ; | 803 | extern char **environ; |
800 | struct stat st; | 804 | struct stat st; |
801 | char *argv[10]; | 805 | char *argv[10]; |
806 | #ifdef WITH_IRIX_PROJECT | ||
807 | prid_t projid; | ||
808 | #endif /* WITH_IRIX_PROJECT */ | ||
802 | 809 | ||
803 | /* login(1) is only called if we execute the login shell */ | 810 | /* login(1) is only called if we execute the login shell */ |
804 | if (options.use_login && command != NULL) | 811 | if (options.use_login && command != NULL) |
@@ -836,6 +843,25 @@ do_child(const char *command, struct passwd * pw, const char *term, | |||
836 | } | 843 | } |
837 | endgrent(); | 844 | endgrent(); |
838 | 845 | ||
846 | #ifdef WITH_IRIX_ARRAY | ||
847 | /* initialize array session */ | ||
848 | if (newarraysess() != 0) | ||
849 | fatal("Failed to set up new array session: %.100s", | ||
850 | strerror(errno)); | ||
851 | #endif /* WITH_IRIX_ARRAY */ | ||
852 | |||
853 | #ifdef WITH_IRIX_PROJECT | ||
854 | /* initialize irix project info */ | ||
855 | if ((projid = getdfltprojuser(pw->pw_name)) == -1) { | ||
856 | debug("Failed to get project id, using projid 0"); | ||
857 | projid = 0; | ||
858 | } | ||
859 | |||
860 | if (setprid(projid)) | ||
861 | fatal("Failed to initialize project %d for %s: %.100s", | ||
862 | (int)projid, pw->pw_name, strerror(errno)); | ||
863 | #endif /* WITH_IRIX_PROJECT */ | ||
864 | |||
839 | /* Permanently switch to the desired uid. */ | 865 | /* Permanently switch to the desired uid. */ |
840 | permanently_set_uid(pw->pw_uid); | 866 | permanently_set_uid(pw->pw_uid); |
841 | } | 867 | } |
@@ -11,6 +11,9 @@ RCSID("$OpenBSD: uidswap.c,v 1.7 2000/06/20 01:39:45 markus Exp $"); | |||
11 | 11 | ||
12 | #include "ssh.h" | 12 | #include "ssh.h" |
13 | #include "uidswap.h" | 13 | #include "uidswap.h" |
14 | #ifdef WITH_IRIX_AUDIT | ||
15 | #include <sat.h> | ||
16 | #endif /* WITH_IRIX_AUDIT */ | ||
14 | 17 | ||
15 | /* | 18 | /* |
16 | * Note: all these functions must work in all of the following cases: | 19 | * Note: all these functions must work in all of the following cases: |
@@ -83,6 +86,14 @@ restore_uid() | |||
83 | void | 86 | void |
84 | permanently_set_uid(uid_t uid) | 87 | permanently_set_uid(uid_t uid) |
85 | { | 88 | { |
89 | #ifdef WITH_IRIX_AUDIT | ||
90 | if (sysconf(_SC_AUDIT)) { | ||
91 | debug("Setting sat id to %d", (int) uid); | ||
92 | if (satsetid(uid)) | ||
93 | fatal("error setting satid: %.100s", strerror(errno)); | ||
94 | } | ||
95 | #endif /* WITH_IRIX_AUDIT */ | ||
96 | |||
86 | if (setuid(uid) < 0) | 97 | if (setuid(uid) < 0) |
87 | debug("setuid %d: %.100s", (int) uid, strerror(errno)); | 98 | debug("setuid %d: %.100s", (int) uid, strerror(errno)); |
88 | } | 99 | } |