summaryrefslogtreecommitdiff
path: root/source/nsswitch/winbindd_passdb.c
diff options
context:
space:
mode:
authorGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:28:53 -0500
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:28:53 -0500
commit65229e966119f0b1537d258854a54105f32ae399 (patch)
treec6be94324703d914228290a8354021c2691f3ebe /source/nsswitch/winbindd_passdb.c
parent95e77b14b5440a9ced8fdf6dc803b90c9518b8e0 (diff)
downloadsamba-65229e966119f0b1537d258854a54105f32ae399.tar.gz
[GLUE] Rsync SAMBA_3_0 SVN r25598 in order to create the v3-0-test branch.samba-misc-tags/initial-v3-0-test
Diffstat (limited to 'source/nsswitch/winbindd_passdb.c')
-rw-r--r--source/nsswitch/winbindd_passdb.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/source/nsswitch/winbindd_passdb.c b/source/nsswitch/winbindd_passdb.c
index 8b8c4c66c62..56166be7d31 100644
--- a/source/nsswitch/winbindd_passdb.c
+++ b/source/nsswitch/winbindd_passdb.c
@@ -93,28 +93,16 @@ static NTSTATUS enum_local_groups(struct winbindd_domain *domain,
/* convert a single name to a sid in a domain */
static NTSTATUS name_to_sid(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
- enum winbindd_cmd original_cmd,
const char *domain_name,
const char *name,
DOM_SID *sid,
enum lsa_SidType *type)
{
- uint32 flags = LOOKUP_NAME_ALL;
-
- switch ( original_cmd ) {
- case WINBINDD_LOOKUPNAME:
- /* This call is ok */
- break;
- default:
- /* Avoid any NSS calls in the lookup_name by default */
- flags |= LOOKUP_NAME_EXPLICIT;
- DEBUG(10,("winbindd_passdb: limiting name_to_sid() to explicit mappings\n"));
- break;
- }
-
DEBUG(10, ("Finding name %s\n", name));
- if ( !lookup_name( mem_ctx, name, flags, NULL, NULL, sid, type ) ) {
+ if ( !lookup_name( mem_ctx, name, LOOKUP_NAME_ALL,
+ NULL, NULL, sid, type ) )
+ {
return NT_STATUS_NONE_MAPPED;
}
@@ -137,12 +125,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
/* Paranoia check */
if (!sid_check_is_in_builtin(sid) &&
- !sid_check_is_in_our_domain(sid) &&
- !sid_check_is_in_unix_users(sid) &&
- !sid_check_is_unix_users(sid) &&
- !sid_check_is_in_unix_groups(sid) &&
- !sid_check_is_unix_groups(sid) )
- {
+ !sid_check_is_in_our_domain(sid)) {
DEBUG(0, ("Possible deadlock: Trying to lookup SID %s with "
"passdb backend\n", sid_string_static(sid)));
return NT_STATUS_NONE_MAPPED;
@@ -413,7 +396,8 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
return NT_STATUS_NO_MEMORY;
}
- nt_status = pdb_enum_trusteddoms(tmp_ctx, num_domains, &domains);
+ nt_status = secrets_trusted_domains(tmp_ctx, num_domains,
+ &domains);
if (!NT_STATUS_IS_OK(nt_status)) {
TALLOC_FREE(tmp_ctx);
return nt_status;