diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-16 21:14:53 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-16 21:14:53 +0000 |
commit | cc8df5ce4955fc721e11ff08de052554894d963a (patch) | |
tree | 65cec4affde53426067ec8e70313006900df44e5 /source3/passdb | |
parent | 6b56ebb7cf48b350ba4e9fd5c61a8900b805a001 (diff) | |
download | samba-cc8df5ce4955fc721e11ff08de052554894d963a.tar.gz samba-cc8df5ce4955fc721e11ff08de052554894d963a.tar.bz2 samba-cc8df5ce4955fc721e11ff08de052554894d963a.zip |
attempting to get nt5 wksta to join domain.
1) had to fix samr "create user" and "set user info" (level 23).
2) had to fix netlogon enum trust domains
3) registry key needed \\ in it not \.
(This used to be commit 70b2c1ecbb4fbbb86fea676c80754485aae5ab13)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/sampassdb.c | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/source3/passdb/sampassdb.c b/source3/passdb/sampassdb.c index 14d0677ac9..bca5bfa45f 100644 --- a/source3/passdb/sampassdb.c +++ b/source3/passdb/sampassdb.c @@ -349,12 +349,12 @@ struct sam_disp_info *pwdb_sam_to_dispinfo(struct sam_passwd *user) return &disp_info; } -static void select_name(fstring string, char **name, const UNISTR2 *from) +static void select_name(fstring *string, char **name, const UNISTR2 *from) { if (from->buffer != 0) { - unistr2_to_ascii(string, from, sizeof(string)); - *name = string; + unistr2_to_ascii(*string, from, sizeof(*string)); + *name = *string; } } @@ -376,18 +376,41 @@ void copy_id23_to_sam_passwd(struct sam_passwd *to, const SAM_USER_INFO_23 *from if (from == NULL || to == NULL) return; - memcpy(to, from, sizeof(*from)); - - select_name(nt_name , &to->nt_name , &from->uni_user_name ); - select_name(full_name , &to->full_name , &from->uni_full_name ); - select_name(home_dir , &to->home_dir , &from->uni_home_dir ); - select_name(dir_drive , &to->dir_drive , &from->uni_dir_drive ); - select_name(logon_script, &to->logon_script, &from->uni_logon_script); - select_name(profile_path, &to->profile_path, &from->uni_profile_path); - select_name(acct_desc , &to->acct_desc , &from->uni_acct_desc ); - select_name(workstations, &to->workstations, &from->uni_workstations); - select_name(unknown_str , &to->unknown_str , &from->uni_unknown_str ); - select_name(munged_dial , &to->munged_dial , &from->uni_munged_dial ); + to->logon_time = from->logon_time; + to->logoff_time = from->logoff_time; + to->kickoff_time = from->kickoff_time; + to->pass_last_set_time = from->pass_last_set_time; + to->pass_can_change_time = from->pass_can_change_time; + to->pass_must_change_time = from->pass_must_change_time; + + select_name(&nt_name , &to->nt_name , &from->uni_user_name ); + select_name(&full_name , &to->full_name , &from->uni_full_name ); + select_name(&home_dir , &to->home_dir , &from->uni_home_dir ); + select_name(&dir_drive , &to->dir_drive , &from->uni_dir_drive ); + select_name(&logon_script, &to->logon_script, &from->uni_logon_script); + select_name(&profile_path, &to->profile_path, &from->uni_profile_path); + select_name(&acct_desc , &to->acct_desc , &from->uni_acct_desc ); + select_name(&workstations, &to->workstations, &from->uni_workstations); + select_name(&unknown_str , &to->unknown_str , &from->uni_unknown_str ); + select_name(&munged_dial , &to->munged_dial , &from->uni_munged_dial ); + + to->unix_uid = (uid_t)-1; + to->unix_gid = (gid_t)-1; + to->user_rid = from->user_rid; + to->group_rid = from->group_rid; + + to->smb_passwd = NULL; + to->smb_nt_passwd = NULL; + + to->acct_ctrl = from->acb_info; + to->unknown_3 = from->unknown_3; + + to->logon_divs = from->logon_divs; + to->hours_len = from->logon_hrs.len; + memcpy(to->hours, from->logon_hrs.hours, MAX_HOURS_LEN); + + to->unknown_5 = from->unknown_5; + to->unknown_6 = from->unknown_6; } |