summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-07-08 21:01:04 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-07-08 21:01:04 +1000
commit793e817d491b5081d2a156b546ae06f28d11a737 (patch)
tree97835fb6b37112a3f161cfd42bff961e2e73bec8
parenta0c0b6311210e0cddfb1b038bd7b37f5a298ef3e (diff)
- (dtucker) Check return value of setpcred().
-rw-r--r--ChangeLog3
-rw-r--r--session.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ea4d4ac2..58b188eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
- (dtucker) [acconfig.h auth-passwd.c configure.ac session.c port-aix.[ch]]
Include AIX headers for authentication functions and make calls match
prototypes. Test for and handle 3-args and 4-arg variants of loginfailed.
+ - (dtucker) Check return value of setpcred().
20030707
- (dtucker) [configure.ac] Bug #600: Check that getrusage is declared before
@@ -667,4 +668,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
-$Id: ChangeLog,v 1.2847 2003/07/08 10:52:12 dtucker Exp $
+$Id: ChangeLog,v 1.2848 2003/07/08 11:01:04 dtucker Exp $
diff --git a/session.c b/session.c
index ac57c3d0..e9cf7e95 100644
--- a/session.c
+++ b/session.c
@@ -1215,7 +1215,8 @@ do_setusercontext(struct passwd *pw)
{
#ifdef HAVE_SETPCRED
- setpcred(pw->pw_name, (char **)NULL);
+ if (setpcred(pw->pw_name, (char **)NULL) == -1)
+ fatal("Failed to set process credentials");
#endif /* HAVE_SETPCRED */
#ifdef HAVE_LOGIN_CAP
# ifdef __bsdi__