summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wb_client.c9
-rw-r--r--source3/nsswitch/winbindd.c1
-rw-r--r--source3/nsswitch/winbindd_ads.c9
-rw-r--r--source3/nsswitch/winbindd_util.c11
4 files changed, 8 insertions, 22 deletions
diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c
index 62c9686960..9ac1515d7d 100644
--- a/source3/nsswitch/wb_client.c
+++ b/source3/nsswitch/wb_client.c
@@ -56,8 +56,7 @@ BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
if ((result = winbindd_request(WINBINDD_LOOKUPNAME, &request,
&response)) == NSS_STATUS_SUCCESS) {
- if (!string_to_sid(sid, response.data.sid.sid))
- return False;
+ string_to_sid(sid, response.data.sid.sid);
*name_type = (enum SID_NAME_USE)response.data.sid.type;
}
@@ -159,8 +158,7 @@ BOOL winbind_uid_to_sid(DOM_SID *sid, uid_t uid)
/* Copy out result */
if (result == NSS_STATUS_SUCCESS) {
- if (!string_to_sid(sid, response.data.sid.sid))
- return False;
+ string_to_sid(sid, response.data.sid.sid);
} else {
sid_copy(sid, &global_sid_NULL);
}
@@ -226,8 +224,7 @@ BOOL winbind_gid_to_sid(DOM_SID *sid, gid_t gid)
/* Copy out result */
if (result == NSS_STATUS_SUCCESS) {
- if (!string_to_sid(sid, response.data.sid.sid))
- return False;
+ string_to_sid(sid, response.data.sid.sid);
} else {
sid_copy(sid, &global_sid_NULL);
}
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index ddda2d5f8b..b0b3acff8f 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -902,7 +902,6 @@ static void usage(void)
process_loop();
- trustdom_cache_shutdown();
uni_group_cache_shutdown();
return 0;
}
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index 7cea4aa716..261c2f2237 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -346,17 +346,10 @@ static BOOL dn_lookup(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
ADS_STATUS rc;
uint32 atype;
DOM_SID sid;
- char *escaped_dn = escape_ldap_string_alloc(dn);
-
- if (!escaped_dn) {
- return False;
- }
asprintf(&exp, "(distinguishedName=%s)", dn);
rc = ads_search_retry(ads, &res, exp, attrs);
- SAFE_FREE(exp);
- SAFE_FREE(escaped_dn);
-
+ free(exp);
if (!ADS_ERR_OK(rc)) {
goto failed;
}
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index 3fa08029b6..99b94eac47 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -179,7 +179,7 @@ void rescan_trusted_domains(BOOL force)
int i;
result = domain->methods->trusted_domains(domain, mem_ctx, &num_domains,
- &names, &alt_names, &dom_sids);
+ &names, &alt_names, &dom_sids);
if (!NT_STATUS_IS_OK(result)) {
continue;
}
@@ -188,12 +188,9 @@ void rescan_trusted_domains(BOOL force)
the access methods of its parent */
for(i = 0; i < num_domains; i++) {
DEBUG(10,("Found domain %s\n", names[i]));
- add_trusted_domain(names[i], alt_names?alt_names[i]:NULL,
- domain->methods, &dom_sids[i]);
-
- /* store trusted domain in the cache */
- trustdom_cache_store(names[i], alt_names ? alt_names[i] : NULL,
- &dom_sids[i], t + WINBINDD_RESCAN_FREQ);
+ add_trusted_domain(names[i],
+ alt_names?alt_names[i]:NULL,
+ domain->methods, &dom_sids[i]);
}
}