changed syntax of registry commands so keys can start with HKLM or HKU.
[tprouty/samba.git] / source / rpcclient / cmd_samr.c
index fa4c631899e711984829038ec13388c013874f01..eeb34c8f887bcd0e71ff0c6df723b1e1aa256052 100644 (file)
@@ -57,7 +57,7 @@ void cmd_sam_ntchange_pwd(struct client_info *info)
        uchar lm_hshhash[16];
        uchar lm_oldhash[16];
 
-       fstrcpy(sid   , info->dom.level5_sid);
+       sid_to_string(sid, &info->dom.level5_sid);
        fstrcpy(domain, info->dom.level5_dom);
 
        fstrcpy(srv_name, "\\\\");
@@ -99,8 +99,8 @@ void cmd_sam_ntchange_pwd(struct client_info *info)
        /* establish a connection. */
        res = res ? do_samr_chgpasswd_user(smb_cli,
                                           srv_name, smb_cli->user_name,
-                                          nt_newpass, (char*)nt_hshhash,
-                                          lm_newpass, (char*)lm_hshhash) : False;
+                                          nt_newpass, nt_hshhash,
+                                          lm_newpass, lm_hshhash) : False;
        /* close the session */
        cli_nt_session_close(smb_cli);
 
@@ -125,7 +125,7 @@ void cmd_sam_test(struct client_info *info)
        fstring sid;
        BOOL res = True;
 
-       fstrcpy(sid   , info->dom.level5_sid);
+       sid_to_string(sid, &info->dom.level5_sid);
        fstrcpy(domain, info->dom.level5_dom);
 
 /*
@@ -192,7 +192,7 @@ void cmd_sam_enum_users(struct client_info *info)
        uint32 admin_rid = 0x304; /* absolutely no idea. */
        fstring tmp;
 
-       fstrcpy(sid   , info->dom.level5_sid);
+       sid_to_string(sid, &info->dom.level5_sid);
        fstrcpy(domain, info->dom.level5_dom);
 
        if (strlen(sid) == 0)
@@ -366,7 +366,7 @@ void cmd_sam_query_user(struct client_info *info)
 
        SAM_USER_INFO_21 usr;
 
-       fstrcpy(sid   , info->dom.level5_sid);
+       sid_to_string(sid, &info->dom.level5_sid);
        fstrcpy(domain, info->dom.level5_dom);
 
        if (strlen(sid) == 0)
@@ -457,7 +457,7 @@ void cmd_sam_query_groups(struct client_info *info)
        uint32 switch_value = 2;
        uint32 admin_rid = 0x304; /* absolutely no idea. */
 
-       fstrcpy(sid   , info->dom.level5_sid);
+       sid_to_string(sid, &info->dom.level5_sid);
        fstrcpy(domain, info->dom.level5_dom);
 
        if (strlen(sid) == 0)
@@ -495,7 +495,7 @@ void cmd_sam_query_groups(struct client_info *info)
                    &info->dom.samr_pol_open_domain) : False;
 
        /* send a samr 0x8 command */
-       res = res ? do_samr_unknown_8(smb_cli,
+       res = res ? do_samr_query_dom_info(smb_cli,
                    &info->dom.samr_pol_open_domain, switch_value) : False;
 
        res = res ? do_samr_close(smb_cli,
@@ -538,7 +538,7 @@ void cmd_sam_enum_aliases(struct client_info *info)
        fstring alias_names [3];
        uint32  num_als_usrs[3];
 
-       fstrcpy(sid   , info->dom.level3_sid);
+       sid_to_string(sid, &info->dom.level3_sid);
        fstrcpy(domain, info->dom.level3_dom);
 #if 0
        fstrcpy(sid   , "S-1-5-20");