nss-pam-ldapd commit: r1749 - nss-pam-ldapd/nss
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1749 - nss-pam-ldapd/nss
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1749 - nss-pam-ldapd/nss
- Date: Mon, 3 Sep 2012 23:15:28 +0200 (CEST)
Author: arthur
Date: Mon Sep 3 23:15:28 2012
New Revision: 1749
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1749&view=revision
Log:
a few fixes in the Solaris group lookups
Modified:
nss-pam-ldapd/nss/group.c
Modified: nss-pam-ldapd/nss/group.c
==============================================================================
--- nss-pam-ldapd/nss/group.c Mon Sep 3 23:07:56 2012 (r1748)
+++ nss-pam-ldapd/nss/group.c Mon Sep 3 23:15:28 2012 (r1749)
@@ -190,7 +190,6 @@
struct group result;
nss_status_t retv;
char *buffer;
- size_t buflen;
int i;
/* read the group into a temporary buffer */
buffer=(char *)malloc(args->buf.buflen);
@@ -210,12 +209,12 @@
for (i=0;result.gr_mem[i];i++)
{
if (i)
-
strncat(args->buf.buffer,args->buf.buflen-strlen(args->buf.buffer)-1,",");
-
strncat(args->buf.buffer,args->buf.buflen-strlen(args->buf.buffer)-1,result.gr_mem[i]);
+
strncat(args->buf.buffer,",",args->buf.buflen-strlen(args->buf.buffer)-1);
+
strncat(args->buf.buffer,result.gr_mem[i],args->buf.buflen-strlen(args->buf.buffer)-1);
}
free(buffer);
/* check if buffer overflowed */
- if (strlen(args->buf.buffer)>=args->buf.buffer-1)
+ if (strlen(args->buf.buffer)>=args->buf.buflen-1)
return NSS_STATUS_TRYAGAIN;
NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.buffer;
NSS_ARGS(args)->returnlen=strlen(NSS_ARGS(args)->buf.buffer);
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd commit: r1749 - nss-pam-ldapd/nss,
Commits of the nss-pam-ldapd project