pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/databases/nss_ldap/files on LDAP errors, restore the s...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c72a1754ebec
branches: trunk
changeset: 499318:c72a1754ebec
user: drochner <drochner%pkgsrc.org@localhost>
date: Mon Sep 19 15:54:42 2005 +0000
description:
on LDAP errors, restore the state of the group array
diffstat:
databases/nss_ldap/files/netbsd.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r b8e55ee9e46c -r c72a1754ebec databases/nss_ldap/files/netbsd.c
--- a/databases/nss_ldap/files/netbsd.c Mon Sep 19 15:25:41 2005 +0000
+++ b/databases/nss_ldap/files/netbsd.c Mon Sep 19 15:54:42 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd.c,v 1.3 2005/08/30 16:12:02 drochner Exp $ */
+/* $NetBSD: netbsd.c,v 1.4 2005/09/19 15:54:42 drochner Exp $ */
#include <sys/param.h>
#include <pwd.h>
@@ -453,6 +453,7 @@
int *size = va_arg(ap, int*);
gid_t *tmpgroups;
long int lstart, lsize;
+ int origsize = *size;
tmpgroups = malloc(limit * sizeof(gid_t));
if (!tmpgroups)
@@ -476,7 +477,8 @@
}
*size = lstart;
s = NSS_STATUS_NOTFOUND;
- }
+ } else
+ *size = origsize;
free(tmpgroups);
return nss2netbsderr[s];
Home |
Main Index |
Thread Index |
Old Index