summaryrefslogtreecommitdiff
path: root/modules/pam_exec/pam_exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_exec/pam_exec.c')
-rw-r--r--modules/pam_exec/pam_exec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/pam_exec/pam_exec.c b/modules/pam_exec/pam_exec.c
index 14dddd54..dce65730 100644
--- a/modules/pam_exec/pam_exec.c
+++ b/modules/pam_exec/pam_exec.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006 Thorsten Kukuk <kukuk@thkukuk.de>
+ * Copyright (c) 2006, 2008 Thorsten Kukuk <kukuk@thkukuk.de>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -117,6 +117,7 @@ call_exec (pam_handle_t *pamh, int argc, const char **argv)
{
int status = 0;
pid_t retval;
+
while ((retval = waitpid (pid, &status, 0)) == -1 &&
errno == EINTR);
if (retval == (pid_t)-1)
@@ -160,6 +161,8 @@ call_exec (pam_handle_t *pamh, int argc, const char **argv)
{
char **arggv;
int i;
+ char **envlist, **tmp;
+ int envlen, nitems;
for (i = 0; i < sysconf (_SC_OPEN_MAX); i++)
close (i);
@@ -229,9 +232,6 @@ call_exec (pam_handle_t *pamh, int argc, const char **argv)
arggv[i] = strdup(argv[i+optargc]);
arggv[i] = NULL;
- char **envlist, **tmp;
- int envlen, nitems;
-
/*
* Set up the child's environment list. It consists of the PAM
* environment, plus a few hand-picked PAM items.