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 | 0f0f87e6c31b468368c5a4729db892622e616cac (patch) | |
tree | 1654f01cb3ef33a516f91e6c45555ab4dd050ac8 | |
parent | 24ef6258a16e6b4673f1088d64b79bddcd268df5 (diff) | |
download | samba-0f0f87e6c31b468368c5a4729db892622e616cac.tar.gz samba-0f0f87e6c31b468368c5a4729db892622e616cac.tar.xz samba-0f0f87e6c31b468368c5a4729db892622e616cac.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
-rw-r--r-- | source/passdb/pdb_smbpasswd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/passdb/pdb_smbpasswd.c b/source/passdb/pdb_smbpasswd.c index 6f3886a4b53..89a4217c3b1 100644 --- a/source/passdb/pdb_smbpasswd.c +++ b/source/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; } |