From c9f9c6505091aa1bf469c06c779040689c0737f7 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 21 Aug 2006 20:04:01 +0000 Subject: r17669: Remove RID algorithm support from unmapped users and groups when using smbpasswd (This used to be commit dde552336c732ddd6076a6a32575a37cb51aa94c) --- source3/utils/net_groupmap.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source3/utils') 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()); -- cgit