mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
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 0f0f87e6c3
)
This commit is contained in:
parent
5e09ffdc7c
commit
6586062d1a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user