bugs in rpcclient. add_aliasmem uses a DOM_SID2 not a DOM_SID.
authorLuke Leighton <lkcl@samba.org>
Mon, 7 Dec 1998 21:32:02 +0000 (21:32 +0000)
committerLuke Leighton <lkcl@samba.org>
Mon, 7 Dec 1998 21:32:02 +0000 (21:32 +0000)
(This used to be commit 8a85d7abed317fd06e3e0026d4b9e088311eede4)

source3/include/rpc_samr.h
source3/rpc_parse/parse_samr.c
source3/rpcclient/cmd_samr.c

index a3090cefd6acfc37cf69217b9d757f562d773a7b..bfa0218fd3574544a8f3d7baa9fe879c859e2c43 100644 (file)
@@ -1234,7 +1234,7 @@ typedef struct q_samr_add_alias_mem_info
 {
        POLICY_HND alias_pol;       /* policy handle */
 
-       DOM_SID sid; /* member sid to be added to the alias */
+       DOM_SID2 sid; /* member sid to be added to the alias */
 
 } SAMR_Q_ADD_ALIASMEM;
 
index bfcc811aeaf2e98386b85e27a5894d54cb546044..52bcb4ff77d3e353f5d05fa40db87e16d118a4a1 100644 (file)
@@ -2959,7 +2959,7 @@ void make_samr_q_add_aliasmem(SAMR_Q_ADD_ALIASMEM *q_u, POLICY_HND *hnd,
        DEBUG(5,("make_samr_q_add_aliasmem\n"));
 
        memcpy(&(q_u->alias_pol), hnd, sizeof(q_u->alias_pol));
-       sid_copy(&q_u->sid, sid);
+       make_dom_sid2(&q_u->sid, sid);
 }
 
 
@@ -2975,8 +2975,8 @@ void samr_io_q_add_aliasmem(char *desc,  SAMR_Q_ADD_ALIASMEM *q_u, prs_struct *p
 
        prs_align(ps);
 
-       smb_io_pol_hnd("alias_pol", &(q_u->alias_pol), ps, depth); 
-       smb_io_dom_sid("sid      ", &(q_u->sid      ), ps, depth); 
+       smb_io_pol_hnd ("alias_pol", &(q_u->alias_pol), ps, depth); 
+       smb_io_dom_sid2("sid      ", &(q_u->sid      ), ps, depth); 
 }
 
 /*******************************************************************
index 31f74906db0b77995315edfcd408fbc5b1997fb7..e815a2b4d3f042438abb1ce12ced1fe19fb411c8 100644 (file)
@@ -382,8 +382,8 @@ void cmd_sam_add_aliasmem(struct client_info *info)
        uint32 alias_rid;
        const char **names = NULL;
        uint32 num_names = 0;
-       DOM_SID *sids; 
-       uint32 num_sids;
+       DOM_SID *sids = NULL
+       uint32 num_sids = 0;
        int i;
 
        sid_copy(&sid1, &info->dom.level5_sid);
@@ -424,17 +424,17 @@ void cmd_sam_add_aliasmem(struct client_info *info)
        res3 = res3 ? cli_nt_session_open(smb_cli, PIPE_LSARPC, &fnum_lsa) : False;
 
        /* lookup domain controller; receive a policy handle */
-       res3 = res3 ? lsa_open_policy(smb_cli, fnum,
+       res3 = res3 ? lsa_open_policy(smb_cli, fnum_lsa,
                                srv_name,
                                &info->dom.lsa_info_pol, True) : False;
 
        /* send lsa lookup sids call */
-       res4 = res3 ? lsa_lookup_names(smb_cli, fnum, 
+       res4 = res3 ? lsa_lookup_names(smb_cli, fnum_lsa
                                       &info->dom.lsa_info_pol,
                                       num_names, names, 
                                       &sids, &num_sids) : False;
 
-       res3 = res3 ? lsa_close(smb_cli, fnum, &info->dom.lsa_info_pol) : False;
+       res3 = res3 ? lsa_close(smb_cli, fnum_lsa, &info->dom.lsa_info_pol) : False;
 
        cli_nt_session_close(smb_cli, fnum_lsa);
 
@@ -1557,17 +1557,17 @@ void cmd_sam_enum_aliases(struct client_info *info)
                                res3 = res3 ? cli_nt_session_open(smb_cli, PIPE_LSARPC, &fnum_lsa) : False;
 
                                /* lookup domain controller; receive a policy handle */
-                               res3 = res3 ? lsa_open_policy(smb_cli, fnum,
+                               res3 = res3 ? lsa_open_policy(smb_cli, fnum_lsa,
                                                        srv_name,
                                                        &info->dom.lsa_info_pol, True) : False;
 
                                /* send lsa lookup sids call */
-                               res4 = res3 ? lsa_lookup_sids(smb_cli, fnum, 
+                               res4 = res3 ? lsa_lookup_sids(smb_cli, fnum_lsa
                                                               &info->dom.lsa_info_pol,
                                                               num_aliases, sids, 
                                                               &names, &num_names) : False;
 
-                               res3 = res3 ? lsa_close(smb_cli, fnum, &info->dom.lsa_info_pol) : False;
+                               res3 = res3 ? lsa_close(smb_cli, fnum_lsa, &info->dom.lsa_info_pol) : False;
 
                                cli_nt_session_close(smb_cli, fnum_lsa);