svn commit: samba r18654 - in branches/SAMBA_3_0/source: include lib libmsrpc passdb printing rpc_client rpc_parse rpc_server

jelmer at samba.org jelmer at samba.org
Tue Sep 19 00:12:17 GMT 2006


Author: jelmer
Date: 2006-09-19 00:12:11 +0000 (Tue, 19 Sep 2006)
New Revision: 18654

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18654

Log:
Rename "struct uuid" => "struct GUID" for consistency.

Modified:
   branches/SAMBA_3_0/source/include/rpc_dce.h
   branches/SAMBA_3_0/source/include/rpc_ds.h
   branches/SAMBA_3_0/source/include/rpc_lsa.h
   branches/SAMBA_3_0/source/include/rpc_netlogon.h
   branches/SAMBA_3_0/source/include/rpc_secdes.h
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/lib/secace.c
   branches/SAMBA_3_0/source/lib/util_uuid.c
   branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c
   branches/SAMBA_3_0/source/passdb/secrets.c
   branches/SAMBA_3_0/source/printing/nt_printing.c
   branches/SAMBA_3_0/source/rpc_client/cli_lsarpc.c
   branches/SAMBA_3_0/source/rpc_client/cli_netlogon.c
   branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
   branches/SAMBA_3_0/source/rpc_parse/parse_net.c
   branches/SAMBA_3_0/source/rpc_server/srv_pipe.c
   branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/rpc_dce.h
===================================================================
--- branches/SAMBA_3_0/source/include/rpc_dce.h	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/include/rpc_dce.h	2006-09-19 00:12:11 UTC (rev 18654)
@@ -126,7 +126,7 @@
 
 /* RPC_IFACE */
 typedef struct rpc_iface_info {
-	struct uuid uuid;  /* 16 bytes of rpc interface identification */
+	struct GUID uuid;  /* 16 bytes of rpc interface identification */
 	uint32 version;    /* the interface version number */
 } RPC_IFACE;
 

Modified: branches/SAMBA_3_0/source/include/rpc_ds.h
===================================================================
--- branches/SAMBA_3_0/source/include/rpc_ds.h	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/include/rpc_ds.h	2006-09-19 00:12:11 UTC (rev 18654)
@@ -68,7 +68,7 @@
 	uint32		dnsname_ptr;
 	uint32		forestname_ptr;
 	
-	struct uuid	domain_guid;
+	struct GUID	domain_guid;
 	
 	UNISTR2	netbios_domain;
 
@@ -114,7 +114,7 @@
 	uint32		trust_type;
 	uint32		trust_attributes;
 	uint32		sid_ptr;
-	struct uuid	guid;
+	struct GUID	guid;
 	
 	UNISTR2		netbios_domain;
 	UNISTR2		dns_domain;
@@ -128,7 +128,7 @@
 	uint32		parent_index;
 	uint32		trust_type;
 	uint32		trust_attributes;
-	struct uuid	guid;
+	struct GUID	guid;
 	
 	DOM_SID	sid;
 	char *netbios_domain;

Modified: branches/SAMBA_3_0/source/include/rpc_lsa.h
===================================================================
--- branches/SAMBA_3_0/source/include/rpc_lsa.h	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/include/rpc_lsa.h	2006-09-19 00:12:11 UTC (rev 18654)
@@ -174,7 +174,7 @@
 	UNIHDR  hdr_dns_dom_name;
 	UNIHDR  hdr_forest_name;
 
-	struct uuid dom_guid; /* domain GUID */
+	struct GUID dom_guid; /* domain GUID */
 
 	UNISTR2 uni_nb_dom_name;
 	UNISTR2 uni_dns_dom_name;

Modified: branches/SAMBA_3_0/source/include/rpc_netlogon.h
===================================================================
--- branches/SAMBA_3_0/source/include/rpc_netlogon.h	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/include/rpc_netlogon.h	2006-09-19 00:12:11 UTC (rev 18654)
@@ -1031,9 +1031,9 @@
 	uint32 ptr_domain_name;
 	UNISTR2 uni_domain_name;
 	uint32 ptr_domain_guid;
-	struct uuid *domain_guid;
+	struct GUID *domain_guid;
 	uint32 ptr_site_guid;
