From bafcb57f11d459de0fc6461adfbf2f695786ae32 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 26 May 2004 18:52:45 +0000 Subject: r914: Fix from "Jerome Borsboom" to ensure correct sid type returned for builtin sids. Jeremy. (This used to be commit 14cf55abb8239e7c90f8891565ac7ed8c51423eb) --- source3/nsswitch/winbindd_passdb.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source3/nsswitch') 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; } -- cgit