diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2000-11-12 00:04:24 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2000-11-12 00:04:24 +0000 |
commit | 980754ce49de5fe7b8a61fceb5c31c29beeea1d3 (patch) | |
tree | 51f0101d30396cf905591f37d985d60764777ac0 /session.c | |
parent | afeaca953772e7141842a8bf057a329bef789b89 (diff) |
20001112
- (bal) SCO Patch to add needed libraries for configure.in. Patch by
Phillips Porch <root@theporch.com>
- (bal) IRIX patch to adding Job Limits. Patch by Denis Parker <dcp@sgi.com>
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 27 |
1 files changed, 24 insertions, 3 deletions
@@ -55,6 +55,9 @@ RCSID("$OpenBSD: session.c,v 1.42 2000/10/27 07:32:18 markus Exp $"); | |||
55 | #ifdef WITH_IRIX_PROJECT | 55 | #ifdef WITH_IRIX_PROJECT |
56 | #include <proj.h> | 56 | #include <proj.h> |
57 | #endif /* WITH_IRIX_PROJECT */ | 57 | #endif /* WITH_IRIX_PROJECT */ |
58 | #ifdef WITH_IRIX_JOBS | ||
59 | #include <sys/resource.h> | ||
60 | #endif | ||
58 | 61 | ||
59 | #if defined(HAVE_USERSEC_H) | 62 | #if defined(HAVE_USERSEC_H) |
60 | #include <usersec.h> | 63 | #include <usersec.h> |
@@ -1014,6 +1017,14 @@ do_child(const char *command, struct passwd * pw, const char *term, | |||
1014 | #ifdef WITH_IRIX_PROJECT | 1017 | #ifdef WITH_IRIX_PROJECT |
1015 | prid_t projid; | 1018 | prid_t projid; |
1016 | #endif /* WITH_IRIX_PROJECT */ | 1019 | #endif /* WITH_IRIX_PROJECT */ |
1020 | #ifdef WITH_IRIX_JOBS | ||
1021 | jid_t jid = 0; | ||
1022 | #else | ||
1023 | #ifdef WITH_IRIX_ARRAY | ||
1024 | int jid = 0; | ||
1025 | #endif /* WITH_IRIX_ARRAY */ | ||
1026 | #endif /* WITH_IRIX_JOBS */ | ||
1027 | |||
1017 | 1028 | ||
1018 | /* login(1) is only called if we execute the login shell */ | 1029 | /* login(1) is only called if we execute the login shell */ |
1019 | if (options.use_login && command != NULL) | 1030 | if (options.use_login && command != NULL) |
@@ -1086,11 +1097,21 @@ do_child(const char *command, struct passwd * pw, const char *term, | |||
1086 | exit(1); | 1097 | exit(1); |
1087 | } | 1098 | } |
1088 | endgrent(); | 1099 | endgrent(); |
1100 | # ifdef WITH_IRIX_JOBS | ||
1101 | jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive"); | ||
1102 | if (jid == -1) { | ||
1103 | fatal("Failed to create job container: %.100s", | ||
1104 | strerror(errno)); | ||
1105 | } | ||
1106 | # endif /* WITH_IRIX_JOBS */ | ||
1107 | |||
1089 | # ifdef WITH_IRIX_ARRAY | 1108 | # ifdef WITH_IRIX_ARRAY |
1090 | /* initialize array session */ | 1109 | /* initialize array session */ |
1091 | if (newarraysess() != 0) | 1110 | if (jid == 0) { |
1092 | fatal("Failed to set up new array session: %.100s", | 1111 | if (newarraysess() != 0) |
1093 | strerror(errno)); | 1112 | fatal("Failed to set up new array session: %.100s", |
1113 | strerror(errno)); | ||
1114 | } | ||
1094 | # endif /* WITH_IRIX_ARRAY */ | 1115 | # endif /* WITH_IRIX_ARRAY */ |
1095 | # ifdef WITH_IRIX_PROJECT | 1116 | # ifdef WITH_IRIX_PROJECT |
1096 | /* initialize irix project info */ | 1117 | /* initialize irix project info */ |