-	struct uuid *site_guid;
+	struct GUID *site_guid;
 	uint32 flags;
 } NET_Q_DSR_GETDCNAME;
 
@@ -1044,7 +1044,7 @@
 	uint32 ptr_dc_address;
 	UNISTR2 uni_dc_address;
 	int32 dc_address_type;
-	struct uuid domain_guid;
+	struct GUID domain_guid;
 	uint32 ptr_domain_name;
 	UNISTR2 uni_domain_name;
 	uint32 ptr_forest_name;

Modified: branches/SAMBA_3_0/source/include/rpc_secdes.h
===================================================================
--- branches/SAMBA_3_0/source/include/rpc_secdes.h	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/include/rpc_secdes.h	2006-09-19 00:12:11 UTC (rev 18654)
@@ -89,8 +89,8 @@
 
 	/* this stuff may be present when type is XXXX_TYPE_XXXX_OBJECT */
 	uint32  obj_flags; /* xxxx_ACE_OBJECT_xxxx e.g present/inherited present etc */
-	struct uuid obj_guid;  /* object GUID */
-	struct uuid inh_guid;  /* inherited object GUID */		
+	struct GUID obj_guid;  /* object GUID */
+	struct GUID inh_guid;  /* inherited object GUID */		
         /* eof object stuff */
 
 	DOM_SID trustee;

Modified: branches/SAMBA_3_0/source/include/smb.h
===================================================================
--- branches/SAMBA_3_0/source/include/smb.h	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/include/smb.h	2006-09-19 00:12:11 UTC (rev 18654)
@@ -1817,13 +1817,6 @@
 /* EA to use for DOS attributes */
 #define SAMBA_XATTR_DOS_ATTRIB "user.DOSATTRIB"
 
-struct uuid {
-	uint32 time_low;
-	uint16 time_mid;
-	uint16 time_hi_and_version;
-	uint8  clock_seq[2];
-	uint8  node[6];
-};
 #define UUID_SIZE 16
 
 #define UUID_FLAT_SIZE 16

Modified: branches/SAMBA_3_0/source/lib/secace.c
===================================================================
--- branches/SAMBA_3_0/source/lib/secace.c	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/lib/secace.c	2006-09-19 00:12:11 UTC (rev 18654)
@@ -48,8 +48,8 @@
 	ace_dest->size  = ace_src->size;
 	ace_dest->info.mask = ace_src->info.mask;
 	ace_dest->obj_flags = ace_src->obj_flags;
-	memcpy(&ace_dest->obj_guid, &ace_src->obj_guid, sizeof(struct uuid));
-	memcpy(&ace_dest->inh_guid, &ace_src->inh_guid, sizeof(struct uuid));
+	memcpy(&ace_dest->obj_guid, &ace_src->obj_guid, sizeof(struct GUID));
+	memcpy(&ace_dest->inh_guid, &ace_src->inh_guid, sizeof(struct GUID));
 	sid_copy(&ace_dest->trustee, &ace_src->trustee);
 }
 

Modified: branches/SAMBA_3_0/source/lib/util_uuid.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util_uuid.c	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/lib/util_uuid.c	2006-09-19 00:12:11 UTC (rev 18654)
@@ -27,7 +27,7 @@
 #define TIME_OFFSET_HIGH 0x01B21DD2
 #define TIME_OFFSET_LOW  0x13814000
 
-void smb_uuid_pack(const struct uuid uu, UUID_FLAT *ptr)
+void smb_uuid_pack(const struct GUID uu, UUID_FLAT *ptr)
 {
 	SIVAL(ptr->info, 0, uu.time_low);
 	SSVAL(ptr->info, 4, uu.time_mid);
@@ -36,7 +36,7 @@
 	memcpy(ptr->info+10, uu.node, 6);
 }
 
-void smb_uuid_unpack(const UUID_FLAT in, struct uuid *uu)
+void smb_uuid_unpack(const UUID_FLAT in, struct GUID *uu)
 {
 	uu->time_low = IVAL(in.info, 0);
 	uu->time_mid = SVAL(in.info, 4);
@@ -45,15 +45,15 @@
 	memcpy(uu->node, in.info+10, 6);
 }
 
