]> andersk Git - openssh.git/blobdiff - session.c
- (djm) Patch from Michael Stone <mstone@cs.loyola.edu> to add support for
[openssh.git] / session.c
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);
                }
This page took 0.082011 seconds and 4 git commands to generate.