diff options
Diffstat (limited to 'uidswap.c')
-rw-r--r-- | uidswap.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -11,6 +11,9 @@ RCSID("$OpenBSD: uidswap.c,v 1.7 2000/06/20 01:39:45 markus Exp $"); | |||
11 | 11 | ||
12 | #include "ssh.h" | 12 | #include "ssh.h" |
13 | #include "uidswap.h" | 13 | #include "uidswap.h" |
14 | #ifdef WITH_IRIX_AUDIT | ||
15 | #include <sat.h> | ||
16 | #endif /* WITH_IRIX_AUDIT */ | ||
14 | 17 | ||
15 | /* | 18 | /* |
16 | * Note: all these functions must work in all of the following cases: | 19 | * Note: all these functions must work in all of the following cases: |
@@ -83,6 +86,14 @@ restore_uid() | |||
83 | void | 86 | void |
84 | permanently_set_uid(uid_t uid) | 87 | permanently_set_uid(uid_t uid) |
85 | { | 88 | { |
89 | #ifdef WITH_IRIX_AUDIT | ||
90 | if (sysconf(_SC_AUDIT)) { | ||
91 | debug("Setting sat id to %d", (int) uid); | ||
92 | if (satsetid(uid)) | ||
93 | fatal("error setting satid: %.100s", strerror(errno)); | ||
94 | } | ||
95 | #endif /* WITH_IRIX_AUDIT */ | ||
96 | |||
86 | if (setuid(uid) < 0) | 97 | if (setuid(uid) < 0) |
87 | debug("setuid %d: %.100s", (int) uid, strerror(errno)); | 98 | debug("setuid %d: %.100s", (int) uid, strerror(errno)); |
88 | } | 99 | } |