3 #if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)
5 #ifdef WITH_IRIX_PROJECT
7 #endif /* WITH_IRIX_PROJECT */
9 # include <sys/resource.h>
10 # include <optional_sym.h>
11 # if !defined(JLIMIT_CPU)
12 /* Simulate job limit support so we can still test for it at runtime. */
13 typedef __int64_t jid_t;
14 extern jid_t jlimit_startjob(char *, uid_t, char *);
15 # pragma optional jlimit_startjob
17 #endif /* WITH_IRIX_JOBS */
18 #ifdef WITH_IRIX_AUDIT
20 #endif /* WITH_IRIX_AUDIT */
23 irix_setusercontext(struct passwd *pw)
25 #ifdef WITH_IRIX_PROJECT
27 #endif /* WITH_IRIX_PROJECT */
31 # ifdef WITH_IRIX_ARRAY
33 # endif /* WITH_IRIX_ARRAY */
34 #endif /* WITH_IRIX_JOBS */
37 if (_MIPS_SYMBOL_PRESENT(jlimit_startjob)) {
38 jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive");
43 fatal("Failed to create job container: %.100s",
47 #endif /* WITH_IRIX_JOBS */
48 #ifdef WITH_IRIX_ARRAY
49 /* initialize array session */
50 if (jid == 0 && newarraysess() != 0)
51 fatal("Failed to set up new array session: %.100s",
53 #endif /* WITH_IRIX_ARRAY */
54 #ifdef WITH_IRIX_PROJECT
55 /* initialize irix project info */
56 if ((projid = getdfltprojuser(pw->pw_name)) == -1) {
57 debug("Failed to get project id, using projid 0");
61 fatal("Failed to initialize project %d for %s: %.100s",
62 (int)projid, pw->pw_name, strerror(errno));
63 #endif /* WITH_IRIX_PROJECT */
64 #ifdef WITH_IRIX_AUDIT
65 if (sysconf(_SC_AUDIT)) {
66 debug("Setting sat id to %d", (int) pw->pw_uid);
67 if (satsetid(pw->pw_uid))
68 debug("error setting satid: %.100s", strerror(errno));
70 #endif /* WITH_IRIX_AUDIT */
74 #endif /* defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) */