aboutsummaryrefslogtreecommitdiff
path: root/xtests/tst-pam_unix4.c
diff options
context:
space:
mode:
Diffstat (limited to 'xtests/tst-pam_unix4.c')
-rw-r--r--xtests/tst-pam_unix4.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xtests/tst-pam_unix4.c b/xtests/tst-pam_unix4.c
index b06cec8a..b2abdfe1 100644
--- a/xtests/tst-pam_unix4.c
+++ b/xtests/tst-pam_unix4.c
@@ -123,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)