diff options
author | Sam Hartman <hartmans@debian.org> | 2024-12-02 09:55:34 -0700 |
---|---|---|
committer | Sam Hartman <hartmans@debian.org> | 2024-12-02 09:55:34 -0700 |
commit | 7c9fb6472dcfae34ddbf4fbc9ecfafae2cf173c3 (patch) | |
tree | b04aa8c3b2354427cbba730ccc832249f7244985 /xtests/tst-pam_unix4.c | |
parent | e9aa2ef52a423a3a33299bf7e8715eb5bd76ea67 (diff) | |
parent | ea980d991196df67cdd56b3f65d210b73218d08a (diff) | |
download | pam-7c9fb6472dcfae34ddbf4fbc9ecfafae2cf173c3.tar.gz pam-7c9fb6472dcfae34ddbf4fbc9ecfafae2cf173c3.tar.bz2 pam-7c9fb6472dcfae34ddbf4fbc9ecfafae2cf173c3.zip |
New upstream version 1.7.0
Diffstat (limited to 'xtests/tst-pam_unix4.c')
-rw-r--r-- | xtests/tst-pam_unix4.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xtests/tst-pam_unix4.c b/xtests/tst-pam_unix4.c index 1ba0a40c..b2abdfe1 100644 --- a/xtests/tst-pam_unix4.c +++ b/xtests/tst-pam_unix4.c @@ -35,9 +35,7 @@ * Check password change minimum days handling. */ -#ifdef HAVE_CONFIG_H #include <config.h> -#endif #include <stdio.h> #include <stdlib.h> @@ -125,7 +123,13 @@ main(int argc, char *argv[]) /* we must switch the real (not effective) user so the restrictions are enforced */ - setreuid (pwd->pw_uid, -1); + retval = setreuid (pwd->pw_uid, -1); + if (retval) + { + if (debug) + fprintf (stderr, "unix4: setreuid returned %d\n", retval); + return 1; + } retval = pam_start("tst-pam_unix4", user, &conv, &pamh); if (retval != PAM_SUCCESS) |