diff options
author | Jean-François Micouleau <jfm@samba.org> | 1999-09-23 15:59:20 +0000 |
---|---|---|
committer | Jean-François Micouleau <jfm@samba.org> | 1999-09-23 15:59:20 +0000 |
commit | 31160de2b8d9397e158098adfa96aaed691614d7 (patch) | |
tree | f6c6009238eab744944a8199925c7141cebce609 /source3/passdb/sampass.c | |
parent | 1e3490dda918c9fe580c90cef6767c777c87c438 (diff) | |
download | samba-31160de2b8d9397e158098adfa96aaed691614d7.tar.gz samba-31160de2b8d9397e158098adfa96aaed691614d7.tar.bz2 samba-31160de2b8d9397e158098adfa96aaed691614d7.zip |
use gecos field to fill the full_name
don't overwrite backend values with defaults values.
J.F.
(This used to be commit a204a9adb84c41658def08cb75670995aec02baa)
Diffstat (limited to 'source3/passdb/sampass.c')
-rw-r--r-- | source3/passdb/sampass.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/source3/passdb/sampass.c b/source3/passdb/sampass.c index 28d28150ec..95e2da5605 100644 --- a/source3/passdb/sampass.c +++ b/source3/passdb/sampass.c @@ -88,6 +88,14 @@ static struct sam_passwd *getsamfile21pwent(void *vp) DEBUG(5,("getsamfile21pwent\n")); + user->full_name = NULL; + user->home_dir = NULL; + user->dir_drive = NULL; + user->logon_script = NULL; + user->profile_path = NULL; + user->acct_desc = NULL; + user->workstations = NULL; + user = pwdb_smb_to_sam(getsmbfilepwent(vp)); if (user == NULL) { @@ -122,13 +130,25 @@ static struct sam_passwd *getsamfile21pwent(void *vp) sam_logon_in_ssb = False; - user->full_name = full_name; - user->home_dir = home_dir; - user->dir_drive = home_drive; - user->logon_script = logon_script; - user->profile_path = profile_path; - user->acct_desc = acct_desc; - user->workstations = workstations; + /* + only overwrite values with defaults IIF specific backend + didn't filled the values + */ + + if (user->full_name == NULL) + user->full_name = full_name; + if (user->home_dir == NULL) + user->home_dir = home_dir; + if (user->dir_drive == NULL) + user->dir_drive = home_drive; + if (user->logon_script == NULL) + user->logon_script = logon_script; + if (user->profile_path == NULL) + user->profile_path = profile_path; + if (user->acct_desc == NULL) + user->acct_desc = acct_desc; + if (user->workstations == NULL) + user->workstations = workstations; user->unknown_str = NULL; /* don't know, yet! */ user->munged_dial = NULL; /* "munged" dial-back telephone number */ |