New snapshot
Michael Stone
mstone at cs.loyola.edu
Thu Nov 16 06:14:27 EST 2000
Wrong patch for moving WITH_IRIX_AUDIT to session.c. This one should work.
--
Mike Stone
-------------- next part --------------
--- uidswap.c.orig Tue Nov 14 09:38:44 2000
+++ uidswap.c Tue Nov 14 09:42:53 2000
@@ -16,9 +16,6 @@
#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:
@@ -91,14 +88,6 @@
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))
- debug("error setting satid: %.100s", strerror(errno));
- }
-#endif /* WITH_IRIX_AUDIT */
-
if (setuid(uid) < 0)
debug("setuid %u: %.100s", (u_int) uid, strerror(errno));
}
--- session.c.orig Tue Nov 14 09:38:20 2000
+++ session.c Tue Nov 14 09:43:15 2000
@@ -57,7 +57,10 @@
#endif /* WITH_IRIX_PROJECT */
#ifdef WITH_IRIX_JOBS
#include <sys/resource.h>
-#endif
+#endif
+#ifdef WITH_IRIX_AUDIT
+#include <sat.h>
+#endif /* WITH_IRIX_AUDIT */
#if defined(HAVE_USERSEC_H)
#include <usersec.h>
@@ -1104,7 +1107,6 @@
strerror(errno));
}
# endif /* WITH_IRIX_JOBS */
-
# ifdef WITH_IRIX_ARRAY
/* initialize array session */
if (jid == 0) {
@@ -1123,6 +1125,14 @@
fatal("Failed to initialize project %d for %s: %.100s",
(int)projid, pw->pw_name, strerror(errno));
# endif /* WITH_IRIX_PROJECT */
+#ifdef WITH_IRIX_AUDIT
+ if (sysconf(_SC_AUDIT)) {
+ debug("Setting sat id to %d", (int) pw->pw_uid);
+ if (satsetid(pw->pw_uid))
+ debug("error setting satid: %.100s", strerror(errno));
+ }
+#endif /* WITH_IRIX_AUDIT */
+
/* Permanently switch to the desired uid. */
permanently_set_uid(pw->pw_uid);
# endif /* HAVE_LOGIN_CAP */
More information about the openssh-unix-dev
mailing list