summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-07-03 14:36:42 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-07-03 14:36:42 +0000
commit61116049cabc292c2f2d570af4d68ddc537b91f5 (patch)
treee72d8978e409cd4664c066cc20c83e69e1ebc300 /source3/rpc_parse
parentecb86e5e88579373f3a26f744ae5cdc1a63d9d2d (diff)
downloadsamba-61116049cabc292c2f2d570af4d68ddc537b91f5.tar.gz
samba-61116049cabc292c2f2d570af4d68ddc537b91f5.tar.bz2
samba-61116049cabc292c2f2d570af4d68ddc537b91f5.zip
This patch takes the work the jerry did for beta2, and generalises it:
- The 'not implmented' checks are now done by all auth modules - the ntdomain/trustdomain/winbind modules are more presise as to what domain names they can and cannot handle - The become_root() calls are now around the winbind pipe opening only, not the entire auth call - The unix username is kept seperate from the NT username, removing the need for 'clean off the domain\' in parse_net.c - All sid->uid translations are now validated with getpwuid() to put a very basic stop to logins with 'half deleted' accounts. Andrew Bartlett (This used to be commit 85f88191b9927cc434645ef4c1eaf5ec0e8af2ec)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_net.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 43bd8cd20e..f977549a07 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -1283,7 +1283,6 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
/* need to count the number of space-delimited sids */
unsigned int i;
int num_other_sids = 0;
- char *username;
NTTIME logon_time, logoff_time, kickoff_time,
pass_last_set_time, pass_can_change_time,
@@ -1295,21 +1294,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
int len_logon_srv = strlen(logon_srv);
int len_logon_dom = strlen(logon_dom);
-
- /* do some cleanup on the user name here to deal with users from a
- trusted domain logging onto a client in our domain. If we are running
- winbindd, the trusted users will be of the form DOMAIN\user so strip
- out the domain portion. I noticed then when looking at an SMBsessionsetup&X.
- The client was sending GLASS\Administrator as the username and GLASS as the
- domain name -- jerry */
-
- if ( (username = strchr( user_name, *lp_winbind_separator() )) != NULL )
- username++;
- else
- username = user_name;
-
-
- len_user_name = strlen(username );
+ len_user_name = strlen(user_name );
len_full_name = strlen(full_name );
len_home_dir = strlen(home_dir );
len_dir_drive = strlen(dir_drive );
@@ -1372,7 +1357,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
usr->num_other_sids = num_other_sids;
usr->buffer_other_sids = (num_other_sids != 0) ? 1 : 0;
- init_unistr2(&usr->uni_user_name, username, len_user_name);
+ init_unistr2(&usr->uni_user_name, user_name, len_user_name);
init_unistr2(&usr->uni_full_name, full_name, len_full_name);
init_unistr2(&usr->uni_logon_script, logon_script, len_logon_script);
init_unistr2(&usr->uni_profile_path, profile_path, len_profile_path);