summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-03-20 16:40:09 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-03-20 16:40:09 +0100
commitca202cf464aec82e63be4b2160f394f56b8c195e (patch)
tree58b432b7d67c5cf3b35a16c7df9b028d39e3b3a5 /source3/include
parent44787565715f0622cc1d049854427d735ca1c14b (diff)
parent2de464a7658f91d2d01087080b984d52c3483426 (diff)
downloadsamba-ca202cf464aec82e63be4b2160f394f56b8c195e.tar.gz
samba-ca202cf464aec82e63be4b2160f394f56b8c195e.tar.bz2
samba-ca202cf464aec82e63be4b2160f394f56b8c195e.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into displaysec
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/includes.h1
-rw-r--r--source3/include/libsmb_internal.h8
-rw-r--r--source3/include/nt_printing.h18
-rw-r--r--source3/include/ntdomain.h9
-rw-r--r--source3/include/popt_common.h1
-rw-r--r--source3/include/proto.h224
-rw-r--r--source3/include/rpc_client.h30
-rw-r--r--source3/include/rpc_dce.h2
-rw-r--r--source3/include/rpc_misc.h38
-rw-r--r--source3/include/rpc_spoolss.h450
-rw-r--r--source3/include/smb_macros.h2
-rw-r--r--source3/include/wbc_async.h17
12 files changed, 135 insertions, 665 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index b48a75526a..4bf4b5c735 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -622,7 +622,6 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
#include "ntdomain.h"
#include "reg_objects.h"
#include "reg_db.h"
-#include "rpc_spoolss.h"
#include "rpc_perfcount.h"
#include "rpc_perfcount_defs.h"
#include "librpc/gen_ndr/notify.h"
diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h
index 166685c380..0bfcd8fab7 100644
--- a/source3/include/libsmb_internal.h
+++ b/source3/include/libsmb_internal.h
@@ -74,7 +74,7 @@ struct _SMBCSRV {
bool no_pathinfo;
bool no_pathinfo2;
bool no_nt_session;
- POLICY_HND pol;
+ struct policy_handle pol;
SMBCSRV *next, *prev;
@@ -181,6 +181,12 @@ struct SMBC_internal_data {
*/
bool case_sensitive;
+ /*
+ * Auth info needed for DFS traversal.
+ */
+
+ struct user_auth_info *auth_info;
+
struct smbc_server_cache * server_cache;
/* POSIX emulation functions */
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 43fd363b55..7dc60a8f03 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -440,7 +440,7 @@ typedef struct _Printer{
fstring localmachine;
uint32 printerlocal;
struct spoolss_NotifyOption *option;
- POLICY_HND client_hnd;
+ struct policy_handle client_hnd;
bool client_connected;
uint32 change;
/* are we in a FindNextPrinterChangeNotify() call? */
@@ -459,4 +459,20 @@ typedef struct _Printer{
} Printer_entry;
+/*
+ * The printer attributes.
+ * I #defined all of them (grabbed form MSDN)
+ * I'm only using:
+ * ( SHARED | NETWORK | RAW_ONLY )
+ * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
+ */
+
+#define PRINTER_ATTRIBUTE_SAMBA (PRINTER_ATTRIBUTE_RAW_ONLY|\
+ PRINTER_ATTRIBUTE_SHARED|\
+ PRINTER_ATTRIBUTE_LOCAL)
+#define PRINTER_ATTRIBUTE_NOT_SAMBA (PRINTER_ATTRIBUTE_NETWORK)
+
+#define DRIVER_ANY_VERSION 0xffffffff
+#define DRIVER_MAX_VERSION 4
+
#endif /* NT_PRINTING_H_ */
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 0eff9bdbac..c95931b5d0 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -117,7 +117,7 @@ typedef struct _input_data {
struct policy {
struct policy *next, *prev;
- POLICY_HND pol_hnd;
+ struct policy_handle pol_hnd;
void *data_ptr;
};
@@ -293,11 +293,4 @@ struct api_struct {
/* end higher order functions */
-typedef struct {
- uint32 size;
- prs_struct prs;
- uint32 struct_start;
- uint32 string_at_end;
-} RPC_BUFFER;
-
#endif /* _NT_DOMAIN_H */
diff --git a/source3/include/popt_common.h b/source3/include/popt_common.h
index bbd013a18f..ae8378f28b 100644
--- a/source3/include/popt_common.h
+++ b/source3/include/popt_common.h
@@ -53,6 +53,7 @@ struct user_auth_info {
int signing_state;
bool smb_encrypt;
bool use_machine_account;
+ bool fallback_after_kerberos;
};
#endif /* _POPT_COMMON_H */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index f992f0686a..9bffa4d319 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1072,27 +1072,31 @@ const char *my_netbios_names(int i);
bool set_netbios_aliases(const char **str_array);
bool init_names(void);
struct user_auth_info *user_auth_info_init(TALLOC_CTX *mem_ctx);
-const char *get_cmdline_auth_info_username(struct user_auth_info *auth_info);
+const char *get_cmdline_auth_info_username(const struct user_auth_info *auth_info);
void set_cmdline_auth_info_username(struct user_auth_info *auth_info,
const char *username);
void set_cmdline_auth_info_password(struct user_auth_info *auth_info,
const char *password);
-const char *get_cmdline_auth_info_password(struct user_auth_info *auth_info);
+const char *get_cmdline_auth_info_password(const struct user_auth_info *auth_info);
bool set_cmdline_auth_info_signing_state(struct user_auth_info *auth_info,
const char *arg);
-int get_cmdline_auth_info_signing_state(struct user_auth_info *auth_info);
+int get_cmdline_auth_info_signing_state(const struct user_auth_info *auth_info);
void set_cmdline_auth_info_use_kerberos(struct user_auth_info *auth_info,
bool b);
-bool get_cmdline_auth_info_use_kerberos(struct user_auth_info *auth_info);
+bool get_cmdline_auth_info_use_kerberos(const struct user_auth_info *auth_info);
+void set_cmdline_auth_info_fallback_after_kerberos(struct user_auth_info *auth_info,
+ bool b);
+bool get_cmdline_auth_info_fallback_after_kerberos(const struct user_auth_info *auth_info);
void set_cmdline_auth_info_use_krb5_ticket(struct user_auth_info *auth_info);
void set_cmdline_auth_info_smb_encrypt(struct user_auth_info *auth_info);
void set_cmdline_auth_info_use_machine_account(struct user_auth_info *auth_info);
-bool get_cmdline_auth_info_got_pass(struct user_auth_info *auth_info);
-bool get_cmdline_auth_info_smb_encrypt(struct user_auth_info *auth_info);
-bool get_cmdline_auth_info_use_machine_account(struct user_auth_info *auth_info);
+bool get_cmdline_auth_info_got_pass(const struct user_auth_info *auth_info);
+bool get_cmdline_auth_info_smb_encrypt(const struct user_auth_info *auth_info);
+bool get_cmdline_auth_info_use_machine_account(const struct user_auth_info *auth_info);
struct user_auth_info *get_cmdline_auth_info_copy(TALLOC_CTX *mem_ctx,
- struct user_auth_info *info);
+ const struct user_auth_info *info);
bool set_cmdline_auth_info_machine_account_creds(struct user_auth_info *auth_info);
+void set_cmdline_auth_info_getpass(struct user_auth_info *auth_info);
bool add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid,
gid_t **gids, size_t *num_gids);
bool file_exist_stat(const char *fname,SMB_STRUCT_STAT *sbuf);
@@ -1205,7 +1209,7 @@ void *_talloc_zero_array_zeronull(const void *ctx, size_t el_size, unsigned coun
void *talloc_zeronull(const void *context, size_t size, const char *name);
NTSTATUS split_ntfs_stream_name(TALLOC_CTX *mem_ctx, const char *fname,
char **pbase, char **pstream);
-bool is_valid_policy_hnd(const POLICY_HND *hnd);
+bool is_valid_policy_hnd(const struct policy_handle *hnd);
bool policy_hnd_equal(const struct policy_handle *hnd1,
const struct policy_handle *hnd2);
const char *strip_hostname(const char *s);
@@ -1396,13 +1400,13 @@ struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx,
uint16_t port,
int timeout);
NTSTATUS open_socket_out_recv(struct tevent_req *req, int *pfd);
-struct async_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
- struct timeval wait_time,
- const struct sockaddr_storage *pss,
- uint16_t port,
- int timeout);
-NTSTATUS open_socket_out_defer_recv(struct async_req *req, int *pfd);
+struct tevent_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ struct timeval wait_time,
+ const struct sockaddr_storage *pss,
+ uint16_t port,
+ int timeout);
+NTSTATUS open_socket_out_defer_recv(struct tevent_req *req, int *pfd);
bool open_any_socket_out(struct sockaddr_storage *addrs, int num_addrs,
int timeout, int *fd_index, int *fd);
int open_udp_socket(const char *host, int port);
@@ -1553,7 +1557,6 @@ char *rpcstr_pull_unistr2_talloc(TALLOC_CTX *ctx, const UNISTR2 *src);
int rpcstr_push(void *dest, const char *src, size_t dest_len, int flags);
int rpcstr_push_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src);
void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen);
-void unistr3_to_ascii(char *dest, const UNISTR3 *str, size_t maxlen);
char *unistr2_to_ascii_talloc(TALLOC_CTX *ctx, const UNISTR2 *str);
const char *unistr2_static(const UNISTR2 *str);
smb_ucs2_t toupper_w(smb_ucs2_t val);
@@ -2359,21 +2362,13 @@ struct cli_state *cli_cm_open(TALLOC_CTX *ctx,
struct cli_state *referring_cli,
const char *server,
const char *share,
+ const struct user_auth_info *auth_info,
bool show_hdr,
bool force_encrypt,
int max_protocol,
int port,
int name_type);
void cli_cm_display(const struct cli_state *c);
-void cli_cm_set_credentials(struct user_auth_info *auth_info);
-void cli_cm_set_port(int port_number);
-void cli_cm_set_dest_name_type(int type);
-void cli_cm_set_signing_state(int state);
-void cli_cm_set_username(const char *username);
-void cli_cm_set_password(const char *newpass);
-void cli_cm_set_use_kerberos(void);
-void cli_cm_set_fallback_after_kerberos(void);
-void cli_cm_set_dest_ss(struct sockaddr_storage *pss);
bool cli_dfs_get_referral(TALLOC_CTX *ctx,
struct cli_state *cli,
const char *path,
@@ -2382,6 +2377,7 @@ bool cli_dfs_get_referral(TALLOC_CTX *ctx,
uint16 *consumed);
bool cli_resolve_path(TALLOC_CTX *ctx,
const char *mountpt,
+ const struct user_auth_info *dfs_auth_info,
struct cli_state *rootcli,
const char *path,
struct cli_state **targetcli,
@@ -4793,7 +4789,6 @@ bool nt_printing_init(struct messaging_context *msg_ctx);
uint32 update_c_setprinter(bool initialize);
uint32 get_c_setprinter(void);
int get_builtin_ntforms(nt_forms_struct **list);
-bool get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form);
bool get_a_builtin_ntform_by_string(const char *form_name, nt_forms_struct *form);
int get_ntforms(nt_forms_struct **list);
int write_ntforms(nt_forms_struct **list, int number);
@@ -5175,13 +5170,13 @@ WERROR regkey_open_internal( TALLOC_CTX *ctx, REGISTRY_KEY **regkey,
NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
bool sec_qos, uint32 des_access,
- POLICY_HND *pol);
+ struct policy_handle *pol);
NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx, bool sec_qos,
- uint32 des_access, POLICY_HND *pol);
+ uint32 des_access, struct policy_handle *pol);
NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- POLICY_HND *pol,
+ struct policy_handle *pol,
int num_sids,
const DOM_SID *sids,
char ***pdomains,
@@ -5189,7 +5184,7 @@ NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
enum lsa_SidType **ptypes);
NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, int num_names,
+ struct policy_handle *pol, int num_names,
const char **names,
const char ***dom_names,
int level,
@@ -5403,7 +5398,7 @@ NTSTATUS rpc_transport_sock_init(TALLOC_CTX *mem_ctx, int fd,
NTSTATUS rpccli_winreg_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
uint32 reg_type, uint32 access_mask,
- POLICY_HND *reg_hnd);
+ struct policy_handle *reg_hnd);
/* The following definitions come from rpc_client/cli_samr.c */
@@ -5436,7 +5431,7 @@ void get_query_dispinfo_params(int loop_count, uint32 *max_entries,
NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint32_t access_mask,
- POLICY_HND *connect_pol);
+ struct policy_handle *connect_pol);
/* The following definitions come from rpc_client/cli_spoolss.c */
@@ -5534,27 +5529,38 @@ WERROR rpccli_spoolss_enumprinters(struct rpc_pipe_client *cli,
uint32_t offered,
uint32_t *count,
union spoolss_PrinterInfo **info);
-WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, const char *valuename,
- REGISTRY_VALUE *value);
-WERROR rpccli_spoolss_setprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, REGISTRY_VALUE *value);
-WERROR rpccli_spoolss_enumprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, uint32 ndx,
- uint32 value_offered, uint32 data_offered,
- uint32 *value_needed, uint32 *data_needed,
- REGISTRY_VALUE *value);
-WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, const char *keyname,
- REGVAL_CTR *ctr);
-WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, const char *keyname,
- uint16 **keylist, uint32 *len);
+WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ const char *value_name,
+ uint32_t offered,
+ enum winreg_Type *type,
+ union spoolss_PrinterData *data);
+WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ const char *key_name,
+ const char ***key_buffer,
+ uint32_t offered);
+WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ const char *key_name,
+ uint32_t offered,
+ uint32_t *count,
+ struct spoolss_PrinterEnumValues **info);
/* The following definitions come from rpc_client/init_spoolss.c */
bool init_systemtime(struct spoolss_Time *r,
struct tm *unixtime);
+WERROR pull_spoolss_PrinterData(TALLOC_CTX *mem_ctx,
+ const DATA_BLOB *blob,
+ union spoolss_PrinterData *data,
+ enum winreg_Type type);
+WERROR push_spoolss_PrinterData(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
+ enum winreg_Type type,
+ union spoolss_PrinterData *data);
/* The following definitions come from rpc_client/init_lsa.c */
@@ -5667,44 +5673,16 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
const struct ndr_interface_table *table,
uint32 opnum, void *r);
-/* The following definitions come from rpc_parse/parse_buffer.c */
-
-bool rpcbuf_init(RPC_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx);
-bool prs_rpcbuffer(const char *desc, prs_struct *ps, int depth, RPC_BUFFER *buffer);
-bool prs_rpcbuffer_p(const char *desc, prs_struct *ps, int depth, RPC_BUFFER **buffer);
-bool rpcbuf_alloc_size(RPC_BUFFER *buffer, uint32 buffer_size);
-void rpcbuf_move(RPC_BUFFER *src, RPC_BUFFER **dest);
-uint32 rpcbuf_get_size(RPC_BUFFER *buffer);
-bool smb_io_relstr(const char *desc, RPC_BUFFER *buffer, int depth, UNISTR *string);
-bool smb_io_relarraystr(const char *desc, RPC_BUFFER *buffer, int depth, uint16 **string);
-bool smb_io_relsecdesc(const char *desc, RPC_BUFFER *buffer, int depth, SEC_DESC **secdesc);
-uint32 size_of_relative_string(UNISTR *string);
-
/* The following definitions come from rpc_parse/parse_misc.c */
bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth);
-bool smb_io_nttime(const char *desc, prs_struct *ps, int depth, NTTIME *nttime);
+bool smb_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime);
+bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
bool smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth);
bool smb_io_uuid(const char *desc, struct GUID *uuid,
prs_struct *ps, int depth);
void init_unistr(UNISTR *str, const char *buf);
-bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth);
-bool smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth);
-void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf);
-void copy_unistr2(UNISTR2 *str, const UNISTR2 *from);
void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags);
-void init_unistr2_w(TALLOC_CTX *ctx, UNISTR2 *str, const smb_ucs2_t *buf);
-void init_unistr2_from_unistr(TALLOC_CTX *ctx, UNISTR2 *to, const UNISTR *from);
-void init_unistr2_from_datablob(UNISTR2 *str, DATA_BLOB *blob) ;
-bool prs_io_unistr2_p(const char *desc, prs_struct *ps, int depth, UNISTR2 **uni2);
-bool prs_io_unistr2(const char *desc, prs_struct *ps, int depth, UNISTR2 *uni2 );
-bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth);
-bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int depth);
-void init_unistr3(UNISTR3 *str, const char *buf);
-bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth);
-bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
-uint32 str_len_uni(UNISTR *source);
-bool policy_handle_is_valid(const POLICY_HND *hnd);
/* The following definitions come from rpc_parse/parse_prs.c */
@@ -5752,6 +5730,7 @@ bool prs_pointer( const char *name, prs_struct *ps, int depth,
bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16);
bool prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32);
bool prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32);
+bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
bool prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status);
bool prs_dcerpc_status(const char *name, prs_struct *ps, int depth, NTSTATUS *status);
bool prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status);
@@ -5759,9 +5738,7 @@ bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, uint
bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
bool prs_uint16uni(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len);
-bool prs_buffer5(bool charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str);
bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str);
-bool prs_unistr3(bool charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth);
bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str);
bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_buf_size);
bool prs_string_alloc(const char *name, prs_struct *ps, int depth, const char **str);
@@ -5831,38 +5808,6 @@ bool smb_io_rpc_auth_schannel_chk(const char *desc, int auth_len,
bool sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth);
bool sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth);
-/* The following definitions come from rpc_parse/parse_spoolss.c */
-
-bool spoolss_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime);
-bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
-bool spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode);
-bool make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
- const POLICY_HND *handle,
- const char *valuename, uint32 size);
-bool spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth);
-uint32 spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES *p);
-bool make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src);
-bool spoolss_io_r_enumprinterdata(const char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_enumprinterdata(const char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth);
-bool make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA *q_u,
- const POLICY_HND *hnd,
- uint32 idx, uint32 valuelen, uint32 datalen);
-bool make_spoolss_q_enumprinterdataex(SPOOL_Q_ENUMPRINTERDATAEX *q_u,
- const POLICY_HND *hnd, const char *key,
- uint32 size);
-bool make_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA *q_u, const POLICY_HND *hnd,
- char* value, uint32 data_type, char* data, uint32 data_size);
-bool spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth);
-bool make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u,
- POLICY_HND *hnd, const char *key,
- uint32 size);
-bool spoolss_io_q_enumprinterkey(const char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth);
-
/* The following definitions come from rpc_server/srv_eventlog_lib.c */
TDB_CONTEXT *elog_init_tdb( char *tdbfilename );
@@ -5900,9 +5845,9 @@ NTSTATUS evlog_tdb_entry_to_evt_entry(TALLOC_CTX *mem_ctx,
bool init_pipe_handle_list(pipes_struct *p,
const struct ndr_syntax_id *syntax);
-bool create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void *data_ptr);
-bool find_policy_by_hnd(pipes_struct *p, POLICY_HND *hnd, void **data_p);
-bool close_policy_hnd(pipes_struct *p, POLICY_HND *hnd);
+bool create_policy_hnd(pipes_struct *p, struct policy_handle *hnd, void *data_ptr);
+bool find_policy_by_hnd(pipes_struct *p, struct policy_handle *hnd, void **data_p);
+bool close_policy_hnd(pipes_struct *p, struct policy_handle *hnd);
void close_policy_by_pipe(pipes_struct *p);
bool pipe_access_check(pipes_struct *p);
@@ -5941,18 +5886,20 @@ NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
const char *client_address,
struct auth_serversupplied_info *server_info,
struct fake_file_handle **phandle);
-struct async_req *np_write_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
+struct tevent_req *np_write_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
+ struct fake_file_handle *handle,
+ const uint8_t *data, size_t len);
+NTSTATUS np_write_recv(struct tevent_req *req, ssize_t *pnwritten);
+struct tevent_req *np_read_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
struct fake_file_handle *handle,
- const uint8_t *data, size_t len);
-NTSTATUS np_write_recv(struct async_req *req, ssize_t *nwritten);
-struct async_req *np_read_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
- struct fake_file_handle *handle,
- uint8_t *data, size_t len);
-NTSTATUS np_read_recv(struct async_req *req, ssize_t *nread,
+ uint8_t *data, size_t len);
+NTSTATUS np_read_recv(struct tevent_req *req, ssize_t *nread,
bool *is_data_outstanding);
/* The following definitions come from rpc_server/srv_samr_util.c */
+void copy_id18_to_sam_passwd(struct samu *to,
+ struct samr_UserInfo18 *from);
void copy_id20_to_sam_passwd(struct samu *to,
struct samr_UserInfo20 *from);
void copy_id21_to_sam_passwd(const char *log_prefix,
@@ -5960,13 +5907,12 @@ void copy_id21_to_sam_passwd(const char *log_prefix,
struct samr_UserInfo21 *from);
void copy_id23_to_sam_passwd(struct samu *to,
struct samr_UserInfo23 *from);
+void copy_id24_to_sam_passwd(struct samu *to,
+ struct samr_UserInfo24 *from);
void copy_id25_to_sam_passwd(struct samu *to,
struct samr_UserInfo25 *from);
-
-/* The following definitions come from rpc_server/srv_spoolss.c */
-
-void spoolss2_get_pipe_fns( struct api_struct **fns, int *n_fns );
-NTSTATUS rpc_spoolss2_init(void);
+void copy_id26_to_sam_passwd(struct samu *to,
+ struct samr_UserInfo26 *from);
/* The following definitions come from rpc_server/srv_spoolss_nt.c */
@@ -5982,11 +5928,12 @@ void reset_all_printerdata(struct messaging_context *msg,
uint32_t msg_type,
struct server_id server_id,
DATA_BLOB *data);
-bool convert_devicemode(const char *printername, const DEVICEMODE *devmode,
- NT_DEVICEMODE **pp_nt_devmode);
-WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value,
- uint32 type, uint8 *data, int real_len );
-WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPOOL_R_GETPRINTERDATA *r_u);
+bool convert_devicemode(const char *printername,
+ const struct spoolss_DeviceMode *devmode,
+ NT_DEVICEMODE **pp_nt_devmode);
+WERROR set_printer_dataex(NT_PRINTER_INFO_LEVEL *printer,
+ const char *key, const char *value,
+ uint32_t type, uint8_t *data, int real_len);
void spoolss_notify_server_name(int snum,
struct spoolss_Notify *data,
print_queue_struct *queue,
@@ -6054,18 +6001,13 @@ void spoolss_notify_cjobs(int snum,
TALLOC_CTX *mem_ctx);
void construct_info_data(struct spoolss_Notify *info_data,
enum spoolss_NotifyType type,
- enum spoolss_Field field,
+ uint16_t field,
int id);
-DEVICEMODE *construct_dev_mode(const char *servicename);
-struct spoolss_DeviceMode *construct_dev_mode_new(TALLOC_CTX *mem_ctx,
- const char *servicename);
+struct spoolss_DeviceMode *construct_dev_mode(TALLOC_CTX *mem_ctx,
+ const char *servicename);
WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *portname, const char *uri );
bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer);
WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines );
-WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, SPOOL_R_ENUMPRINTERDATA *r_u);
-WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SPOOL_R_SETPRINTERDATA *r_u);
-WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPOOL_R_ENUMPRINTERKEY *r_u);
-WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u);
/* The following definitions come from rpc_server/srv_srvsvc_nt.c */
diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h
index afa18899ca..84ac8b17d4 100644
--- a/source3/include/rpc_client.h
+++ b/source3/include/rpc_client.h
@@ -41,34 +41,4 @@
#define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, (_ctx_), (_io_))
-/* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */
-
-#define CLI_DO_RPC_WERR( pcli, ctx, interface, opnum, q_in, r_out, \
- q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \
-{\
- SMB_ASSERT(ndr_syntax_id_equal(&pcli->abstract_syntax, interface)); \
- if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \
- return WERR_NOMEM;\
- }\
- if ( q_io_fn("", &q_in, &q_ps, 0) ) {\
- NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(ctx, pcli, opnum, &q_ps, &r_ps); \
- if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\
- prs_mem_free( &q_ps );\
- prs_mem_free( &r_ps );\
- return ntstatus_to_werror(_smb_pipe_stat_);\
- }\
- if (!r_io_fn("", &r_out, &r_ps, 0)) {\
- prs_mem_free( &q_ps );\
- prs_mem_free( &r_ps );\
- return default_error;\
- }\
- } else {\
- prs_mem_free( &q_ps );\
- prs_mem_free( &r_ps );\
- return default_error;\
- }\
- prs_mem_free( &q_ps );\
- prs_mem_free( &r_ps );\
-}
-
#endif /* _RPC_CLIENT_H */
diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h
index b63f0eac5e..580b14f1d8 100644
--- a/source3/include/rpc_dce.h
+++ b/source3/include/rpc_dce.h
@@ -159,8 +159,6 @@ enum schannel_direction {
/* RPC_IFACE */
typedef struct ndr_syntax_id RPC_IFACE;
-extern const struct ndr_syntax_id syntax_spoolss;
-
#define RPC_IFACE_LEN (UUID_SIZE + 4)
/* RPC_HDR - dce rpc header */
diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h
index 1e9d43bfa0..797e1926db 100644
--- a/source3/include/rpc_misc.h
+++ b/source3/include/rpc_misc.h
@@ -90,8 +90,6 @@ enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_
/**********************************************************************
* RPC policy handle used pretty much everywhere
**********************************************************************/
-
-typedef struct policy_handle POLICY_HND;
#define OUR_HANDLE(hnd) (((hnd)==NULL) ? "NULL" :\
( IVAL((hnd)->uuid.node,2) == (uint32)sys_getpid() ? "OURS" : \
@@ -100,17 +98,6 @@ typedef struct policy_handle POLICY_HND;
/**********************************************************************
- * Buffers use by spoolss (i might be able to replace it with
- * an RPC_DATA_BLOB)
- **********************************************************************/
-
-typedef struct {
- uint32 buf_len;
- uint16 *buffer; /* data */
-} BUFFER5;
-
-
-/**********************************************************************
* UNICODE string variations
**********************************************************************/
@@ -130,12 +117,23 @@ typedef struct { /* UNISTR2 - unicode string size (in
should include the NULL character */
} UNISTR2;
-/* i think this is the same as a BUFFER5 used in the spoolss code --jerry */
-/* not sure about how the termination matches between the uint16 buffers thought */
-
-typedef struct { /* UNISTR3 - XXXX not sure about this structure */
- uint32 uni_str_len;
- UNISTR str;
-} UNISTR3;
+/*
+ * I'm really wondering how many different time formats
+ * I will have to cope with
+ *
+ * JFM, 09/13/98 In a mad mood ;-(
+*/
+typedef struct systemtime
+{
+ uint16 year;
+ uint16 month;
+ uint16 dayofweek;
+ uint16 day;
+ uint16 hour;
+ uint16 minute;
+ uint16 second;
+ uint16 milliseconds;
+}
+SYSTEMTIME;
#endif /* _RPC_MISC_H */
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
deleted file mode 100644
index eb2fdd5309..0000000000
--- a/source3/include/rpc_spoolss.h
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- Unix SMB/Netbios implementation.
-
- Copyright (C) Andrew Tridgell 1992-2000,
- Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
- Copyright (C) Jean Francois Micouleau 1998-2000.
- Copyright (C) Gerald Carter 2001-2006.
-
- 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
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "librpc/gen_ndr/spoolss.h"
-
-#ifndef _RPC_SPOOLSS_H /* _RPC_SPOOLSS_H */
-#define _RPC_SPOOLSS_H
-
-/* spoolss pipe: this are the calls which are not implemented ...
-#define SPOOLSS_GETPRINTERDRIVER 0x0b
-#define SPOOLSS_READPRINTER 0x16
-#define SPOOLSS_WAITFORPRINTERCHANGE 0x1c
-#define SPOOLSS_ADDPORT 0x25
-#define SPOOLSS_CONFIGUREPORT 0x26
-#define SPOOLSS_DELETEPORT 0x27
-#define SPOOLSS_CREATEPRINTERIC 0x28
-#define SPOOLSS_PLAYGDISCRIPTONPRINTERIC 0x29
-#define SPOOLSS_DELETEPRINTERIC 0x2a
-#define SPOOLSS_ADDPRINTERCONNECTION 0x2b
-#define SPOOLSS_DELETEPRINTERCONNECTION 0x2c
-#define SPOOLSS_PRINTERMESSAGEBOX 0x2d
-#define SPOOLSS_ADDMONITOR 0x2e
-#define SPOOLSS_DELETEMONITOR 0x2f
-#define SPOOLSS_DELETEPRINTPROCESSOR 0x30
-#define SPOOLSS_ADDPRINTPROVIDOR 0x31
-#define SPOOLSS_DELETEPRINTPROVIDOR 0x32
-#define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36
-#define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37
-#define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39
-#define SPOOLSS_ADDPORTEX 0x3d
-#define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e
-#define SPOOLSS_SPOOLERINIT 0x3f
-#define SPOOLSS_RESETPRINTEREX 0x40
-*/
-
-/* those are implemented */
-#define SPOOLSS_ENUMPRINTERS 0x00
-#define SPOOLSS_OPENPRINTER 0x01
-#define SPOOLSS_SETJOB 0x02
-#define SPOOLSS_GETJOB 0x03
-#define SPOOLSS_ENUMJOBS 0x04
-#define SPOOLSS_ADDPRINTER 0x05
-#define SPOOLSS_DELETEPRINTER 0x06
-#define SPOOLSS_SETPRINTER 0x07
-#define SPOOLSS_GETPRINTER 0x08
-#define SPOOLSS_ADDPRINTERDRIVER 0x09
-#define SPOOLSS_ENUMPRINTERDRIVERS 0x0a
-#define SPOOLSS_GETPRINTERDRIVERDIRECTORY 0x0c
-#define SPOOLSS_DELETEPRINTERDRIVER 0x0d
-#define SPOOLSS_ADDPRINTPROCESSOR 0x0e
-#define SPOOLSS_ENUMPRINTPROCESSORS 0x0f
-#define SPOOLSS_GETPRINTPROCESSORDIRECTORY 0x10
-#define SPOOLSS_STARTDOCPRINTER 0x11
-#define SPOOLSS_STARTPAGEPRINTER 0x12
-#define SPOOLSS_WRITEPRINTER 0x13
-#define SPOOLSS_ENDPAGEPRINTER 0x14
-#define SPOOLSS_ABORTPRINTER 0x15
-#define SPOOLSS_ENDDOCPRINTER 0x17
-#define SPOOLSS_ADDJOB 0x18
-#define SPOOLSS_SCHEDULEJOB 0x19
-#define SPOOLSS_GETPRINTERDATA 0x1a
-#define SPOOLSS_SETPRINTERDATA 0x1b
-#define SPOOLSS_CLOSEPRINTER 0x1d
-#define SPOOLSS_ADDFORM 0x1e
-#define SPOOLSS_DELETEFORM 0x1f
-#define SPOOLSS_GETFORM 0x20
-#define SPOOLSS_SETFORM 0x21
-#define SPOOLSS_ENUMFORMS 0x22
-#define SPOOLSS_ENUMPORTS 0x23
-#define SPOOLSS_ENUMMONITORS 0x24
-#define SPOOLSS_ENUMPRINTPROCDATATYPES 0x33
-#define SPOOLSS_RESETPRINTER 0x34
-#define SPOOLSS_GETPRINTERDRIVER2 0x35
-#define SPOOLSS_FCPN 0x38 /* FindClosePrinterNotify */
-#define SPOOLSS_REPLYOPENPRINTER 0x3a
-#define SPOOLSS_ROUTERREPLYPRINTER 0x3b
-#define SPOOLSS_REPLYCLOSEPRINTER 0x3c
-#define SPOOLSS_RFFPCNEX 0x41 /* RemoteFindFirstPrinterChangeNotifyEx */
-#define SPOOLSS_RRPCN 0x42 /* RouteRefreshPrinterChangeNotification */
-#define SPOOLSS_RFNPCNEX 0x43 /* RemoteFindNextPrinterChangeNotifyEx */
-#define SPOOLSS_OPENPRINTEREX 0x45
-#define SPOOLSS_ADDPRINTEREX 0x46
-#define SPOOLSS_ENUMPRINTERDATA 0x48
-#define SPOOLSS_DELETEPRINTERDATA 0x49
-#define SPOOLSS_SETPRINTERDATAEX 0x4d
-#define SPOOLSS_GETPRINTERDATAEX 0x4e
-#define SPOOLSS_ENUMPRINTERDATAEX 0x4f
-#define SPOOLSS_ENUMPRINTERKEY 0x50
-#define SPOOLSS_DELETEPRINTERDATAEX 0x51
-#define SPOOLSS_DELETEPRINTERKEY 0x52
-#define SPOOLSS_DELETEPRINTERDRIVEREX 0x54
-#define SPOOLSS_XCVDATAPORT 0x58
-#define SPOOLSS_ADDPRINTERDRIVEREX 0x59
-
-/*
- * Special strings for the OpenPrinter() call. See the MSDN DDK
- * docs on the XcvDataPort() for more details.
- */
-
-#define SPL_LOCAL_PORT "Local Port"
-#define SPL_TCPIP_PORT "Standard TCP/IP Port"
-#define SPL_XCV_MONITOR_LOCALMON ",XcvMonitor Local Port"
-#define SPL_XCV_MONITOR_TCPMON ",XcvMonitor Standard TCP/IP Port"
-
-/* Notify field types */
-
-#define PRINTER_NOTIFY_TYPE 0x00
-#define JOB_NOTIFY_TYPE 0x01
-
-#define PRINTER_NOTIFY_SERVER_NAME 0x00
-#define PRINTER_NOTIFY_PRINTER_NAME 0x01
-#define PRINTER_NOTIFY_SHARE_NAME 0x02
-#define PRINTER_NOTIFY_PORT_NAME 0x03
-#define PRINTER_NOTIFY_DRIVER_NAME 0x04
-#define PRINTER_NOTIFY_COMMENT 0x05
-#define PRINTER_NOTIFY_LOCATION 0x06
-#define PRINTER_NOTIFY_DEVMODE 0x07
-#define PRINTER_NOTIFY_SEPFILE 0x08
-#define PRINTER_NOTIFY_PRINT_PROCESSOR 0x09
-#define PRINTER_NOTIFY_PARAMETERS 0x0A
-#define PRINTER_NOTIFY_DATATYPE 0x0B
-#define PRINTER_NOTIFY_SECURITY_DESCRIPTOR 0x0C
-#define PRINTER_NOTIFY_ATTRIBUTES 0x0D
-#define PRINTER_NOTIFY_PRIORITY 0x0E
-#define PRINTER_NOTIFY_DEFAULT_PRIORITY 0x0F
-#define PRINTER_NOTIFY_START_TIME 0x10
-#define PRINTER_NOTIFY_UNTIL_TIME 0x11
-#define PRINTER_NOTIFY_STATUS 0x12
-#define PRINTER_NOTIFY_STATUS_STRING 0x13
-#define PRINTER_NOTIFY_CJOBS 0x14
-#define PRINTER_NOTIFY_AVERAGE_PPM 0x15
-#define PRINTER_NOTIFY_TOTAL_PAGES 0x16
-#define PRINTER_NOTIFY_PAGES_PRINTED 0x17
-#define PRINTER_NOTIFY_TOTAL_BYTES 0x18
-#define PRINTER_NOTIFY_BYTES_PRINTED 0x19
-
-#define JOB_NOTIFY_PRINTER_NAME 0x00
-#define JOB_NOTIFY_MACHINE_NAME 0x01
-#define JOB_NOTIFY_PORT_NAME 0x02
-#define JOB_NOTIFY_USER_NAME 0x03
-#define JOB_NOTIFY_NOTIFY_NAME 0x04
-#define JOB_NOTIFY_DATATYPE 0x05
-#define JOB_NOTIFY_PRINT_PROCESSOR 0x06
-#define JOB_NOTIFY_PARAMETERS 0x07
-#define JOB_NOTIFY_DRIVER_NAME 0x08
-#define JOB_NOTIFY_DEVMODE 0x09
-#define JOB_NOTIFY_STATUS 0x0A
-#define JOB_NOTIFY_STATUS_STRING 0x0B
-#define JOB_NOTIFY_SECURITY_DESCRIPTOR 0x0C
-#define JOB_NOTIFY_DOCUMENT 0x0D
-#define JOB_NOTIFY_PRIORITY 0x0E
-#define JOB_NOTIFY_POSITION 0x0F
-#define JOB_NOTIFY_SUBMITTED 0x10
-#define JOB_NOTIFY_START_TIME 0x11
-#define JOB_NOTIFY_UNTIL_TIME 0x12
-#define JOB_NOTIFY_TIME 0x13
-#define JOB_NOTIFY_TOTAL_PAGES 0x14
-#define JOB_NOTIFY_PAGES_PRINTED 0x15
-#define JOB_NOTIFY_TOTAL_BYTES 0x16
-#define JOB_NOTIFY_BYTES_PRINTED 0x17
-
-/*
- * Set of macros for flagging what changed in the PRINTER_INFO_2 struct
- * when sending messages to other smbd's
- */
-#define PRINTER_MESSAGE_NULL 0x00000000
-#define PRINTER_MESSAGE_DRIVER 0x00000001
-#define PRINTER_MESSAGE_COMMENT 0x00000002
-#define PRINTER_MESSAGE_PRINTERNAME 0x00000004
-#define PRINTER_MESSAGE_LOCATION 0x00000008
-#define PRINTER_MESSAGE_DEVMODE 0x00000010 /* not curently supported */
-#define PRINTER_MESSAGE_SEPFILE 0x00000020
-#define PRINTER_MESSAGE_PRINTPROC 0x00000040
-#define PRINTER_MESSAGE_PARAMS 0x00000080
-#define PRINTER_MESSAGE_DATATYPE 0x00000100
-#define PRINTER_MESSAGE_SECDESC 0x00000200
-#define PRINTER_MESSAGE_CJOBS 0x00000400
-#define PRINTER_MESSAGE_PORT 0x00000800
-#define PRINTER_MESSAGE_SHARENAME 0x00001000
-#define PRINTER_MESSAGE_ATTRIBUTES 0x00002000
-
-typedef struct printer_message_info {
- uint32 low; /* PRINTER_CHANGE_XXX */
- uint32 high; /* PRINTER_CHANGE_XXX */
- fstring printer_name;
- uint32 flags; /* PRINTER_MESSAGE_XXX */
-}
-PRINTER_MESSAGE_INFO;
-
-/*
- * The printer attributes.
- * I #defined all of them (grabbed form MSDN)
- * I'm only using:
- * ( SHARED | NETWORK | RAW_ONLY )
- * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
- */
-
-#define PRINTER_ATTRIBUTE_SAMBA (PRINTER_ATTRIBUTE_RAW_ONLY|\
- PRINTER_ATTRIBUTE_SHARED|\
- PRINTER_ATTRIBUTE_LOCAL)
-#define PRINTER_ATTRIBUTE_NOT_SAMBA (PRINTER_ATTRIBUTE_NETWORK)
-
-#define NO_PRIORITY 0
-#define MAX_PRIORITY 99
-#define MIN_PRIORITY 1
-#define DEF_PRIORITY 1
-
-/* the flags of each printers */
-
-#define DRIVER_ANY_VERSION 0xffffffff
-#define DRIVER_MAX_VERSION 4
-
-
-/*
- * Devicemode structure
- */
-
-typedef struct devicemode
-{
- UNISTR devicename;
- uint16 specversion;
- uint16 driverversion;
- uint16 size;
- uint16 driverextra;
- uint32 fields;
- uint16 orientation;
- uint16 papersize;
- uint16 paperlength;
- uint16 paperwidth;
- uint16 scale;
- uint16 copies;
- uint16 defaultsource;
- uint16 printquality;
- uint16 color;
- uint16 duplex;
- uint16 yresolution;
- uint16 ttoption;
- uint16 collate;
- UNISTR formname;
- uint16 logpixels;
- uint32 bitsperpel;
- uint32 pelswidth;
- uint32 pelsheight;
- uint32 displayflags;
- uint32 displayfrequency;
- uint32 icmmethod;
- uint32 icmintent;
- uint32 mediatype;
- uint32 dithertype;
- uint32 reserved1;
- uint32 reserved2;
- uint32 panningwidth;
- uint32 panningheight;
- uint8 *dev_private;
-}
-DEVICEMODE;
-
-typedef struct _devmode_cont
-{
- uint32 size;
- uint32 devmode_ptr;
- DEVICEMODE *devmode;
-}
-DEVMODE_CTR;
-
-typedef struct _printer_default
-{
- uint32 datatype_ptr;
- UNISTR2 datatype;
- DEVMODE_CTR devmode_cont;
- uint32 access_required;
-}
-PRINTER_DEFAULT;
-
-/********************************************/
-
-typedef struct spool_q_getprinterdata
-{
- POLICY_HND handle;
- UNISTR2 valuename;
- uint32 size;
-}
-SPOOL_Q_GETPRINTERDATA;
-
-typedef struct spool_r_getprinterdata
-{
- uint32 type;
- uint32 size;
- uint8 *data;
- uint32 needed;
- WERROR status;
-}
-SPOOL_R_GETPRINTERDATA;
-
-typedef struct add_jobinfo_1
-{
- UNISTR path;
- uint32 job_number;
-}
-ADD_JOBINFO_1;
-
-
-/*
- * I'm really wondering how many different time formats
- * I will have to cope with
- *
- * JFM, 09/13/98 In a mad mood ;-(
-*/
-typedef struct systemtime
-{
- uint16 year;
- uint16 month;
- uint16 dayofweek;
- uint16 day;
- uint16 hour;
- uint16 minute;
- uint16 second;
- uint16 milliseconds;
-}
-SYSTEMTIME;
-
-/********************************************/
-
-typedef struct spool_q_enumprinterdata
-{
- POLICY_HND handle;
- uint32 index;
- uint32 valuesize;
- uint32 datasize;
-}
-SPOOL_Q_ENUMPRINTERDATA;
-
-typedef struct spool_r_enumprinterdata
-{
- uint32 valuesize;
- uint16 *value;
- uint32 realvaluesize;
- uint32 type;
- uint32 datasize;
- uint8 *data;
- uint32 realdatasize;
- WERROR status;
-}
-SPOOL_R_ENUMPRINTERDATA;
-
-typedef struct spool_q_setprinterdata
-{
- POLICY_HND handle;
- UNISTR2 value;
- uint32 type;
- uint32 max_len;
- uint8 *data;
- uint32 real_len;
- uint32 numeric_data;
-}
-SPOOL_Q_SETPRINTERDATA;
-
-typedef struct spool_r_setprinterdata
-{
- WERROR status;
-}
-SPOOL_R_SETPRINTERDATA;
-
-typedef struct _form
-{
- uint32 flags;
- uint32 name_ptr;
- uint32 size_x;
- uint32 size_y;
- uint32 left;
- uint32 top;
- uint32 right;
- uint32 bottom;
- UNISTR2 name;
-}
-FORM;
-
-typedef struct spool_q_enumprinterkey
-{
- POLICY_HND handle;
- UNISTR2 key;
- uint32 size;
-}
-SPOOL_Q_ENUMPRINTERKEY;
-
-typedef struct spool_r_enumprinterkey
-{
- BUFFER5 keys;
- uint32 needed; /* in bytes */
- WERROR status;
-}
-SPOOL_R_ENUMPRINTERKEY;
-
-typedef struct printer_enum_values
-{
- UNISTR valuename;
- uint32 value_len;
- uint32 type;
- uint8 *data;
- uint32 data_len;
-
-}
-PRINTER_ENUM_VALUES;
-
-typedef struct printer_enum_values_ctr
-{
- uint32 size;
- uint32 size_of_array;
- PRINTER_ENUM_VALUES *values;
-}
-PRINTER_ENUM_VALUES_CTR;
-
-typedef struct spool_q_enumprinterdataex
-{
- POLICY_HND handle;
- UNISTR2 key;
- uint32 size;
-}
-SPOOL_Q_ENUMPRINTERDATAEX;
-
-typedef struct spool_r_enumprinterdataex
-{
- PRINTER_ENUM_VALUES_CTR ctr;
- uint32 needed;
- uint32 returned;
- WERROR status;
-}
-SPOOL_R_ENUMPRINTERDATAEX;
-
-#endif /* _RPC_SPOOLSS_H */
-
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index fd1bba16a7..22cfaaf581 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -256,7 +256,9 @@ NULL returns on zero request. JRA.
#define TALLOC_REALLOC(ctx, ptr, count) _talloc_realloc(ctx, ptr, count, __location__)
#define TALLOC_REALLOC_ARRAY(ctx, ptr, type, count) (type *)_talloc_realloc_array(ctx, ptr, sizeof(type), count, #type)
#define talloc_destroy(ctx) talloc_free(ctx)
+#ifndef TALLOC_FREE
#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+#endif
/* only define PARANOID_MALLOC_CHECKER with --enable-developer */
diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h
index fd9b669710..eaec0d11da 100644
--- a/source3/include/wbc_async.h
+++ b/source3/include/wbc_async.h
@@ -22,23 +22,18 @@
#include "nsswitch/libwbclient/wbclient.h"
-struct wb_context {
- struct async_req_queue *queue;
- int fd;
- bool is_priv;
-};
+struct wb_context;
-struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct wb_context *wb_ctx, bool need_priv,
- struct winbindd_request *wb_req);
-wbcErr wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+struct tevent_req *wb_trans_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct wb_context *wb_ctx, bool need_priv,
+ struct winbindd_request *wb_req);
+wbcErr wb_trans_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
struct winbindd_response **presponse);
struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx);
/* Definitions from wb_reqtrans.c */
-bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err);
wbcErr map_wbc_err_from_errno(int error);
-wbcErr async_req_simple_recv_wbcerr(struct async_req *req);
bool tevent_req_is_wbcerr(struct tevent_req *req, wbcErr *pwbc_err);
wbcErr tevent_req_simple_recv_wbcerr(struct tevent_req *req);