From f650b65800c6d6c09cc2d59d7afe728fcb819a5f Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Thu, 24 Sep 1998 20:02:56 +0000 Subject: this fixes the last of the issues where USRMGR.EXE and SRVMGR.EXE were failing. running these two programs on a samba pdc now work. parse_samr.c: - removed __LINE__ from debug macros. - removed call to SMB_ASSERT_ARRAY() in samr_r_query_usergroups. the DOM_GID array is a malloc'd array (by make_dom_gids) not a static array. srv_samr.c: - replaced all "struct smb_passwd"s with sam_passwds instead. there were uid to rid confusion issues (assumptions that uids were equal to rids). - #if 0'd the pdb_rid_is_user() call which, given the above corrections, would probably work now. srv_util.c: - replaced "struct smb_passwd" with sam_passwd in lookup_user_rid, as assumptions were being made that uids were equal to rids. (This used to be commit 3f98697cd5203fba07518d7c777ba19644e35b45) --- source3/rpc_server/srv_util.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source3/rpc_server/srv_util.c') diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c index 68a4f79f0b..3c0fc9271e 100644 --- a/source3/rpc_server/srv_util.c +++ b/source3/rpc_server/srv_util.c @@ -478,18 +478,17 @@ uint32 lookup_alias_rid(char *alias_name, uint32 *rid) ********************************************************************/ uint32 lookup_user_rid(char *user_name, uint32 *rid) { - struct smb_passwd *smb_pass; + struct sam_passwd *sam_pass; (*rid) = 0; /* find the user account */ become_root(True); - smb_pass = getsmbpwnam(user_name); + sam_pass = getsam21pwnam(user_name); unbecome_root(True); - if (smb_pass != NULL) + if (sam_pass != NULL) { - /* lkclXXXX SHOULD use name_to_rid() here! */ - (*rid) = smb_pass->smb_userid; + (*rid) = sam_pass->user_rid; return 0x0; } -- cgit