summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-05-26 18:52:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:48 -0500
commitbafcb57f11d459de0fc6461adfbf2f695786ae32 (patch)
tree582d97fff7c891ca0de4f62dcb15a4152ca481d4 /source3
parent7ea0be80de25da22abcf1f1c34f646251f7814c0 (diff)
downloadsamba-bafcb57f11d459de0fc6461adfbf2f695786ae32.tar.gz
samba-bafcb57f11d459de0fc6461adfbf2f695786ae32.tar.bz2
samba-bafcb57f11d459de0fc6461adfbf2f695786ae32.zip
r914: Fix from "Jerome Borsboom" <j.borsboom@erasmusmc.nl> to ensure
correct sid type returned for builtin sids. Jeremy. (This used to be commit 14cf55abb8239e7c90f8891565ac7ed8c51423eb)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_passdb.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_passdb.c b/source3/nsswitch/winbindd_passdb.c
index 12f5e0bae2..3adb81caa3 100644
--- a/source3/nsswitch/winbindd_passdb.c
+++ b/source3/nsswitch/winbindd_passdb.c
@@ -240,7 +240,11 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
if (!pdb_find_alias(name, sid))
return NT_STATUS_NONE_MAPPED;
- *type = SID_NAME_ALIAS;
+ if (sid_check_is_in_builtin(sid))
+ *type = SID_NAME_WKN_GRP;
+ else
+ *type = SID_NAME_ALIAS;
+
return NT_STATUS_OK;
}
@@ -263,7 +267,10 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
*domain_name = talloc_strdup(mem_ctx, domain->name);
*name = talloc_strdup(mem_ctx, info.acct_name);
- *type = SID_NAME_ALIAS;
+ if (sid_check_is_in_builtin(sid))
+ *type = SID_NAME_WKN_GRP;
+ else
+ *type = SID_NAME_ALIAS;
return NT_STATUS_OK;
}