summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-08-21 20:04:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:45 -0500
commitc9f9c6505091aa1bf469c06c779040689c0737f7 (patch)
tree8effd51d5e7953bc59455f649a2713afe1700f45 /source3/utils
parente7a49f2b25be3d893a516d6cc3c205b58ff0c20c (diff)
downloadsamba-c9f9c6505091aa1bf469c06c779040689c0737f7.tar.gz
samba-c9f9c6505091aa1bf469c06c779040689c0737f7.tar.bz2
samba-c9f9c6505091aa1bf469c06c779040689c0737f7.zip
r17669: Remove RID algorithm support from unmapped users and groups
when using smbpasswd (This used to be commit dde552336c732ddd6076a6a32575a37cb51aa94c)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_groupmap.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c
index df13a93de6..4708efa908 100644
--- a/source3/utils/net_groupmap.c
+++ b/source3/utils/net_groupmap.c
@@ -289,7 +289,7 @@ static int net_groupmap_add(int argc, const char **argv)
if ( (rid == 0) && (string_sid[0] == '\0') ) {
d_printf("No rid or sid specified, choosing a RID\n");
if (pdb_rid_algorithm()) {
- rid = pdb_gid_to_group_rid(gid);
+ rid = algorithmic_pdb_gid_to_group_rid(gid);
} else {
if (!pdb_new_rid(&rid)) {
d_printf("Could not get new RID\n");
@@ -573,7 +573,14 @@ static int net_groupmap_set(int argc, const char **argv)
map.gid = grp->gr_gid;
if (opt_rid == 0) {
- opt_rid = pdb_gid_to_group_rid(map.gid);
+ if ( pdb_rid_algorithm() )
+ opt_rid = algorithmic_pdb_gid_to_group_rid(map.gid);
+ else {
+ if ( !pdb_new_rid((uint32*)&opt_rid) ) {
+ d_fprintf( stderr, "Could not allocate new RID\n");
+ return -1;
+ }
+ }
}
sid_copy(&map.sid, get_global_sam_sid());