Commit bafcb57f authored by Jeremy Allison's avatar Jeremy Allison Committed by Gerald (Jerry) Carter
Browse files

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)
parent 7ea0be80
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -240,7 +240,11 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
	if (!pdb_find_alias(name, sid))
		return NT_STATUS_NONE_MAPPED;

	if (sid_check_is_in_builtin(sid))
		*type = SID_NAME_WKN_GRP;
	else
		*type = SID_NAME_ALIAS;

	return NT_STATUS_OK;
}

@@ -263,6 +267,9 @@ 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);
	if (sid_check_is_in_builtin(sid))
		*type = SID_NAME_WKN_GRP;
	else
		*type = SID_NAME_ALIAS;

	return NT_STATUS_OK;