diff options
author | Luke Leighton <lkcl@samba.org> | 1999-02-09 16:01:28 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-02-09 16:01:28 +0000 |
commit | 3b12477f34a4311235c7c0b2e9a9cdc9f5a4f0e9 (patch) | |
tree | a9b20649c4cdf399f35b84afe1298cd9cb9a58ee /source3/passdb | |
parent | bfff648f382169321bbefec4f96bdfd0438b9168 (diff) | |
download | samba-3b12477f34a4311235c7c0b2e9a9cdc9f5a4f0e9.tar.gz samba-3b12477f34a4311235c7c0b2e9a9cdc9f5a4f0e9.tar.bz2 samba-3b12477f34a4311235c7c0b2e9a9cdc9f5a4f0e9.zip |
pwdb_smb_to_sam was not returning NULL for nt name so that
pwdb_sam_map_names() was using a "blank" static string instead of
a NULL pointer for nt names. NULL means over-ride, so the nt name
got left as "blank".
this causes nt clients to terminate with extreme prejudice.
(This used to be commit ddd350198202d6a1d2c715b3dce7db3a5d76a63a)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/sampassdb.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/source3/passdb/sampassdb.c b/source3/passdb/sampassdb.c index 25be7b9ec5..45fc07daf8 100644 --- a/source3/passdb/sampassdb.c +++ b/source3/passdb/sampassdb.c @@ -337,10 +337,16 @@ struct smb_passwd *pwdb_sam_to_smb(struct sam_passwd *user) pwdb_init_smb(&pw_buf); - fstrcpy(nt_name , user->nt_name); - fstrcpy(unix_name, user->unix_name); - pw_buf.nt_name = nt_name; - pw_buf.unix_name = unix_name; + if (user->nt_name != NULL) + { + fstrcpy(nt_name , user->nt_name); + pw_buf.nt_name = nt_name; + } + if (user->unix_name != NULL) + { + fstrcpy(unix_name, user->unix_name); + pw_buf.unix_name = unix_name; + } pw_buf.unix_uid = user->unix_uid; pw_buf.user_rid = user->user_rid; pw_buf.smb_passwd = user->smb_passwd; @@ -366,10 +372,16 @@ struct sam_passwd *pwdb_smb_to_sam(struct smb_passwd *user) pwdb_init_sam(&pw_buf); - fstrcpy(nt_name , user->nt_name); - fstrcpy(unix_name, user->unix_name); - pw_buf.nt_name = nt_name; - pw_buf.unix_name = unix_name; + if (user->nt_name != NULL) + { + fstrcpy(nt_name , user->nt_name); + pw_buf.nt_name = nt_name; + } + if (user->unix_name != NULL) + { + fstrcpy(unix_name, user->unix_name); + pw_buf.unix_name = unix_name; + } pw_buf.unix_uid = user->unix_uid; pw_buf.user_rid = user->user_rid; pw_buf.smb_passwd = user->smb_passwd; |