diff options
author | Gerald Carter <jerry@samba.org> | 2004-04-13 14:39:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:13 -0500 |
commit | 8ad3d8c9b065f3a2040beff801bdc9dceac868a8 (patch) | |
tree | 8c0763ba095ca5386b5b06ddb3f10a05d9a85dcf /source3/rpc_server | |
parent | 142f5604b56240054f088dce4703c714b7065106 (diff) | |
download | samba-8ad3d8c9b065f3a2040beff801bdc9dceac868a8.tar.gz samba-8ad3d8c9b065f3a2040beff801bdc9dceac868a8.tar.bz2 samba-8ad3d8c9b065f3a2040beff801bdc9dceac868a8.zip |
r196: merging struct uuid from trunk
(This used to be commit 911a28361b9d8dd50597627f245ebfb57c6294fb)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 9 | ||||
-rw-r--r-- | source3/rpc_server/srv_netlog.c | 41 | ||||
-rw-r--r-- | source3/rpc_server/srv_netlog_nt.c | 17 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 7 |
6 files changed, 69 insertions, 13 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index de4fdceba7..3878734c6d 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -6,7 +6,7 @@ * Copyright (C) Paul Ashton 1997, * Copyright (C) Jeremy Allison 2001, * Copyright (C) Rafal Szczesniak 2002, - * Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2002. + * Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2002, * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -350,7 +350,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); @@ -375,7 +375,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) { @@ -1105,7 +1105,6 @@ NTSTATUS _lsa_addprivs(pipes_struct *p, LSA_Q_ADDPRIVS *q_u, LSA_R_ADDPRIVS *r_u /* check if the privilege is already there */ if (check_priv_in_privilege(map.priv_set, *luid_attr)){ destroy_privilege(&map.priv_set); - return NT_STATUS_NO_SUCH_PRIVILEGE; } add_privilege(map.priv_set, *luid_attr); @@ -1240,7 +1239,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); diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c index 9c10d86379..f06a2002e3 100644 --- a/source3/rpc_server/srv_netlog.c +++ b/source3/rpc_server/srv_netlog.c @@ -317,6 +317,42 @@ static BOOL api_net_logon_ctrl(pipes_struct *p) return True; } +/************************************************************************* + api_ds_enum_dom_trusts: + *************************************************************************/ + +#if 0 /* JERRY */ +static BOOL api_ds_enum_dom_trusts(pipes_struct *p) +{ + DS_Q_ENUM_DOM_TRUSTS q_u; + DS_R_ENUM_DOM_TRUSTS r_u; + + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + DEBUG(6,("api_ds_enum_dom_trusts\n")); + + if ( !ds_io_q_enum_domain_trusts("", data, 0, &q_u) ) { + DEBUG(0,("api_ds_enum_domain_trusts: Failed to unmarshall DS_Q_ENUM_DOM_TRUSTS.\n")); + return False; + } + + r_u.status = _ds_enum_dom_trusts(p, &q_u, &r_u); + + if ( !ds_io_r_enum_domain_trusts("", rdata, 0, &r_u) ) { + DEBUG(0,("api_ds_enum_domain_trusts: Failed to marshall DS_R_ENUM_DOM_TRUSTS.\n")); + return False; + } + + DEBUG(6,("api_ds_enum_dom_trusts\n")); + + return True; +} +#endif /* JERRY */ + /******************************************************************* array of \PIPE\NETLOGON operations ********************************************************************/ @@ -330,7 +366,10 @@ static struct api_struct api_net_cmds [] = { "NET_SAMLOGOFF" , NET_SAMLOGOFF , api_net_sam_logoff }, { "NET_LOGON_CTRL2" , NET_LOGON_CTRL2 , api_net_logon_ctrl2 }, { "NET_TRUST_DOM_LIST", NET_TRUST_DOM_LIST, api_net_trust_dom_list }, - { "NET_LOGON_CTRL" , NET_LOGON_CTRL , api_net_logon_ctrl } + { "NET_LOGON_CTRL" , NET_LOGON_CTRL , api_net_logon_ctrl }, +#if 0 /* JERRY */ + { "DS_ENUM_DOM_TRUSTS", DS_ENUM_DOM_TRUSTS, api_ds_enum_dom_trusts } +#endif /* JERRY */ }; void netlog_get_pipe_fns( struct api_struct **fns, int *n_fns ) diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index e3f687be13..be8eda82c9 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -775,4 +775,21 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON * return status; } +/************************************************************************* + _ds_enum_dom_trusts + *************************************************************************/ +#if 0 /* JERRY -- not correct */ +NTSTATUS _ds_enum_dom_trusts(pipes_struct *p, DS_Q_ENUM_DOM_TRUSTS *q_u, + DS_R_ENUM_DOM_TRUSTS *r_u) +{ + NTSTATUS status = NT_STATUS_OK; + /* TODO: According to MSDN, the can only be executed against a + DC or domain member running Windows 2000 or later. Need + to test against a standalone 2k server and see what it + does. A windows 2000 DC includes its own domain in the + list. --jerry */ + + return status; +} +#endif /* JERRY */ diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 8337c4e3c7..ad7c544b68 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -737,9 +737,9 @@ BOOL check_bind_req(struct pipes_struct *p, RPC_IFACE* abstract, { 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(RPC_UUID)) == 0) + && (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax.uuid, sizeof(struct uuid)) == 0) && (transfer->version == pipe_names[i].trans_syntax.version) - && (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid, sizeof(RPC_UUID)) == 0) ) + && (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid, sizeof(struct uuid)) == 0) ) { struct api_struct *fns = NULL; int n_fns = 0; diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index f48a334fff..a8402ab801 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -7,8 +7,8 @@ * Copyright (C) Marc Jacobsen 1999, * Copyright (C) Jeremy Allison 2001-2002, * Copyright (C) Jean François Micouleau 1998-2001, - * Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2002. - * Copyright (C) Gerald (Jerry) Carter 2003. + * Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2002, + * Copyright (C) Gerald (Jerry) Carter 2003, * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index c971ff3631..3b1bb5ede5 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -3,7 +3,7 @@ * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-2000, * Copyright (C) Luke Kenneth Casson Leighton 1996-2000, - * Copyright (C) Jean François Micouleau 1998-2000, + * Copyright (C) Jean François Micouleau 1998-2000, * Copyright (C) Jeremy Allison 2001-2002, * Copyright (C) Gerald Carter 2000-2003, * Copyright (C) Tim Potter 2001-2002. @@ -4283,10 +4283,11 @@ static BOOL construct_printer_info_5(Printer_entry *print_hnd, PRINTER_INFO_5 *p static BOOL construct_printer_info_7(Printer_entry *print_hnd, PRINTER_INFO_7 *printer, int snum) { char *guid_str = NULL; - GUID guid; + UUID_FLAT guid; if (is_printer_published(print_hnd, snum, &guid)) { - asprintf(&guid_str, "{%s}", smb_uuid_string_static(guid)); + asprintf(&guid_str, "{%s}", + smb_uuid_string_static(smb_uuid_unpack_static(guid))); strupper_m(guid_str); init_unistr(&printer->guid, guid_str); printer->action = SPOOL_DS_PUBLISH; |