summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-01-05 23:41:50 +0000
committerAndrew Bartlett <abartlet@samba.org>2004-01-05 23:41:50 +0000
commit17b22be3c9b286bb20481db1ab7c5c3a09138fe9 (patch)
tree8cd7463534abb276fffa56f4aef7b1a96f06db2a /source3/utils
parent0c78e6fc3e8df9ad9480d3b1b6b2d5a3eb19bf45 (diff)
downloadsamba-17b22be3c9b286bb20481db1ab7c5c3a09138fe9.tar.gz
samba-17b22be3c9b286bb20481db1ab7c5c3a09138fe9.tar.bz2
samba-17b22be3c9b286bb20481db1ab7c5c3a09138fe9.zip
(merge from 3.0)
JHT came up with a nasty (broken) torture case in preparing examples for his book. This prompted me to look at the code that reads the unix group list. This code did a lot of name -> uid -> name -> sid translations, which caused problems. Instead, we now do just name -> sid I also cleaned up some interfaces, and client tools. Andrew Bartlett (This used to be commit cc535a6c70d8dcf677322e31b24dec58b23d80f0)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c5
-rw-r--r--source3/utils/net_rpc_samsync.c4
2 files changed, 4 insertions, 5 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 04a0330774..b28365274c 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1158,7 +1158,7 @@ rpc_group_members_internals(const DOM_SID *domain_sid, struct cli_state *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- do {
+ while (num_members > 0) {
int this_time = 512;
if (num_members < this_time)
@@ -1177,8 +1177,7 @@ rpc_group_members_internals(const DOM_SID *domain_sid, struct cli_state *cli,
num_members -= this_time;
group_rids += 512;
-
- } while (num_members > 0);
+ }
done:
return result;
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index d1c8300a49..e97a362acc 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -783,13 +783,13 @@ fetch_alias_mem(uint32 rid, SAM_ALIAS_MEM_INFO *delta, DOM_SID dom_sid)
if (sid_equal(&dom_sid, &global_sid_Builtin)) {
sid_type = SID_NAME_WKN_GRP;
- if (!get_builtin_group_from_sid(group_sid, &map, False)) {
+ if (!get_builtin_group_from_sid(&group_sid, &map, False)) {
DEBUG(0, ("Could not find builtin group %s\n", sid_string_static(&group_sid)));
return NT_STATUS_NO_SUCH_GROUP;
}
} else {
sid_type = SID_NAME_ALIAS;
- if (!get_local_group_from_sid(group_sid, &map, False)) {
+ if (!get_local_group_from_sid(&group_sid, &map, False)) {
DEBUG(0, ("Could not find local group %s\n", sid_string_static(&group_sid)));
return NT_STATUS_NO_SUCH_GROUP;
}