Another round of GUID->struct uuid.
authorJim McDonough <jmcd@samba.org>
Thu, 30 Oct 2003 17:07:32 +0000 (17:07 +0000)
committerJim McDonough <jmcd@samba.org>
Thu, 30 Oct 2003 17:07:32 +0000 (17:07 +0000)
Takes care of the lsass pipe
(This used to be commit 3dca3efa4b427fa3094a8cd392fe5744b5f6f6a8)

source3/include/rpc_lsa.h
source3/rpc_client/cli_lsarpc.c
source3/rpc_parse/parse_lsa.c
source3/rpc_server/srv_lsa_nt.c
source3/rpcclient/cmd_lsarpc.c

index 2064a38056e7b9d16109a9f49f2bc39b8413c6cf..43ffa37d59729f1a18fc7c183d9393f22f227b97 100644 (file)
@@ -275,7 +275,7 @@ typedef struct lsa_dns_dom_info
        UNIHDR  hdr_dns_dom_name;
        UNIHDR  hdr_forest_name;
 
-       GUID       dom_guid; /* domain GUID */
+       struct uuid dom_guid; /* domain GUID */
 
        UNISTR2 uni_nb_dom_name;
        UNISTR2 uni_dns_dom_name;
index ab4fbad6131357c30cdcd33b8acaf2081529fdbc..163e847922b2064e66209a58b07b2911228aa54f 100644 (file)
@@ -537,7 +537,8 @@ NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx,
 NTSTATUS cli_lsa_query_info_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
                                    POLICY_HND *pol, uint16 info_class, 
                                    fstring domain_name, fstring dns_name,
-                                   fstring forest_name, GUID *domain_guid,
+                                   fstring forest_name, 
+                                   struct uuid *domain_guid, 
                                    DOM_SID *domain_sid)
 {
        prs_struct qbuf, rbuf;
@@ -599,7 +600,7 @@ NTSTATUS cli_lsa_query_info_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
                                 sizeof(fstring) - 1);
        }
        
-       memcpy(domain_guid, &r.info.dns_dom_info.dom_guid, sizeof(GUID));
+       memcpy(domain_guid, &r.info.dns_dom_info.dom_guid,sizeof(struct uuid));
 
        if (r.info.dns_dom_info.ptr_dom_sid != 0) {
                *domain_sid = r.info.dns_dom_info.dom_sid.sid;
index f960345fe74a2ea8fa95d9c7e7ebe928d909923c..992433f4bb9ff4a0c56f4615bfce5b6407fa0554 100644 (file)
@@ -2142,7 +2142,7 @@ BOOL lsa_io_dns_dom_info(const char *desc, LSA_DNS_DOM_INFO *info,
 
        if(!prs_align(ps))
                return False;
-       if (!prs_uint8s(False, "dom_guid", ps, depth, info->dom_guid.info, GUID_SIZE))
+       if ( !smb_io_uuid("dom_guid", &info->dom_guid, ps, depth) )
                return False;
 
        if(!prs_align(ps))
index 0a8ad404cb3ccfd9d5c811e33d3c4c18c10815cd..db5c8c83b005124321a885fa736d1101230b0708 100644 (file)
@@ -348,7 +348,7 @@ static NTSTATUS lsa_get_generic_sd(TALLOC_CTX *mem_ctx, SEC_DESC **sd, size_t *s
 
 static void init_dns_dom_info(LSA_DNS_DOM_INFO *r_l, const char *nb_name,
                              const char *dns_name, const char *forest_name,
-                             GUID *dom_guid, DOM_SID *dom_sid)
+                             struct uuid *dom_guid, DOM_SID *dom_sid)
 {
        if (nb_name && *nb_name) {
                init_unistr2(&r_l->uni_nb_dom_name, nb_name, UNI_FLAGS_NONE);
@@ -373,7 +373,7 @@ static void init_dns_dom_info(LSA_DNS_DOM_INFO *r_l, const char *nb_name,
 
        /* how do we init the guid ? probably should write an init fn */
        if (dom_guid) {
-               memcpy(&r_l->dom_guid, dom_guid, sizeof(GUID));
+               memcpy(&r_l->dom_guid, dom_guid, sizeof(struct uuid));
        }
        
        if (dom_sid) {
@@ -1219,7 +1219,7 @@ NTSTATUS _lsa_query_info2(pipes_struct *p, LSA_Q_QUERY_INFO2 *q_u, LSA_R_QUERY_I
        char *dns_name = NULL;
        char *forest_name = NULL;
        DOM_SID *sid = NULL;
-       GUID guid;
+       struct uuid guid;
        fstring dnsdomname;
 
        ZERO_STRUCT(guid);
index d4509eae444d2abc7e581722fdacff11b53e82bb..217e6b1d68a8f25cab7fc15789ab84972d4fa552 100644 (file)
@@ -69,7 +69,7 @@ static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli,
        POLICY_HND pol;
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
        DOM_SID dom_sid;
-       UUID_FLAT dom_guid;
+       struct uuid dom_guid;
        fstring sid_str, domain_name="", dns_name="", forest_name="";
        uint32 info_class = 3;
 
@@ -124,8 +124,7 @@ static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli,
 
        if (info_class == 12) {
                printf("domain GUID is %s\n",
-                      smb_uuid_string_static(
-                              smb_uuid_unpack_static(dom_guid)));
+                      smb_uuid_string_static(dom_guid));
        }
  done:
        return result;