-struct uuid smb_uuid_unpack_static(const UUID_FLAT in)
+struct GUID smb_uuid_unpack_static(const UUID_FLAT in)
 {
-	static struct uuid uu;
+	static struct GUID uu;
 
 	smb_uuid_unpack(in, &uu);
 	return uu;
 }
 
-void smb_uuid_generate_random(struct uuid *uu)
+void smb_uuid_generate_random(struct GUID *uu)
 {
 	UUID_FLAT tmp;
 
@@ -64,7 +64,7 @@
 	uu->time_hi_and_version = (uu->time_hi_and_version & 0x0FFF) | 0x4000;
 }
 
-char *smb_uuid_to_string(const struct uuid uu)
+char *smb_uuid_to_string(const struct GUID uu)
 {
 	char *out;
 
@@ -77,7 +77,7 @@
 	return out;
 }
 
-const char *smb_uuid_string_static(const struct uuid uu)
+const char *smb_uuid_string_static(const struct GUID uu)
 {
 	static char out[37];
 
@@ -90,7 +90,7 @@
 	return out;
 }
 
-BOOL smb_string_to_uuid(const char *in, struct uuid* uu)
+BOOL smb_string_to_uuid(const char *in, struct GUID* uu)
 {
 	BOOL ret = False;
 	const char *ptr = in;

Modified: branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c
===================================================================
--- branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/libmsrpc/cac_lsarpc.c	2006-09-19 00:12:11 UTC (rev 18654)
@@ -470,7 +470,7 @@
    char *domain_name    = NULL;
    char *dns_name       = NULL;
    char *forest_name     = NULL;
-   struct uuid *domain_guid    = NULL;
+   struct GUID *domain_guid    = NULL;
    DOM_SID *domain_sid  = NULL;
 
    if(!hnd)

Modified: branches/SAMBA_3_0/source/passdb/secrets.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/secrets.c	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/passdb/secrets.c	2006-09-19 00:12:11 UTC (rev 18654)
@@ -158,39 +158,39 @@
 	return True;
 }
 
-BOOL secrets_store_domain_guid(const char *domain, struct uuid *guid)
+BOOL secrets_store_domain_guid(const char *domain, struct GUID *guid)
 {
 	fstring key;
 
 	slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_GUID, domain);
 	strupper_m(key);
-	return secrets_store(key, guid, sizeof(struct uuid));
+	return secrets_store(key, guid, sizeof(struct GUID));
 }
 
-BOOL secrets_fetch_domain_guid(const char *domain, struct uuid *guid)
+BOOL secrets_fetch_domain_guid(const char *domain, struct GUID *guid)
 {
-	struct uuid *dyn_guid;
+	struct GUID *dyn_guid;
 	fstring key;
 	size_t size = 0;
-	struct uuid new_guid;
+	struct GUID new_guid;
 
 	slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_GUID, domain);
 	strupper_m(key);
-	dyn_guid = (struct uuid *)secrets_fetch(key, &size);
+	dyn_guid = (struct GUID *)secrets_fetch(key, &size);
 
 	if (!dyn_guid) {
 		if (lp_server_role() == ROLE_DOMAIN_PDC) {
 			smb_uuid_generate_random(&new_guid);
 			if (!secrets_store_domain_guid(domain, &new_guid))
 				return False;
-			dyn_guid = (struct uuid *)secrets_fetch(key, &size);
+			dyn_guid = (struct GUID *)secrets_fetch(key, &size);
 		}
 		if (dyn_guid == NULL) {
 			return False;
 		}
 	}
 
-	if (size != sizeof(struct uuid)) { 
+	if (size != sizeof(struct GUID)) { 
 		DEBUG(1,("UUID size %d is wrong!\n", (int)size));
 		SAFE_FREE(dyn_guid);
 		return False;

Modified: branches/SAMBA_3_0/source/printing/nt_printing.c
===================================================================
--- branches/SAMBA_3_0/source/printing/nt_printing.c	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/printing/nt_printing.c	2006-09-19 00:12:11 UTC (rev 18654)
@@ -3003,7 +3003,7 @@
 }
 
 static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2, 
-			       struct uuid guid)
+			       struct GUID guid)
 {
 	int i;
 	REGVAL_CTR *ctr=NULL;
@@ -3015,7 +3015,7 @@
 
 	regval_ctr_delvalue(ctr, "objectGUID");
 	regval_ctr_addvalue(ctr, "objectGUID", REG_BINARY, 
-			    (char *) &guid, sizeof(struct uuid));	
+			    (char *) &guid, sizeof(struct GUID));	
 }
 
 static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
