diff options
author | Jeremy Allison <jra@samba.org> | 2002-11-07 07:20:33 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-11-07 07:20:33 +0000 |
commit | aecd050d38998f664492363e46b491245aafb8de (patch) | |
tree | ae9eb2d9bc767aa72da3285281e005da3ad6cb87 | |
parent | bf3eda82499c532d6d859673a7bae21e4db16d34 (diff) | |
download | samba-aecd050d38998f664492363e46b491245aafb8de.tar.gz samba-aecd050d38998f664492363e46b491245aafb8de.tar.bz2 samba-aecd050d38998f664492363e46b491245aafb8de.zip |
Keeping 3.0 in sync....
Jeremy.
(This used to be commit 6d98ac2634d17f7f8fb17c43923ddd2b1e723d86)
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 10fba52be8..583d50cf4f 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -162,7 +162,7 @@ int rpc_samdump(int argc, const char **argv) } if (!secrets_fetch_trust_account_password(lp_workgroup(), trust_password, NULL)) { - d_printf("Could not retrieve domain trust secret"); + d_printf("Could not retrieve domain trust secret\n"); goto fail; } @@ -267,6 +267,7 @@ fetch_account_info(uint32 rid, SAM_ACCOUNT_INFO *delta) SAM_ACCOUNT *sam_account=NULL; GROUP_MAP map; struct group *grp; + DOM_SID sid; fstrcpy(account, unistr2_static(&delta->uni_acct_name)); d_printf("Creating account: %s\n", account); @@ -319,12 +320,14 @@ fetch_account_info(uint32 rid, SAM_ACCOUNT_INFO *delta) sam_account_from_delta(sam_account, delta); if (!pdb_add_sam_account(sam_account)) { - DEBUG(1, ("SAM Account for %s already existed, updating\n", + DEBUG(1, ("SAM Account for %s already exists, updating\n", account)); pdb_update_sam_account(sam_account); } - if (!pdb_getgrsid(&map, *pdb_get_group_sid(sam_account), False)) { + sid = *pdb_get_group_sid(sam_account); + + if (!pdb_getgrsid(&map, sid, False)) { DEBUG(0, ("Primary group of %s has no mapping!\n", pdb_get_username(sam_account))); pdb_free_sam(&sam_account); @@ -332,7 +335,8 @@ fetch_account_info(uint32 rid, SAM_ACCOUNT_INFO *delta) } if (!(grp = getgrgid(map.gid))) { - DEBUG(0, ("Could not find unix group %d\n", map.gid)); + DEBUG(0, ("Could not find unix group %d for user %s (group SID=%s)\n", + map.gid, pdb_get_username(sam_account), sid_string_static(&sid))); pdb_free_sam(&sam_account); return NT_STATUS_NO_SUCH_GROUP; } @@ -450,8 +454,8 @@ fetch_group_mem_info(uint32 rid, SAM_GROUP_MEM_INFO *delta) sid_append_rid(&member_sid, delta->rids[i]); if (!pdb_getsampwsid(member, &member_sid)) { - DEBUG(1, ("Found bogus group member: %d\n", - delta->rids[i])); + DEBUG(1, ("Found bogus group member: %d (member_sid=%s group=%s)\n", + delta->rids[i], sid_string_static(&member_sid), grp->gr_name)); pdb_free_sam(&member); continue; } @@ -680,7 +684,7 @@ int rpc_vampire(int argc, const char **argv) if (!secrets_fetch_trust_account_password(lp_workgroup(), trust_password, NULL)) { - d_printf("Could not retrieve domain trust secret"); + d_printf("Could not retrieve domain trust secret\n"); goto fail; } |