diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-03-20 01:46:40 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-03-20 01:46:40 +0000 |
commit | 6586062d1a803952d671f145de9373b08721dbb9 (patch) | |
tree | ec19ba14cbdd7960e6b7ea65741d8d0d8d154388 | |
parent | 5e09ffdc7cfbbf06720af55101512ca88fac7ea2 (diff) | |
download | samba-6586062d1a803952d671f145de9373b08721dbb9.tar.gz samba-6586062d1a803952d671f145de9373b08721dbb9.tar.bz2 samba-6586062d1a803952d671f145de9373b08721dbb9.zip |
Allow a zero rid in pdb_smbpasswd. When given a zero rid the pdb backend
should chose the next available RID. For smbpasswd it just means using the algorithm, but other backends can do somthing more useful.
Andrew Bartlett
(This used to be commit 0f0f87e6c31b468368c5a4729db892622e616cac)
-rw-r--r-- | source3/passdb/pdb_smbpasswd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 6f3886a4b5..89a4217c3b 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -1190,10 +1190,12 @@ static BOOL build_smb_pass (struct smb_passwd *smb_pw, const SAM_ACCOUNT *sampas smb_pw->smb_userid_set = False; DEBUG(5,("build_sam_pass: storing user without a UNIX uid or gid. \n")); } else { + uint32 rid = pdb_get_user_rid(sampass); smb_pw->smb_userid_set = True; uid = pdb_get_uid(sampass); - if (uid != pdb_user_rid_to_uid(pdb_get_user_rid(sampass))) { + /* If the user specified a RID, make sure its able to be both stored and retreived */ + if (rid && uid != pdb_user_rid_to_uid(rid)) { DEBUG(0,("build_sam_pass: Failing attempt to store user with non-uid based user RID. \n")); return False; } |