]> andersk Git - openssh.git/commitdiff
- (djm) Patch from Michael Stone <mstone@cs.loyola.edu> to add support for
authordjm <djm>
Tue, 27 Jun 2000 22:22:29 +0000 (22:22 +0000)
committerdjm <djm>
Tue, 27 Jun 2000 22:22:29 +0000 (22:22 +0000)
   Irix 6.x array sessions, project id's, and system audit trail id.

CREDITS
ChangeLog
acconfig.h
configure.in
session.c
uidswap.c

diff --git a/CREDITS b/CREDITS
index c472261a3c75af02f95b1be4b948477fd8242fad..1774e27604ed572605e5127aec34b975265b073e 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -45,6 +45,7 @@ Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes
 Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes
 Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches
 Matt Richards <v2matt@btv.ibm.com> - AIX patches
+Michael Stone <mstone@cs.loyola.edu> - Irix enhancements
 Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch
 Niels Kristian Bech Jensen <nkbj@image.dk> - Assorted patches
 Peter Kocks <peter.kocks@baygate.com> - Makefile fixes
index a14a64349c93ea2a66dcc7351c3d61c7eae15143..8fcf1d5611bbf68f974b4586ecc952833f6c11f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 20000628
  - (djm) Fixes to lastlog code for Irix
  - (djm) Use atomicio in loginrec
+ - (djm) Patch from Michael Stone <mstone@cs.loyola.edu> to add support for
+   Irix 6.x array sessions, project id's, and system audit trail id.
 
 20000627
  - (djm) Fixes to login code - not setting li->uid, cleanups
index 20211a0afa3d8cc11d7ee35945aad997f36b4071..0a042587fb83155f6d2ab8609147e2c401f1ce5e 100644 (file)
 /* Define if you want to enable AIX4's authenticate function */
 #undef WITH_AIXAUTHENTICATE
 
+/* Define if you have/want arrays (cluster-wide session managment, not C arrays) */
+#undef WITH_IRIX_ARRAY
+
+/* Define if you want IRIX project management */
+#undef WITH_IRIX_PROJECT
+
+/* Define if you want IRIX audit trails */
+#undef WITH_IRIX_AUDIT
+
 /* Location of random number pool  */
 #undef RANDOM_POOL
 
index ca433e569ff0193de46c2e8aafb0c8f6ad374fcb..c1bcb34241aceb65484fa70e864939757394b157 100644 (file)
@@ -90,7 +90,9 @@ case "$host" in
        CFLAGS="$CFLAGS -I/usr/local/include"
        LDFLAGS="$LDFLAGS"
        MANTYPE='$(CATMAN)'
-       AC_MSG_WARN([*** Irix 6.x is not tested, please report you experiences *** ])
+       AC_DEFINE(WITH_IRIX_ARRAY)
+       AC_DEFINE(WITH_IRIX_PROJECT)
+       AC_DEFINE(WITH_IRIX_AUDIT)
        no_libsocket=1
        no_libnsl=1
        ;;
index 8928108476617192a7673f68e5460fca7ddf30d4..1e22f477fd2a43bb92063905535fb05ed1dd23b6 100644 (file)
--- a/session.c
+++ b/session.c
@@ -28,6 +28,10 @@ RCSID("$OpenBSD: session.c,v 1.20 2000/06/18 04:42:54 markus Exp $");
 #include "auth.h"
 #include "auth-options.h"
 
+#ifdef WITH_IRIX_PROJECT
+#include <proj.h>
+#endif /* WITH_IRIX_PROJECT */
+
 /* types */
 
 #define TTYSZ 64
@@ -799,6 +803,9 @@ do_child(const char *command, struct passwd * pw, const char *term,
        extern char **environ;
        struct stat st;
        char *argv[10];
+#ifdef WITH_IRIX_PROJECT
+       prid_t projid;
+#endif /* WITH_IRIX_PROJECT */
 
        /* login(1) is only called if we execute the login shell */
        if (options.use_login && command != NULL)
@@ -836,6 +843,25 @@ do_child(const char *command, struct passwd * pw, const char *term,
                        }
                        endgrent();
 
+#ifdef WITH_IRIX_ARRAY
+                       /* initialize array session */
+                       if (newarraysess() != 0)
+                               fatal("Failed to set up new array session: %.100s",
+                                     strerror(errno));
+#endif /* WITH_IRIX_ARRAY */
+
+#ifdef WITH_IRIX_PROJECT
+                       /* initialize irix project info */
+                       if ((projid = getdfltprojuser(pw->pw_name)) == -1) {
+                         debug("Failed to get project id, using projid 0");
+                         projid = 0;
+                       }
+                       
+                       if (setprid(projid))
+                         fatal("Failed to initialize project %d for %s: %.100s",
+                               (int)projid, pw->pw_name, strerror(errno));
+#endif /* WITH_IRIX_PROJECT */
+
                        /* Permanently switch to the desired uid. */
                        permanently_set_uid(pw->pw_uid);
                }
index 4213d34ecbfa85eb2968a8d14fec36442ad90b8a..3fd0eefee8ccc2000755d8dc2c3f806f3d05cde1 100644 (file)
--- a/uidswap.c
+++ b/uidswap.c
@@ -11,6 +11,9 @@ RCSID("$OpenBSD: uidswap.c,v 1.7 2000/06/20 01:39:45 markus Exp $");
 
 #include "ssh.h"
 #include "uidswap.h"
+#ifdef WITH_IRIX_AUDIT
+#include <sat.h>
+#endif /* WITH_IRIX_AUDIT */
 
 /*
  * Note: all these functions must work in all of the following cases:
@@ -83,6 +86,14 @@ restore_uid()
 void
 permanently_set_uid(uid_t uid)
 {
+#ifdef WITH_IRIX_AUDIT
+       if (sysconf(_SC_AUDIT)) {
+               debug("Setting sat id to %d", (int) uid);
+               if (satsetid(uid))
+                       fatal("error setting satid: %.100s", strerror(errno));
+       }
+#endif /* WITH_IRIX_AUDIT */
+
        if (setuid(uid) < 0)
                debug("setuid %d: %.100s", (int) uid, strerror(errno));
 }
This page took 0.130474 seconds and 5 git commands to generate.