summaryrefslogtreecommitdiff
path: root/usr/src/lib/nsswitch/ldap/common/ldap_common.c
diff options
context:
space:
mode:
authorGordon Ross <gwr@nexenta.com>2017-09-07 16:12:22 -0400
committerGordon Ross <gwr@nexenta.com>2019-05-30 17:30:45 -0400
commit695ef821379e863d33c30fb148f4ecf87038b246 (patch)
tree97ce963e87bde32470e5c27252477301645aeca6 /usr/src/lib/nsswitch/ldap/common/ldap_common.c
parentdbcaafbddbc82f9a7b3310551c4bcdb862b2515a (diff)
downloadillumos-joyent-695ef821379e863d33c30fb148f4ecf87038b246.tar.gz
10990 Get UNIX group info. from AD/LDAP with partial RFC2307 schema
Reviewed by: Matt Barden <matt.barden@nexenta.com> Reviewed by: Evan Layton <evan.layton@nexenta.com> Reviewed by: Chris Ridd <chrisridd@mac.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib/nsswitch/ldap/common/ldap_common.c')
-rw-r--r--usr/src/lib/nsswitch/ldap/common/ldap_common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/src/lib/nsswitch/ldap/common/ldap_common.c b/usr/src/lib/nsswitch/ldap/common/ldap_common.c
index c4103ef03e..f654580e56 100644
--- a/usr/src/lib/nsswitch/ldap/common/ldap_common.c
+++ b/usr/src/lib/nsswitch/ldap/common/ldap_common.c
@@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
*/
#include "ldap_common.h"
@@ -246,7 +247,7 @@ error_out:
/* ARGSUSED */
nss_status_t
_nss_ldap_nocb_lookup(ldap_backend_ptr be, nss_XbyY_args_t *argp,
- char *database, char *searchfilter, char *domain,
+ char *database, char *searchfilter, const char * const *attrs,
int (*init_filter_cb)(const ns_ldap_search_desc_t *desc,
char **realfilter, const void *userdata),
const void *userdata)
@@ -254,6 +255,9 @@ _nss_ldap_nocb_lookup(ldap_backend_ptr be, nss_XbyY_args_t *argp,
ns_ldap_error_t *error = NULL;
int rc;
+ if (attrs == NULL)
+ attrs = be->attrs;
+
#ifdef DEBUG
(void) fprintf(stdout, "\n[ldap_common.c: _nss_ldap_nocb_lookup]\n");
(void) fprintf(stdout, "\tsearchfilter: %s\n", searchfilter);
@@ -265,7 +269,7 @@ _nss_ldap_nocb_lookup(ldap_backend_ptr be, nss_XbyY_args_t *argp,
(void) __ns_ldap_freeResult(&be->result);
if ((rc = __ns_ldap_list(database, searchfilter, init_filter_cb,
- be->attrs, NULL, 0, &be->result, &error, NULL,
+ attrs, NULL, 0, &be->result, &error, NULL,
userdata)) != NS_LDAP_SUCCESS) {
if (argp != NULL)
argp->returnval = 0;