summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/port-irix.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/openbsd-compat/port-irix.c b/openbsd-compat/port-irix.c
index bd03366f5..a63ec429a 100644
--- a/openbsd-compat/port-irix.c
+++ b/openbsd-compat/port-irix.c
@@ -3,20 +3,13 @@
3#if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) 3#if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)
4 4
5#ifdef WITH_IRIX_PROJECT 5#ifdef WITH_IRIX_PROJECT
6# include <proj.h> 6#include <proj.h>
7#endif /* WITH_IRIX_PROJECT */ 7#endif /* WITH_IRIX_PROJECT */
8#ifdef WITH_IRIX_JOBS 8#ifdef WITH_IRIX_JOBS
9# include <sys/resource.h> 9#include <sys/resource.h>
10# include <optional_sym.h> 10#endif
11# if !defined(JLIMIT_CPU)
12/* Simulate job limit support so we can still test for it at runtime. */
13typedef __int64_t jid_t;
14extern jid_t jlimit_startjob(char *, uid_t, char *);
15# pragma optional jlimit_startjob
16# endif
17#endif /* WITH_IRIX_JOBS */
18#ifdef WITH_IRIX_AUDIT 11#ifdef WITH_IRIX_AUDIT
19# include <sat.h> 12#include <sat.h>
20#endif /* WITH_IRIX_AUDIT */ 13#endif /* WITH_IRIX_AUDIT */
21 14
22void 15void
@@ -34,16 +27,10 @@ irix_setusercontext(struct passwd *pw)
34#endif /* WITH_IRIX_JOBS */ 27#endif /* WITH_IRIX_JOBS */
35 28
36#ifdef WITH_IRIX_JOBS 29#ifdef WITH_IRIX_JOBS
37 if (_MIPS_SYMBOL_PRESENT(jlimit_startjob)) { 30 jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive");
38 jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive"); 31 if (jid == -1)
39 if (jid == -1) { 32 fatal("Failed to create job container: %.100s",
40 if (errno == ENOPKG)
41 jid = 0;
42 else
43 fatal("Failed to create job container: %.100s",
44 strerror(errno)); 33 strerror(errno));
45 }
46 }
47#endif /* WITH_IRIX_JOBS */ 34#endif /* WITH_IRIX_JOBS */
48#ifdef WITH_IRIX_ARRAY 35#ifdef WITH_IRIX_ARRAY
49 /* initialize array session */ 36 /* initialize array session */