diff options
author | Jason King <jason.king@joyent.com> | 2020-01-22 06:18:51 +0000 |
---|---|---|
committer | Jason King <jason.king@joyent.com> | 2020-02-15 17:23:54 -0600 |
commit | d7ab8532a7a0f65d1c2b7bc3f45072f665860b20 (patch) | |
tree | f3752b662a3868651868c132638120ef30a41e9a /usr/src/lib/nsswitch | |
parent | f5f3cbec075f8308da054292c7c7d96373c956ee (diff) | |
download | illumos-joyent-d7ab8532a7a0f65d1c2b7bc3f45072f665860b20.tar.gz |
12236 getmembers_DN doesn't properly handle errors from __ns_ldap_dn2uid
12240 nss_ldap does not properly look up group members by distinguished name
Reviewed by: Jorge Schrauwen <jorge@blackdot.be>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib/nsswitch')
-rw-r--r-- | usr/src/lib/nsswitch/ldap/common/getgrent.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/lib/nsswitch/ldap/common/getgrent.c b/usr/src/lib/nsswitch/ldap/common/getgrent.c index 184891c9d3..765059e86a 100644 --- a/usr/src/lib/nsswitch/ldap/common/getgrent.c +++ b/usr/src/lib/nsswitch/ldap/common/getgrent.c @@ -23,6 +23,7 @@ * Use is subject to license terms. * * Copyright 2017 Nexenta Systems, Inc. All rights reserved. + * Copyright 2020 Joyent, Inc. */ #include <grp.h> @@ -239,7 +240,7 @@ getmembers_DN(char **bufpp, int *lenp, ns_ldap_attr_t *members) char *buffer; int buflen; int i, len; - int nss_result = 0; + int nss_result = 0; /* used by TEST_AND_ADJUST macro */ int firsttime; buffer = *bufpp; @@ -263,9 +264,8 @@ getmembers_DN(char **bufpp, int *lenp, ns_ldap_attr_t *members) if (member_dn[0] == '\0') continue; - nss_result = __ns_ldap_dn2uid(member_dn, - &member_uid, NULL, &error); - if (nss_result != NS_LDAP_SUCCESS) { + if (__ns_ldap_dn2uid(member_dn, + &member_uid, NULL, &error) != NS_LDAP_SUCCESS) { (void) __ns_ldap_freeError(&error); error = NULL; continue; |