From 91606b17d2f8db5a1cbf32f7d780a6ac6f09bdd2 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 28 Jun 2000 08:22:29 +1000 Subject: - (djm) Patch from Michael Stone to add support for Irix 6.x array sessions, project id's, and system audit trail id. --- uidswap.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'uidswap.c') 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 +#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)); } -- cgit v1.2.3