@@ -3028,7 +3028,7 @@
 	TALLOC_CTX *ctx;
 	ADS_MODLIST mods;
 	const char *attrs[] = {"objectGUID", NULL};
-	struct uuid guid;
+	struct GUID guid;
 	WERROR win_rc = WERR_OK;
 
 	DEBUG(5, ("publishing printer %s\n", printer->info_2->printername));
@@ -3265,7 +3265,7 @@
 }
 
 BOOL is_printer_published(Printer_entry *print_hnd, int snum, 
-			  struct uuid *guid)
+			  struct GUID *guid)
 {
 	NT_PRINTER_INFO_LEVEL *printer = NULL;
 	REGVAL_CTR *ctr;
@@ -3286,8 +3286,8 @@
 	}
 
 	/* fetching printer guids really ought to be a separate function.. */
-	if (guid && regval_size(guid_val) == sizeof(struct uuid))
-		memcpy(guid, regval_data_p(guid_val), sizeof(struct uuid));
+	if (guid && regval_size(guid_val) == sizeof(struct GUID))
+		memcpy(guid, regval_data_p(guid_val), sizeof(struct GUID));
 
 	free_a_printer(&printer, 2);
 	return True;
@@ -3304,7 +3304,7 @@
 }
 
 BOOL is_printer_published(Printer_entry *print_hnd, int snum, 
-			  struct uuid *guid)
+			  struct GUID *guid)
 {
 	return False;
 }

Modified: branches/SAMBA_3_0/source/rpc_client/cli_lsarpc.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_client/cli_lsarpc.c	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/rpc_client/cli_lsarpc.c	2006-09-19 00:12:11 UTC (rev 18654)
@@ -515,7 +515,7 @@
 				       POLICY_HND *pol, uint16 info_class, 
 				       char **domain_name, char **dns_name,
 				       char **forest_name,
-				       struct uuid **domain_guid,
+				       struct GUID **domain_guid,
 				       DOM_SID **domain_sid)
 {
 	prs_struct qbuf, rbuf;
@@ -574,13 +574,13 @@
 	}
 	
 	if (domain_guid) {
-		*domain_guid = TALLOC_P(mem_ctx, struct uuid);
+		*domain_guid = TALLOC_P(mem_ctx, struct GUID);
 		if (!*domain_guid) {
 			return NT_STATUS_NO_MEMORY;
 		}
 		memcpy(*domain_guid, 
 		       &r.ctr.info.id12.dom_guid, 
-		       sizeof(struct uuid));
+		       sizeof(struct GUID));
 	}
 
 	if (domain_sid && r.ctr.info.id12.ptr_dom_sid != 0) {

Modified: branches/SAMBA_3_0/source/rpc_client/cli_netlogon.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_client/cli_netlogon.c	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/rpc_client/cli_netlogon.c	2006-09-19 00:12:11 UTC (rev 18654)
@@ -424,12 +424,12 @@
 				     TALLOC_CTX *mem_ctx,
 				     const char *server_name,
 				     const char *domain_name,
-				     struct uuid *domain_guid,
-				     struct uuid *site_guid,
+				     struct GUID *domain_guid,
+				     struct GUID *site_guid,
 				     uint32_t flags,
 				     char **dc_unc, char **dc_address,
 				     int32 *dc_address_type,
-				     struct uuid *domain_guid_out,
+				     struct GUID *domain_guid_out,
 				     char **domain_name_out,
 				     char **forest_name,
 				     uint32 *dc_flags,

Modified: branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_parse/parse_misc.c	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_misc.c	2006-09-19 00:12:11 UTC (rev 18654)
@@ -298,10 +298,10 @@
 }
 
 /*******************************************************************
- Reads or writes a struct uuid
+ Reads or writes a struct GUID
 ********************************************************************/
 
