Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2012-05-04 15:31:43 +0200
committerArthur de Jong <arthur@arthurdejong.org>2012-05-04 15:31:43 +0200
commitd02bfa44cfda8b7d5b95817305e30f77cfbee079 (patch)
treebd75a34b320a70228791e08a162bb92668276797 /nslcd
parentc5aef9868c5c703a3e9682300068407f17e517a3 (diff)
don't try to close _SC_OPEN_MAX file descriptor
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1678 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd')
-rw-r--r--nslcd/nslcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nslcd/nslcd.c b/nslcd/nslcd.c
index 6a6a46a..c2e9546 100644
--- a/nslcd/nslcd.c
+++ b/nslcd/nslcd.c
@@ -709,7 +709,7 @@ int main(int argc,char *argv[])
exit(EXIT_FAILURE);
}
/* close all file descriptors (except stdin/out/err) */
- i=sysconf(_SC_OPEN_MAX);
+ i=sysconf(_SC_OPEN_MAX)-1;
/* if the system does not have OPEN_MAX just close the first 32 and
hope we closed enough */
if (i<0)