summaryrefslogtreecommitdiff
path: root/source3/passdb/sampassdb.c
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>1999-09-23 15:59:20 +0000
committerJean-François Micouleau <jfm@samba.org>1999-09-23 15:59:20 +0000
commit31160de2b8d9397e158098adfa96aaed691614d7 (patch)
treef6c6009238eab744944a8199925c7141cebce609 /source3/passdb/sampassdb.c
parent1e3490dda918c9fe580c90cef6767c777c87c438 (diff)
downloadsamba-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/sampassdb.c')
-rw-r--r--source3/passdb/sampassdb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/passdb/sampassdb.c b/source3/passdb/sampassdb.c
index 3f1587e1ac..14d0677ac9 100644
--- a/source3/passdb/sampassdb.c
+++ b/source3/passdb/sampassdb.c
@@ -576,8 +576,10 @@ struct smb_passwd *pwdb_sam_to_smb(struct sam_passwd *user)
struct sam_passwd *pwdb_smb_to_sam(struct smb_passwd *user)
{
static struct sam_passwd pw_buf;
+ struct passwd *pass=NULL;
static fstring nt_name;
static fstring unix_name;
+ static pstring unix_gecos;
if (user == NULL) return NULL;
@@ -598,6 +600,13 @@ struct sam_passwd *pwdb_smb_to_sam(struct smb_passwd *user)
pw_buf.smb_passwd = user->smb_passwd;
pw_buf.smb_nt_passwd = user->smb_nt_passwd;
pw_buf.acct_ctrl = user->acct_ctrl;
+
+ pass = hashed_getpwnam(unix_name);
+ if (pass != NULL)
+ {
+ pstrcpy(unix_gecos, pass->pw_gecos);
+ pw_buf.full_name=unix_gecos;
+ }
if ( user->pass_last_set_time != (time_t)-1 )
{