[SCM] Samba Shared Repository - branch v3-0-test updated
Michael Adam
obnox at samba.org
Fri Oct 12 11:34:31 GMT 2007
The branch, v3-0-test has been updated
via 0f633851537b689b0ac57b041d97115b6158546f (commit)
from b16e4e16340eaa8d93651ba816937e8040b85e95 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0f633851537b689b0ac57b041d97115b6158546f
Author: Michael Adam <obnox at samba.org>
Date: Fri Oct 12 13:34:09 2007 +0200
Add become_root/unbecome_root around one call of getsampwsid()
in create_token_from_username(). This caused set_nt_acl to
partially fail in certain circumstances.
This is expected to bring an improvement to bug #4308.
Michael
-----------------------------------------------------------------------
Summary of changes:
source/auth/auth_util.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index 1c53447..6fbec48 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -1116,6 +1116,7 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
}
if (sid_check_is_in_our_domain(&user_sid)) {
+ BOOL ret;
/* This is a passdb user, so ask passdb */
@@ -1126,7 +1127,11 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
goto done;
}
- if (!pdb_getsampwsid(sam_acct, &user_sid)) {
+ become_root();
+ ret = pdb_getsampwsid(sam_acct, &user_sid);
+ unbecome_root();
+
+ if (!ret) {
DEBUG(1, ("pdb_getsampwsid(%s) for user %s failed\n",
sid_string_static(&user_sid), username));
DEBUGADD(1, ("Fall back to unix user %s\n", username));
--
Samba Shared Repository
More information about the samba-cvs
mailing list