diff options
Diffstat (limited to 'source3/utils/net_sam.c')
-rw-r--r-- | source3/utils/net_sam.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c index 787bbdd502..62abef000d 100644 --- a/source3/utils/net_sam.c +++ b/source3/utils/net_sam.c @@ -817,14 +817,14 @@ static NTSTATUS map_unix_group(const struct group *grp, GROUP_MAP *pmap) fstrcpy(map.nt_name, grpname); - if (pdb_rid_algorithm()) { - rid = algorithmic_pdb_gid_to_group_rid( grp->gr_gid ); - } else { + if (pdb_capabilities() & PDB_CAP_STORE_RIDS) { if (!pdb_new_rid(&rid)) { DEBUG(3, ("Could not get a new RID for %s\n", grp->gr_name)); return NT_STATUS_ACCESS_DENIED; } + } else { + rid = algorithmic_pdb_gid_to_group_rid( grp->gr_gid ); } sid_compose(&map.sid, get_global_sam_sid(), rid); |