summaryrefslogtreecommitdiff
path: root/source/passdb/pdb_smbpasswd.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-07-26 15:30:41 +0000
committerGerald Carter <jerry@samba.org>2006-07-26 15:30:41 +0000
commit4fef4e27cf4fde794b6f5f44552a1fc885002f6b (patch)
tree744a3b354f43179a18eddbc93a4304ddf17e4e8c /source/passdb/pdb_smbpasswd.c
parent5e1a2f7e8d257aae05977cfa5bf6a8782e0c1221 (diff)
downloadsamba-4fef4e27cf4fde794b6f5f44552a1fc885002f6b.tar.gz
r17259: merging some changes that will be in a future 3.0.23b release
Diffstat (limited to 'source/passdb/pdb_smbpasswd.c')
-rw-r--r--source/passdb/pdb_smbpasswd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/passdb/pdb_smbpasswd.c b/source/passdb/pdb_smbpasswd.c
index a8a42196d48..ff2afd1a6f0 100644
--- a/source/passdb/pdb_smbpasswd.c
+++ b/source/passdb/pdb_smbpasswd.c
@@ -1189,6 +1189,7 @@ static BOOL build_sam_account(struct smbpasswd_privates *smbpasswd_state,
struct samu *sam_pass, const struct smb_passwd *pw_buf)
{
struct passwd *pwfile;
+ fstring unix_username;
if ( !sam_pass ) {
DEBUG(5,("build_sam_account: struct samu is NULL\n"));
@@ -1196,8 +1197,11 @@ static BOOL build_sam_account(struct smbpasswd_privates *smbpasswd_state,
}
/* verify the user account exists */
+
+ fstrcpy( unix_username, pw_buf->smb_name );
+ strlower_m( unix_username );
- if ( !(pwfile = getpwnam_alloc(NULL, pw_buf->smb_name)) ) {
+ if ( !(pwfile = getpwnam_alloc(NULL, unix_username )) ) {
DEBUG(0,("build_sam_account: smbpasswd database is corrupt! username %s with uid "
"%u is not in unix passwd database!\n", pw_buf->smb_name, pw_buf->smb_userid));
return False;