summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2003-10-30 17:17:51 +0000
committerJim McDonough <jmcd@samba.org>2003-10-30 17:17:51 +0000
commitbb971b44b84a72d628205fba0c27207f5fd00bf2 (patch)
tree5890dd0ddec31442587de9b5fb18abc94fa9faf4 /source3
parent1587245a053fc82b74dea06689e9d5fe0ce91eea (diff)
downloadsamba-bb971b44b84a72d628205fba0c27207f5fd00bf2.tar.gz
samba-bb971b44b84a72d628205fba0c27207f5fd00bf2.tar.bz2
samba-bb971b44b84a72d628205fba0c27207f5fd00bf2.zip
More GUID->struct uuid changes.
Printer publishing now uses struct uuid. Also changes ads_pull_guid to unpack it from the wire format. (This used to be commit 671b434cc4b422144ab8f5858ae9c2179de701e1)
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/ldap.c6
-rw-r--r--source3/printing/nt_printing.c17
2 files changed, 14 insertions, 9 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index ed26bf07f2..2ee8e6fe93 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1623,16 +1623,18 @@ BOOL ads_pull_uint32(ADS_STRUCT *ads,
* @return boolean indicating success
**/
BOOL ads_pull_guid(ADS_STRUCT *ads,
- void *msg, GUID *guid)
+ void *msg, struct uuid *guid)
{
char **values;
+ UUID_FLAT flat_guid;
values = ldap_get_values(ads->ld, msg, "objectGUID");
if (!values)
return False;
if (values[0]) {
- memcpy(guid, values[0], sizeof(GUID));
+ memcpy(&flat_guid.info, values[0], sizeof(UUID_FLAT));
+ smb_uuid_unpack(flat_guid, guid);
ldap_value_free(values);
return True;
}
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 908bd9c887..0b4fa93b5a 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2576,7 +2576,8 @@ static BOOL map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2)
return True;
}
-static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2, GUID guid)
+static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2,
+ struct uuid guid)
{
int i;
REGVAL_CTR *ctr=NULL;
@@ -2588,7 +2589,7 @@ static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2, GUID guid)
regval_ctr_delvalue(ctr, "objectGUID");
regval_ctr_addvalue(ctr, "objectGUID", REG_BINARY,
- (char *) &guid, sizeof(GUID));
+ (char *) &guid, sizeof(struct uuid));
}
static WERROR publish_it(NT_PRINTER_INFO_LEVEL *printer)
@@ -2601,7 +2602,7 @@ static WERROR publish_it(NT_PRINTER_INFO_LEVEL *printer)
void *res = NULL;
ADS_STRUCT *ads;
const char *attrs[] = {"objectGUID", NULL};
- GUID guid;
+ struct uuid guid;
WERROR win_rc = WERR_OK;
ZERO_STRUCT(guid);
@@ -2785,7 +2786,8 @@ WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action)
return win_rc;
}
-BOOL is_printer_published(Printer_entry *print_hnd, int snum, GUID *guid)
+BOOL is_printer_published(Printer_entry *print_hnd, int snum,
+ struct uuid *guid)
{
NT_PRINTER_INFO_LEVEL *printer = NULL;
REGVAL_CTR *ctr;
@@ -2813,8 +2815,8 @@ BOOL is_printer_published(Printer_entry *print_hnd, int snum, GUID *guid)
return False;
}
- if (regval_size(guid_val) == sizeof(GUID))
- memcpy(guid, regval_data_p(guid_val), sizeof(GUID));
+ if (regval_size(guid_val) == sizeof(struct uuid))
+ memcpy(guid, regval_data_p(guid_val), sizeof(struct uuid));
return True;
}
@@ -2824,7 +2826,8 @@ WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action)
{
return WERR_OK;
}
-BOOL is_printer_published(Printer_entry *print_hnd, int snum, GUID *guid)
+BOOL is_printer_published(Printer_entry *print_hnd, int snum,
+ struct uuid *guid)
{
return False;
}