-BOOL smb_io_uuid(const char *desc, struct uuid *uuid, 
+BOOL smb_io_uuid(const char *desc, struct GUID *uuid, 
 		 prs_struct *ps, int depth)
 {
 	if (uuid == NULL)
@@ -1704,7 +1704,7 @@
 	
 	if (!prs_uint32("handle_type", ps, depth, &pol->handle_type))
 		return False;
-	if (!smb_io_uuid("uuid", (struct uuid*)&pol->uuid, ps, depth))
+	if (!smb_io_uuid("uuid", (struct GUID*)&pol->uuid, ps, depth))
 		return False;
 
 	return True;

Modified: branches/SAMBA_3_0/source/rpc_parse/parse_net.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_parse/parse_net.c	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_net.c	2006-09-19 00:12:11 UTC (rev 18654)
@@ -3232,8 +3232,8 @@
 
 void init_net_q_dsr_getdcname(NET_Q_DSR_GETDCNAME *r_t, const char *server_unc,
 			      const char *domain_name,
-			      struct uuid *domain_guid,
-			      struct uuid *site_guid,
+			      struct GUID *domain_guid,
+			      struct GUID *site_guid,
 			      uint32_t flags)
 {
 	DEBUG(5, ("init_net_q_dsr_getdcname\n"));
@@ -3290,7 +3290,7 @@
 		return False;
 
 	if (UNMARSHALLING(ps) && (r_t->ptr_domain_guid)) {
-		r_t->domain_guid = PRS_ALLOC_MEM(ps, struct uuid, 1);
+		r_t->domain_guid = PRS_ALLOC_MEM(ps, struct GUID, 1);
 		if (r_t->domain_guid == NULL)
 			return False;
 	}
@@ -3306,7 +3306,7 @@
 		return False;
 
 	if (UNMARSHALLING(ps) && (r_t->ptr_site_guid)) {
-		r_t->site_guid = PRS_ALLOC_MEM(ps, struct uuid, 1);
+		r_t->site_guid = PRS_ALLOC_MEM(ps, struct GUID, 1);
 		if (r_t->site_guid == NULL)
 			return False;
 	}
@@ -3329,7 +3329,7 @@
 ********************************************************************/
 void init_net_r_dsr_getdcname(NET_R_DSR_GETDCNAME *r_t, const char *dc_unc,
 			      const char *dc_address, int32 dc_address_type,
-			      struct uuid domain_guid, const char *domain_name,
+			      struct GUID domain_guid, const char *domain_name,
 			      const char *forest_name, uint32 dc_flags,
 			      const char *dc_site_name,
 			      const char *client_site_name)

Modified: branches/SAMBA_3_0/source/rpc_server/srv_pipe.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_pipe.c	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/rpc_server/srv_pipe.c	2006-09-19 00:12:11 UTC (rev 18654)
@@ -997,9 +997,9 @@
 		DEBUG(10,("checking %s\n", pipe_names[i].client_pipe));
 		if ( strequal(pipe_names[i].client_pipe, pname)
 			&& (abstract->version == pipe_names[i].abstr_syntax.version) 
-			&& (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax.uuid, sizeof(struct uuid)) == 0)
+			&& (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax.uuid, sizeof(struct GUID)) == 0)
 			&& (transfer->version == pipe_names[i].trans_syntax.version)
-			&& (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid, sizeof(struct uuid)) == 0) ) {
+			&& (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid, sizeof(struct GUID)) == 0) ) {
 			struct api_struct 	*fns = NULL;
 			int 			n_fns = 0;
 			PIPE_RPC_FNS		*context_fns;

Modified: branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c	2006-09-18 23:47:36 UTC (rev 18653)
+++ branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c	2006-09-19 00:12:11 UTC (rev 18654)
@@ -4262,7 +4262,7 @@
 static BOOL construct_printer_info_7(Printer_entry *print_hnd, PRINTER_INFO_7 *printer, int snum)
 {
 	char *guid_str = NULL;
-	struct uuid guid; 
+	struct GUID guid; 
 	
 	if (is_printer_published(print_hnd, snum, &guid)) {
 		asprintf(&guid_str, "{%s}", smb_uuid_string_static(guid));



More information about the samba-cvs mailing list