1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Merge some random looking setenv related kerberos stuff that makes

winbindd build again.
(This used to be commit c4f46890fe)
This commit is contained in:
Tim Potter 2003-02-19 22:50:05 +00:00
parent 5ef421f1d8
commit fe2f9f813d

View File

@ -46,9 +46,7 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
}
/* we don't want this to affect the users ccache */
ccache = lock_path("winbindd_ccache");
SETENV("KRB5CCNAME", ccache, 1);
unlink(ccache);
setenv("KRB5CCNAME", "MEMORY:winbind_ccache", 1);
ads = ads_init(domain->alt_name, domain->name, NULL);
if (!ads) {
@ -346,10 +344,17 @@ 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);
free(exp);
SAFE_FREE(exp);
SAFE_FREE(escaped_dn);
if (!ADS_ERR_OK(rc)) {
goto failed;
}