summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2008-07-09 14:37:51 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2008-07-09 14:37:51 +0000
commit6377bdbbfc0af3c88572f5108f55344af745a010 (patch)
treeb01479d2d48356c7e95f81bcef10959fead6dca4 /modules
parent42f4dc06c31fc1e8eb3d11ce896bad65ca0489af (diff)
Relevant BUGIDs: 1976310
Purpose of commit: feature Commit summary: --------------- 2008-07-09 Thorsten Kukuk <kukuk@thkukuk.de> * modules/pam_exec/pam_exec.c (call_exec): Move all variable declaration to begin of a block (#1976310). * xtests/tst-pam_group1.c (run_test): Move no_grps declaration to begin of function (#1976310).
Diffstat (limited to 'modules')
-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.