summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2003-03-14 17:12:40 +0000
committerRafal Szczesniak <mimir@samba.org>2003-03-14 17:12:40 +0000
commite583dd6278fedf9ad45b551dccf94fbe6c785119 (patch)
tree1dad0c48733998e6ef28dd7a8379cfdb13118b9e /source3/auth
parent33c8a6779d490bd1aa722231a59a3b68343dbc17 (diff)
downloadsamba-e583dd6278fedf9ad45b551dccf94fbe6c785119.tar.gz
samba-e583dd6278fedf9ad45b551dccf94fbe6c785119.tar.bz2
samba-e583dd6278fedf9ad45b551dccf94fbe6c785119.zip
Fresh meat in trusted domains code:
- packing/unpacking utility functions for trusted domain password struct; can be used to prepare buffer to store in secrets.tdb or (soon) passdb backend - similiar functions for DOM_SID - respectively modified secrets_(fetch|store) routines - new auth mapping code utilising introduced is_trusted_domain function - added tdb (un)packing of single bytes Rafal (This used to be commit 5281ee7e84421b9be746aed2f1718ceaf2a2fe3d)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 7d85153bd0..a6ad2b883b 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -227,27 +227,13 @@ NTSTATUS make_user_info_map(auth_usersupplied_info **user_info,
domain = client_domain;
- if ((smb_name) && (*smb_name)) { /* Don't do this for guests */
- char *user = NULL;
- if (asprintf(&user, "%s%s%s",
- client_domain, lp_winbind_separator(),
- smb_name) < 0) {
- DEBUG(0, ("make_user_info_map: asprintf() failed!\n"));
- return NT_STATUS_NO_MEMORY;
- }
-
- DEBUG(5, ("make_user_info_map: testing for user %s\n", user));
-
- if (Get_Pwnam(user) == NULL) {
- DEBUG(5, ("make_user_info_map: test for user %s failed\n", user));
- domain = lp_workgroup();
- DEBUG(5, ("make_user_info_map: trusted domain %s doesn't appear to exist, using %s\n",
- client_domain, domain));
- } else {
- DEBUG(5, ("make_user_info_map: using trusted domain %s\n", domain));
- }
- SAFE_FREE(user);
+ if (is_trusted_domain(domain)) {
+ return make_user_info(user_info, smb_name, internal_username,
+ client_domain, domain, wksta_name,
+ lm_pwd, nt_pwd, plaintext, ntlmssp_flags,
+ encrypted);
}
+
} else {
domain = lp_workgroup();
}