[SCM] Samba Shared Repository - branch master updated
David Disseldorp
ddiss at samba.org
Wed Apr 2 05:08:03 MDT 2014
The branch, master has been updated
via 8175e98 selftest: Rename wbinfo_s3 to wbinfo_simple and reorder code for clarity
via 95e0d75 winbindd: Ensure we do not look at rid_array before checking if it was returned
via 8d28437 s3-auth: Add prototype for plugin function to reduce warnings in auth_samba4
via d13b38d s3-auth: Remember to always free the talloc_stackframe() in auth_samba4
via dd49939 auth_samba4: Fix auth_samba4 to correctly provide a messaging context for itself
via 4d50c75 s3-auth: Finally change make_user_info_*() use a parent talloc context
from e1ec1f5 wafsamba: explicitly use allow_warnings=True for SAMBA_PYTHON()
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 8175e980298cf21595732070bc6f59cba26afe33
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Mar 31 14:02:18 2014 +1300
selftest: Rename wbinfo_s3 to wbinfo_simple and reorder code for clarity
Change-Id: Ic2e06e448fce1d91422b711abf663b9253009a53
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
Autobuild-User(master): David Disseldorp <ddiss at samba.org>
Autobuild-Date(master): Wed Apr 2 13:07:24 CEST 2014 on sn-devel-104
commit 95e0d759ac7584d8e27240f11a4b51077b61929c
Author: Andrew Bartlett <abartlet at samba.org>
Date: Fri Mar 28 16:30:28 2014 +1300
winbindd: Ensure we do not look at rid_array before checking if it was returned
We no longer return early if there are no members, we just return an empty array.
Change-Id: I7b0949e0c0b9277426a8007514a8658615f6c709
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
commit 8d2843731862a3faed94dc92e9c5a0541d51f4ff
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Apr 2 12:12:39 2014 +1300
s3-auth: Add prototype for plugin function to reduce warnings in auth_samba4
Change-Id: I0aa703bb2766f1353a176a0c3f25424bbc4953f5
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
commit d13b38dc9681997d35ba8085b1f944f2b31f50bf
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Apr 2 12:12:14 2014 +1300
s3-auth: Remember to always free the talloc_stackframe() in auth_samba4
Change-Id: I94469de9d463ee90365bae43094231efaf0a7d8c
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
commit dd499395a5eafeb469a17d31da63cc963b067752
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Mar 27 09:18:04 2014 +1300
auth_samba4: Fix auth_samba4 to correctly provide a messaging context for itself
This is done by calling make_auth4_context_s4(), avoiding code duplication.
Change-Id: I3a3bf4e4273f27078c308d55102e4a1f4b052d17
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
commit 4d50c751595511936c3d9a44ebb26a925c50a8bc
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Mar 27 09:17:15 2014 +1300
s3-auth: Finally change make_user_info_*() use a parent talloc context
Change-Id: Iedf516e8c24e0d18064aeedd8e287ed692d3c5b4
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
-----------------------------------------------------------------------
Summary of changes:
.../tests/test_wbinfo_simple.sh | 4 +-
source3/auth/auth_ntlmssp.c | 5 +-
source3/auth/auth_samba4.c | 28 +++++------
source3/auth/auth_util.c | 31 ++++++++----
source3/auth/proto.h | 21 ++++++---
source3/auth/user_info.c | 17 +------
source3/rpc_server/netlogon/srv_netlog_nt.c | 8 ++-
source3/selftest/tests.py | 50 ++++++++++----------
source3/smbd/sesssetup.c | 18 ++++---
source3/torture/pdbtest.c | 3 +-
source3/winbindd/winbindd_pam.c | 9 ++-
source3/winbindd/winbindd_rpc.c | 6 +-
12 files changed, 105 insertions(+), 95 deletions(-)
rename source3/script/tests/test_wbinfo_s3.sh => nsswitch/tests/test_wbinfo_simple.sh (68%)
Changeset truncated at 500 lines:
diff --git a/source3/script/tests/test_wbinfo_s3.sh b/nsswitch/tests/test_wbinfo_simple.sh
similarity index 68%
rename from source3/script/tests/test_wbinfo_s3.sh
rename to nsswitch/tests/test_wbinfo_simple.sh
index 91a9f45..dc90ddc 100755
--- a/source3/script/tests/test_wbinfo_s3.sh
+++ b/nsswitch/tests/test_wbinfo_simple.sh
@@ -2,14 +2,14 @@
if [ $# -lt 1 ]; then
cat <<EOF
-Usage: test_wbinfo_s3.sh <wbinfo args>
+Usage: test_wbinfo_simple.sh <wbinfo args>
EOF
exit 1;
fi
ADDARGS="$*"
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=`dirname $0`/../../testprogs/blackbox
. $incdir/subunit.sh
testit "wbinfo" $VALGRIND $BINDIR/wbinfo $ADDARGS || failed=`expr $failed + 1`
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index d4fe901..45166c0 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -116,7 +116,8 @@ NTSTATUS auth3_check_password(struct auth4_context *auth4_context,
lp_load(get_dyn_CONFIGFILE(), false, false, true, true);
- nt_status = make_user_info_map(&mapped_user_info,
+ nt_status = make_user_info_map(talloc_tos(),
+ &mapped_user_info,
user_info->client.account_name,
user_info->client.domain_name,
user_info->workstation_name,
@@ -148,7 +149,7 @@ NTSTATUS auth3_check_password(struct auth4_context *auth4_context,
username_was_mapped = mapped_user_info->was_mapped;
- free_user_info(&mapped_user_info);
+ TALLOC_FREE(mapped_user_info);
if (!NT_STATUS_IS_OK(nt_status)) {
nt_status = do_map_to_guest_server_info(mem_ctx,
diff --git a/source3/auth/auth_samba4.c b/source3/auth/auth_samba4.c
index 0350fec..fcc4c28 100644
--- a/source3/auth/auth_samba4.c
+++ b/source3/auth/auth_samba4.c
@@ -31,6 +31,9 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
+static NTSTATUS make_auth4_context_s4(TALLOC_CTX *mem_ctx,
+ struct auth4_context **auth4_context);
+
static struct idr_context *task_id_tree;
static int free_task_id(struct server_id *server_id)
@@ -84,8 +87,8 @@ static struct server_id *new_server_id_task(TALLOC_CTX *mem_ctx)
*/
/*
- * This hook is currently unused, as all NTLM logins go via the hooks
- * provided by make_auth4_context_s4() below.
+ * This hook is currently used by winbindd only, as all other NTLM
+ * logins go via the hooks provided by make_auth4_context_s4() below.
*
* This is only left in case we find a way that it might become useful
* in future. Importantly, this routine returns the information
@@ -107,32 +110,24 @@ static NTSTATUS check_samba4_security(const struct auth_context *auth_context,
NTSTATUS nt_status;
struct auth_user_info_dc *user_info_dc;
struct auth4_context *auth4_context;
- struct loadparm_context *lp_ctx;
- lp_ctx = loadparm_init_s3(frame, loadparm_s3_helpers());
- if (lp_ctx == NULL) {
- DEBUG(10, ("loadparm_init_s3 failed\n"));
- talloc_free(frame);
- return NT_STATUS_INVALID_SERVER_STATE;
+ nt_status = make_auth4_context_s4(mem_ctx, &auth4_context);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ TALLOC_FREE(frame);
+ goto done;
}
-
- /* We create a private tevent context here to avoid nested loops in
- * the s3 one, as that may not be expected */
- nt_status = auth_context_create(mem_ctx,
- s4_event_context_init(frame), NULL,
- lp_ctx,
- &auth4_context);
- NT_STATUS_NOT_OK_RETURN(nt_status);
nt_status = auth_context_set_challenge(auth4_context, auth_context->challenge.data, "auth_samba4");
if (!NT_STATUS_IS_OK(nt_status)) {
TALLOC_FREE(auth4_context);
+ TALLOC_FREE(frame);
return nt_status;
}
nt_status = auth_check_password(auth4_context, auth4_context, user_info, &user_info_dc);
if (!NT_STATUS_IS_OK(nt_status)) {
TALLOC_FREE(auth4_context);
+ TALLOC_FREE(frame);
return nt_status;
}
@@ -358,6 +353,7 @@ static NTSTATUS auth_init_samba4(struct auth_context *auth_context,
return NT_STATUS_OK;
}
+NTSTATUS auth_samba4_init(void);
NTSTATUS auth_samba4_init(void)
{
smb_register_auth(AUTH_INTERFACE_VERSION, "samba4",
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index fb9e8c8..cab77b4 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -89,7 +89,8 @@ static int _smb_create_user(const char *domain, const char *unix_username, const
Create an auth_usersupplied_data structure after appropriate mapping.
****************************************************************************/
-NTSTATUS make_user_info_map(struct auth_usersupplied_info **user_info,
+NTSTATUS make_user_info_map(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const char *workstation_name,
@@ -141,7 +142,7 @@ NTSTATUS make_user_info_map(struct auth_usersupplied_info **user_info,
* it is our global SAM name, or for legacy behavior it is our
* primary domain name */
- result = make_user_info(user_info, smb_name, internal_username,
+ result = make_user_info(mem_ctx, user_info, smb_name, internal_username,
client_domain, domain, workstation_name,
remote_address, lm_pwd, nt_pwd,
lm_interactive_pwd, nt_interactive_pwd,
@@ -160,7 +161,8 @@ NTSTATUS make_user_info_map(struct auth_usersupplied_info **user_info,
Decrypt and encrypt the passwords.
****************************************************************************/
-bool make_user_info_netlogon_network(struct auth_usersupplied_info **user_info,
+bool make_user_info_netlogon_network(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const char *workstation_name,
@@ -176,7 +178,7 @@ bool make_user_info_netlogon_network(struct auth_usersupplied_info **user_info,
DATA_BLOB lm_blob = data_blob(lm_network_pwd, lm_pwd_len);
DATA_BLOB nt_blob = data_blob(nt_network_pwd, nt_pwd_len);
- status = make_user_info_map(user_info,
+ status = make_user_info_map(mem_ctx, user_info,
smb_name, client_domain,
workstation_name,
remote_address,
@@ -200,7 +202,8 @@ bool make_user_info_netlogon_network(struct auth_usersupplied_info **user_info,
Decrypt and encrypt the passwords.
****************************************************************************/
-bool make_user_info_netlogon_interactive(struct auth_usersupplied_info **user_info,
+bool make_user_info_netlogon_interactive(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const char *workstation_name,
@@ -246,6 +249,7 @@ bool make_user_info_netlogon_interactive(struct auth_usersupplied_info **user_in
}
nt_status = make_user_info_map(
+ mem_ctx,
user_info,
smb_name, client_domain, workstation_name,
remote_address,
@@ -271,7 +275,8 @@ bool make_user_info_netlogon_interactive(struct auth_usersupplied_info **user_in
Create an auth_usersupplied_data structure
****************************************************************************/
-bool make_user_info_for_reply(struct auth_usersupplied_info **user_info,
+bool make_user_info_for_reply(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const struct tsocket_address *remote_address,
@@ -318,7 +323,7 @@ bool make_user_info_for_reply(struct auth_usersupplied_info **user_info,
return false;
}
- ret = make_user_info(
+ ret = make_user_info(mem_ctx,
user_info, smb_name, smb_name, client_domain, client_domain,
get_remote_machine_name(),
remote_address,
@@ -341,13 +346,15 @@ bool make_user_info_for_reply(struct auth_usersupplied_info **user_info,
Create an auth_usersupplied_data structure
****************************************************************************/
-NTSTATUS make_user_info_for_reply_enc(struct auth_usersupplied_info **user_info,
+NTSTATUS make_user_info_for_reply_enc(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const struct tsocket_address *remote_address,
DATA_BLOB lm_resp, DATA_BLOB nt_resp)
{
- return make_user_info(user_info, smb_name, smb_name,
+ return make_user_info(mem_ctx,
+ user_info, smb_name, smb_name,
client_domain, client_domain,
get_remote_machine_name(),
remote_address,
@@ -361,12 +368,14 @@ NTSTATUS make_user_info_for_reply_enc(struct auth_usersupplied_info **user_info,
Create a guest user_info blob, for anonymous authentication.
****************************************************************************/
-bool make_user_info_guest(const struct tsocket_address *remote_address,
+bool make_user_info_guest(TALLOC_CTX *mem_ctx,
+ const struct tsocket_address *remote_address,
struct auth_usersupplied_info **user_info)
{
NTSTATUS nt_status;
- nt_status = make_user_info(user_info,
+ nt_status = make_user_info(mem_ctx,
+ user_info,
"","",
"","",
"",
diff --git a/source3/auth/proto.h b/source3/auth/proto.h
index 7b8959f..6ce3aa7 100644
--- a/source3/auth/proto.h
+++ b/source3/auth/proto.h
@@ -147,7 +147,8 @@ NTSTATUS auth_unix_init(void);
/* The following definitions come from auth/auth_util.c */
struct tsocket_address;
-NTSTATUS make_user_info_map(struct auth_usersupplied_info **user_info,
+NTSTATUS make_user_info_map(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const char *workstation_name,
@@ -158,7 +159,8 @@ NTSTATUS make_user_info_map(struct auth_usersupplied_info **user_info,
const struct samr_Password *nt_interactive_pwd,
const char *plaintext,
enum auth_password_state password_state);
-bool make_user_info_netlogon_network(struct auth_usersupplied_info **user_info,
+bool make_user_info_netlogon_network(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const char *workstation_name,
@@ -168,7 +170,8 @@ bool make_user_info_netlogon_network(struct auth_usersupplied_info **user_info,
int lm_pwd_len,
const uchar *nt_network_pwd,
int nt_pwd_len);
-bool make_user_info_netlogon_interactive(struct auth_usersupplied_info **user_info,
+bool make_user_info_netlogon_interactive(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const char *workstation_name,
@@ -177,18 +180,21 @@ bool make_user_info_netlogon_interactive(struct auth_usersupplied_info **user_in
const uchar chal[8],
const uchar lm_interactive_pwd[16],
const uchar nt_interactive_pwd[16]);
-bool make_user_info_for_reply(struct auth_usersupplied_info **user_info,
+bool make_user_info_for_reply(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const struct tsocket_address *remote_address,
const uint8 chal[8],
DATA_BLOB plaintext_password);
-NTSTATUS make_user_info_for_reply_enc(struct auth_usersupplied_info **user_info,
+NTSTATUS make_user_info_for_reply_enc(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **user_info,
const char *smb_name,
const char *client_domain,
const struct tsocket_address *remote_address,
DATA_BLOB lm_resp, DATA_BLOB nt_resp);
-bool make_user_info_guest(const struct tsocket_address *remote_address,
+bool make_user_info_guest(TALLOC_CTX *mem_ctx,
+ const struct tsocket_address *remote_address,
struct auth_usersupplied_info **user_info);
struct samu;
@@ -249,7 +255,8 @@ NTSTATUS session_extract_session_key(const struct auth_session_info *session_inf
/* The following definitions come from auth/user_info.c */
-NTSTATUS make_user_info(struct auth_usersupplied_info **ret_user_info,
+NTSTATUS make_user_info(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **ret_user_info,
const char *smb_name,
const char *internal_username,
const char *client_domain,
diff --git a/source3/auth/user_info.c b/source3/auth/user_info.c
index 61367f9..0d5176d 100644
--- a/source3/auth/user_info.c
+++ b/source3/auth/user_info.c
@@ -41,7 +41,8 @@ static int clear_string(char *password)
Create an auth_usersupplied_data structure
****************************************************************************/
-NTSTATUS make_user_info(struct auth_usersupplied_info **ret_user_info,
+NTSTATUS make_user_info(TALLOC_CTX *mem_ctx,
+ struct auth_usersupplied_info **ret_user_info,
const char *smb_name,
const char *internal_username,
const char *client_domain,
@@ -60,10 +61,7 @@ NTSTATUS make_user_info(struct auth_usersupplied_info **ret_user_info,
DEBUG(5,("attempting to make a user_info for %s (%s)\n", internal_username, smb_name));
- /* FIXME: Have the caller provide a talloc context of the
- * correct lifetime (possibly talloc_tos(), but it depends on
- * the caller) */
- user_info = talloc_zero(NULL, struct auth_usersupplied_info);
+ user_info = talloc_zero(mem_ctx, struct auth_usersupplied_info);
if (user_info == NULL) {
DEBUG(0,("talloc failed for user_info\n"));
return NT_STATUS_NO_MEMORY;
@@ -162,12 +160,3 @@ NTSTATUS make_user_info(struct auth_usersupplied_info **ret_user_info,
*ret_user_info = user_info;
return NT_STATUS_OK;
}
-
-/***************************************************************************
- Free a user_info struct
-***************************************************************************/
-
-void free_user_info(struct auth_usersupplied_info **user_info)
-{
- TALLOC_FREE(*user_info);
-}
diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
index f600f74..de30106 100644
--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
@@ -1578,7 +1578,8 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
if (*wksname == '\\') wksname++;
/* Standard challenge/response authentication */
- if (!make_user_info_netlogon_network(&user_info,
+ if (!make_user_info_netlogon_network(talloc_tos(),
+ &user_info,
nt_username, nt_domain,
wksname,
p->remote_address,
@@ -1628,7 +1629,8 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
auth_get_ntlm_challenge(auth_context, chal);
- if (!make_user_info_netlogon_interactive(&user_info,
+ if (!make_user_info_netlogon_interactive(talloc_tos(),
+ &user_info,
nt_username, nt_domain,
nt_workstation,
p->remote_address,
@@ -1653,7 +1655,7 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
}
TALLOC_FREE(auth_context);
- free_user_info(&user_info);
+ TALLOC_FREE(user_info);
DEBUG(5,("%s: check_password returned status %s\n",
fn, nt_errstr(status)));
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 19e3066..81ef184 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -109,29 +109,6 @@ local_tests = [
for t in local_tests:
plantestsuite("samba3.smbtorture_s3.%s" % t, "s3dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "-e"])
-tests = ["--ping", "--separator",
- "--own-domain",
- "--all-domains",
- "--trusted-domains",
- "--domain-info=BUILTIN",
- "--domain-info=$DOMAIN",
- "--online-status",
- "--online-status --domain=BUILTIN",
- "--online-status --domain=$DOMAIN",
- "--check-secret --domain=$DOMAIN",
- "--change-secret --domain=$DOMAIN",
- "--check-secret --domain=$DOMAIN",
- "--online-status --domain=$DOMAIN",
- #Didn't pass yet# "--domain-users",
- "--domain-groups",
- "--name-to-sid=$DC_USERNAME",
- "--name-to-sid=$DOMAIN\\\\$DC_USERNAME",
- #Didn't pass yet# "--user-info=$USERNAME",
- "--user-groups=$DOMAIN\\\\$DC_USERNAME",
- "--authenticate=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD",
- "--allocate-uid",
- "--allocate-gid"]
-
plantestsuite("samba.vfstest.stream_depot", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/stream-depot/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
plantestsuite("samba.vfstest.xattr-tdb-1", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/xattr-tdb-1/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
plantestsuite("samba.vfstest.acl", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-acl/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
@@ -148,8 +125,31 @@ for env in ["s3dc", "member", "s3member"]:
plantestsuite("samba3.blackbox.smbclient_auth.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration])
plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$SERVER\\\\$USERNAME', '$PASSWORD', smbclient3, configuration])
+ tests = ["--ping", "--separator",
+ "--own-domain",
+ "--all-domains",
+ "--trusted-domains",
+ "--domain-info=BUILTIN",
+ "--domain-info=$DOMAIN",
+ "--online-status",
+ "--online-status --domain=BUILTIN",
+ "--online-status --domain=$DOMAIN",
+ "--check-secret --domain=$DOMAIN",
+ "--change-secret --domain=$DOMAIN",
+ "--check-secret --domain=$DOMAIN",
+ "--online-status --domain=$DOMAIN",
+ #Didn't pass yet# "--domain-users",
+ "--domain-groups",
+ "--name-to-sid=$DC_USERNAME",
+ "--name-to-sid=$DOMAIN\\\\$DC_USERNAME",
+ #Didn't pass yet# "--user-info=$USERNAME",
+ "--user-groups=$DOMAIN\\\\$DC_USERNAME",
+ "--authenticate=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD",
+ "--allocate-uid",
+ "--allocate-gid"]
+
for t in tests:
- plantestsuite("samba3.wbinfo_s3.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])
+ plantestsuite("samba3.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
plantestsuite(
"samba3.wbinfo_sids2xids.(%s:local)" % env, "%s:local" % env,
@@ -166,7 +166,7 @@ for env in ["member", "s3member"]:
env = "s3member"
t = "--krb5auth=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD"
-plantestsuite("samba3.wbinfo_s3.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])
+plantestsuite("samba3.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
plantestsuite("samba3.ntlm_auth.krb5(ktest:local) old ccache", "ktest:local", [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_krb5.sh"), valgrindify(python), samba3srcdir, ntlm_auth3, '$PREFIX/ktest/krb5_ccache-2', '$SERVER', configuration])
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index f719ec5..1a0cb5e 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -100,14 +100,14 @@ static NTSTATUS check_guest_password(const struct tsocket_address *remote_addres
auth_context->get_ntlm_challenge(auth_context,
chal);
- if (!make_user_info_guest(remote_address, &user_info)) {
+ if (!make_user_info_guest(talloc_tos(), remote_address, &user_info)) {
TALLOC_FREE(auth_context);
return NT_STATUS_NO_MEMORY;
}
nt_status = auth_check_password_session_info(auth_context,
mem_ctx, user_info, session_info);
- free_user_info(&user_info);
+ TALLOC_FREE(user_info);
TALLOC_FREE(auth_context);
return nt_status;
}
@@ -874,10 +874,11 @@ void reply_sesssetup_and_X(struct smb_request *req)
END_PROFILE(SMBsesssetupX);
return;
}
- nt_status = make_user_info_for_reply_enc(&user_info, user,
- domain,
- sconn->remote_address,
- lm_resp, nt_resp);
+ nt_status = make_user_info_for_reply_enc(talloc_tos(),
+ &user_info, user,
+ domain,
+ sconn->remote_address,
+ lm_resp, nt_resp);
if (NT_STATUS_IS_OK(nt_status)) {
nt_status = auth_check_password_session_info(negprot_auth_context,
req, user_info, &session_info);
@@ -894,7 +895,8 @@ void reply_sesssetup_and_X(struct smb_request *req)
plaintext_auth_context->get_ntlm_challenge(
plaintext_auth_context, chal);
- if (!make_user_info_for_reply(&user_info,
+ if (!make_user_info_for_reply(talloc_tos(),
+ &user_info,
user, domain,
sconn->remote_address,
chal,
@@ -910,7 +912,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
}
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list