Displaying 1 result from an estimated 1 matches for "platform_setusercontext".
2010 Nov 05
2
test request: SCO with setluid() (i686-pc-sco3.2v5.0.7, possibly others)
...vey"!
Index: platform.c
===================================================================
RCS file: /var/cvs/openssh/platform.c,v
retrieving revision 1.14
diff -u -p -r1.14 platform.c
--- platform.c 5 Nov 2010 03:47:01 -0000 1.14
+++ platform.c 5 Nov 2010 04:08:42 -0000
@@ -109,6 +109,14 @@ platform_setusercontext(struct passwd *p
}
}
# endif /* USE_PAM */
+
+#if !defined(HAVE_LOGIN_CAP) && defined(HAVE_GETLUID) && defined(HAVE_SETLUID)
+ if (getuid() == 0 || geteuid() == 0) {
+ /* Sets login uid for accounting */
+ if (getluid() == -1 && setluid(pw->pw_uid) == -1)
+ erro...