[SCM] Samba Shared Repository - branch master updated
Andreas Schneider
asn at samba.org
Mon May 19 08:42:03 MDT 2014
The branch, master has been updated
via e5649ef smbd: fix creation of BUILTIN\{Administrators,Users} when "tdbsam:map builtin = false"
from 93093fa s4-torture: fix some build warnings in rpc samr test.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e5649ef6ee7fe2fd333ffdce3464c45a0cf01c9f
Author: Michael Adam <obnox at samba.org>
Date: Sat May 3 02:59:37 2014 +0200
smbd: fix creation of BUILTIN\{Administrators,Users} when "tdbsam:map builtin = false"
In this case, passdb/group mapping is not responsible for the id mapping
of the builtins, so the check whether the SID maps to a unix ID is not
valid for checking whether the builtin has been created as a proper group.
So this patch changes the check to whether we find the builtin in the group
mapping database.
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Mon May 19 16:41:41 CEST 2014 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source3/auth/token_util.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index 82eaaff..8b0174f 100644
--- a/source3/auth/token_util.c
+++ b/source3/auth/token_util.c
@@ -487,8 +487,8 @@ static NTSTATUS finalize_local_nt_token(struct security_token *result,
bool is_guest)
{
struct dom_sid dom_sid;
- gid_t gid;
NTSTATUS status;
+ struct acct_info *info;
/* Add any local groups. */
@@ -527,11 +527,18 @@ static NTSTATUS finalize_local_nt_token(struct security_token *result,
}
}
+ info = talloc_zero(talloc_tos(), struct acct_info);
+ if (info == NULL) {
+ DEBUG(0, ("talloc failed!\n"));
+ return NT_STATUS_NO_MEMORY;
+ }
+
/* Deal with the BUILTIN\Administrators group. If the SID can
be resolved then assume that the add_aliasmem( S-1-5-32 )
handled it. */
- if (!sid_to_gid(&global_sid_Builtin_Administrators, &gid)) {
+ status = pdb_get_aliasinfo(&global_sid_Builtin_Administrators, info);
+ if (!NT_STATUS_IS_OK(status)) {
become_root();
if (!secrets_fetch_domain_sid(lp_workgroup(), &dom_sid)) {
@@ -562,7 +569,8 @@ static NTSTATUS finalize_local_nt_token(struct security_token *result,
be resolved then assume that the add_aliasmem( S-1-5-32 )
handled it. */
- if (!sid_to_gid(&global_sid_Builtin_Users, &gid)) {
+ status = pdb_get_aliasinfo(&global_sid_Builtin_Users, info);
+ if (!NT_STATUS_IS_OK(status)) {
become_root();
if (!secrets_fetch_domain_sid(lp_workgroup(), &dom_sid)) {
@@ -582,6 +590,8 @@ static NTSTATUS finalize_local_nt_token(struct security_token *result,
}
}
+ TALLOC_FREE(info);
+
/* Deal with local groups */
if (lp_winbind_nested_groups()) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list