summaryrefslogtreecommitdiff
path: root/uidswap.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-06-28 08:22:29 +1000
committerDamien Miller <djm@mindrot.org>2000-06-28 08:22:29 +1000
commit91606b17d2f8db5a1cbf32f7d780a6ac6f09bdd2 (patch)
tree381e5ef92c449e606a2475f09c9d454cede8f005 /uidswap.c
parent53c5d467c366122df252a7ffe599c1f2ded06370 (diff)
- (djm) Patch from Michael Stone <mstone@cs.loyola.edu> to add support for
Irix 6.x array sessions, project id's, and system audit trail id.
Diffstat (limited to 'uidswap.c')
-rw-r--r--uidswap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/uidswap.c b/uidswap.c
index 4213d34e..3fd0eefe 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -11,6 +11,9 @@ RCSID("$OpenBSD: uidswap.c,v 1.7 2000/06/20 01:39:45 markus Exp $");
#include "ssh.h"
#include "uidswap.h"
+#ifdef WITH_IRIX_AUDIT
+#include <sat.h>
+#endif /* WITH_IRIX_AUDIT */
/*
* Note: all these functions must work in all of the following cases:
@@ -83,6 +86,14 @@ restore_uid()
void
permanently_set_uid(uid_t uid)
{
+#ifdef WITH_IRIX_AUDIT
+ if (sysconf(_SC_AUDIT)) {
+ debug("Setting sat id to %d", (int) uid);
+ if (satsetid(uid))
+ fatal("error setting satid: %.100s", strerror(errno));
+ }
+#endif /* WITH_IRIX_AUDIT */
+
if (setuid(uid) < 0)
debug("setuid %d: %.100s", (int) uid, strerror(errno));
}