diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/ads.h | 6 | ||||
-rw-r--r-- | source3/include/ntdomain.h | 9 | ||||
-rw-r--r-- | source3/include/proto.h | 144 | ||||
-rw-r--r-- | source3/include/rpc_client.h | 1 | ||||
-rw-r--r-- | source3/include/rpc_spoolss.h | 297 | ||||
-rw-r--r-- | source3/include/smb.h | 1 | ||||
-rw-r--r-- | source3/include/wbc_async.h | 68 |
7 files changed, 80 insertions, 446 deletions
diff --git a/source3/include/ads.h b/source3/include/ads.h index abff9eaa8c..0fa19b55a6 100644 --- a/source3/include/ads.h +++ b/source3/include/ads.h @@ -364,12 +364,6 @@ typedef void **ADS_MODLIST; #ifdef HAVE_KRB5 typedef struct { - NTSTATUS ntstatus; - uint32 unknown1; - uint32 unknown2; /* 0x00000001 */ -} KRB5_EDATA_NTSTATUS; - -typedef struct { #if defined(HAVE_MAGIC_IN_KRB5_ADDRESS) && defined(HAVE_ADDRTYPE_IN_KRB5_ADDRESS) /* MIT */ krb5_address **addrs; #elif defined(HAVE_KRB5_ADDRESSES) /* Heimdal */ diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 2d6a358391..0eff9bdbac 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -70,13 +70,10 @@ typedef struct _output_data { uint32 data_sent_length; /* - * The current PDU being returned. This inclues + * The current fragment being returned. This inclues * headers, data and authentication footer. */ - unsigned char current_pdu[RPC_MAX_PDU_FRAG_LEN]; - - /* The amount of data in the current_pdu buffer. */ - uint32 current_pdu_len; + prs_struct frag; /* The amount of data sent from the current PDU. */ uint32 current_pdu_sent; @@ -89,7 +86,7 @@ typedef struct _input_data { * pdu is seen, then the data is copied into the in_data * structure. The maximum size of this is 0x1630 (RPC_MAX_PDU_FRAG_LEN). */ - unsigned char current_in_pdu[RPC_MAX_PDU_FRAG_LEN]; + uint8_t *current_in_pdu; /* * The amount of data needed to complete the in_pdu. diff --git a/source3/include/proto.h b/source3/include/proto.h index 267ee74482..5009e6dcdb 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -2267,6 +2267,7 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads, #include "librpc/gen_ndr/srv_svcctl.h" #include "librpc/gen_ndr/srv_winreg.h" #include "librpc/gen_ndr/srv_wkssvc.h" +#include "librpc/gen_ndr/srv_spoolss.h" #include "librpc/ndr/libndr.h" @@ -4787,11 +4788,12 @@ 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); -bool add_a_form(nt_forms_struct **list, const FORM *form, int *count); -bool delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR *ret); -void update_a_form(nt_forms_struct **list, const FORM *form, int count); +bool add_a_form(nt_forms_struct **list, struct spoolss_AddFormInfo1 *form, int *count); +bool delete_a_form(nt_forms_struct **list, const char *del_name, int *count, WERROR *ret); +void update_a_form(nt_forms_struct **list, struct spoolss_AddFormInfo1 *form, int count); int get_ntdrivers(fstring **list, const char *architecture, uint32 version); const char *get_short_archi(const char *long_archi); WERROR clean_up_driver_struct(struct pipes_struct *rpc_pipe, @@ -5427,8 +5429,6 @@ NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli, WERROR rpccli_spoolss_open_printer_ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *printername, const char *datatype, uint32 access_required, const char *station, const char *username, POLICY_HND *pol); -WERROR rpccli_spoolss_close_printer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol); WERROR rpccli_spoolss_enum_printers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, char *name, uint32 flags, uint32 level, uint32 *num_printers, PRINTER_INFO_CTR *ctr); @@ -5458,26 +5458,10 @@ WERROR rpccli_spoolss_addprinterdriver (struct rpc_pipe_client *cli, PRINTER_DRIVER_CTR *ctr); WERROR rpccli_spoolss_addprinterex (struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32 level, PRINTER_INFO_CTR*ctr); -WERROR rpccli_spoolss_deleteprinterdriverex(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, const char *arch, - const char *driver, int version); -WERROR rpccli_spoolss_deleteprinterdriver (struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, const char *arch, - const char *driver); WERROR rpccli_spoolss_getprintprocessordirectory(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, char *name, char *environment, fstring procdir); -WERROR rpccli_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *handle, uint32 level, FORM *form); -WERROR rpccli_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *handle, uint32 level, - const char *form_name, FORM *form); -WERROR rpccli_spoolss_getform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *handle, const char *formname, - uint32 level, FORM_1 *form); -WERROR rpccli_spoolss_deleteform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *handle, const char *form_name); WERROR rpccli_spoolss_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *handle, int level, uint32 *num_forms, FORM_1 **forms); @@ -5490,16 +5474,10 @@ WERROR rpccli_spoolss_setjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hnd, uint32 jobid, uint32 level, JOB_INFO_CTR *ctr); -WERROR rpccli_spoolss_startpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd); -WERROR rpccli_spoolss_endpageprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd); WERROR rpccli_spoolss_startdocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hnd, char *docname, char *outputfile, char *datatype, uint32 *jobid); -WERROR rpccli_spoolss_enddocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd); WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hnd, const char *valuename, REGISTRY_VALUE *value); @@ -5520,19 +5498,9 @@ WERROR rpccli_spoolss_enumprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *m 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_writeprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd, uint32 data_size, char *data, - uint32 *num_written); -WERROR rpccli_spoolss_deleteprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd, char *valuename); -WERROR rpccli_spoolss_deleteprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd, char *keyname, - char *valuename); 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_deleteprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd, char *keyname); /* The following definitions come from rpc_client/cli_spoolss_notify.c */ @@ -5854,19 +5822,6 @@ bool spoolss_io_q_open_printer(const char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_ bool spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth); bool spoolss_io_q_open_printer_ex(const char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth); bool spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth); -bool make_spoolss_q_deleteprinterdriverex( TALLOC_CTX *mem_ctx, - SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, - const char *server, - const char* arch, - const char* driver, - int version); -bool make_spoolss_q_deleteprinterdriver( - TALLOC_CTX *mem_ctx, - SPOOL_Q_DELETEPRINTERDRIVER *q_u, - const char *server, - const char* arch, - const char* driver -); bool make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u, const POLICY_HND *handle, const char *valuename, uint32 size); @@ -5875,32 +5830,9 @@ bool make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u, const char *keyname, 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_q_deleteprinterdata(const char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_deleteprinterdata(const char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_deleteprinterdataex(const char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_deleteprinterdataex(const char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth); bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth); -bool make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd); -bool spoolss_io_q_abortprinter(const char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_abortprinter(const char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_deleteprinter(const char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_deleteprinter(const char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_deleteprinterdriver(const char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_deleteprinterdriver(const char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_deleteprinterdriverex(const char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_deleteprinterdriverex(const char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_closeprinter(const char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_closeprinter(const char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth); bool spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth); bool spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_enddocprinter(const char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_enddocprinter(const char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_startpageprinter(const char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_startpageprinter(const char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_endpageprinter(const char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_endpageprinter(const char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_writeprinter(const char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_writeprinter(const char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth); bool spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth); bool spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth); bool spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth); @@ -5990,8 +5922,6 @@ bool make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u, uint32 command); bool spoolss_io_r_setprinter(const char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth); bool spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_fcpn(const char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_fcpn(const char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth); bool spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth); bool spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth); bool spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth); @@ -6015,8 +5945,6 @@ bool make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u, bool spoolss_io_q_enumprinterdrivers(const char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth); bool spoolss_io_q_enumforms(const char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth); bool spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_getform(const char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_getform(const char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth); bool spoolss_io_r_enumports(const char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth); bool spoolss_io_q_enumports(const char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth); bool spool_io_printer_info_level_1(const char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth); @@ -6080,12 +6008,6 @@ bool spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u, bool spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth); bool spoolss_io_q_resetprinter(const char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth); bool spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_deleteform(const char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_deleteform(const char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_addform(const char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_addform(const char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth); -bool spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth); bool spoolss_io_r_getjob(const char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth); bool spoolss_io_q_getjob(const char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth); void free_devmode(DEVICEMODE *devmode); @@ -6122,25 +6044,12 @@ bool make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u, 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 make_spoolss_q_deleteprinterkey(SPOOL_Q_DELETEPRINTERKEY *q_u, - POLICY_HND *hnd, char *keyname); -bool spoolss_io_q_deleteprinterkey(const char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_deleteprinterkey(const char *desc, SPOOL_R_DELETEPRINTERKEY *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); bool make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, const char *name, char *environment, int level, RPC_BUFFER *buffer, uint32 offered); bool spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth); bool spoolss_io_r_getprintprocessordirectory(const char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth); bool smb_io_printprocessordirectory_1(const char *desc, RPC_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth); -bool make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle, - int level, FORM *form); -bool make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle, - int level, const char *form_name, FORM *form); -bool make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, - const char *form); -bool make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle, - const char *formname, uint32 level, - RPC_BUFFER *buffer, uint32 offered); bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, uint32 level, RPC_BUFFER *buffer, uint32 offered); @@ -6149,24 +6058,10 @@ bool make_spoolss_q_setjob(SPOOL_Q_SETJOB *q_u, POLICY_HND *handle, bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle, uint32 jobid, uint32 level, RPC_BUFFER *buffer, uint32 offered); -bool make_spoolss_q_startpageprinter(SPOOL_Q_STARTPAGEPRINTER *q_u, - POLICY_HND *handle); -bool make_spoolss_q_endpageprinter(SPOOL_Q_ENDPAGEPRINTER *q_u, - POLICY_HND *handle); bool make_spoolss_q_startdocprinter(SPOOL_Q_STARTDOCPRINTER *q_u, POLICY_HND *handle, uint32 level, char *docname, char *outputfile, char *datatype); -bool make_spoolss_q_enddocprinter(SPOOL_Q_ENDDOCPRINTER *q_u, - POLICY_HND *handle); -bool make_spoolss_q_writeprinter(SPOOL_Q_WRITEPRINTER *q_u, - POLICY_HND *handle, uint32 data_size, - char *data); -bool make_spoolss_q_deleteprinterdata(SPOOL_Q_DELETEPRINTERDATA *q_u, - POLICY_HND *handle, char *valuename); -bool make_spoolss_q_deleteprinterdataex(SPOOL_Q_DELETEPRINTERDATAEX *q_u, - POLICY_HND *handle, char *key, - char *value); bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle, uint32 flags, uint32 options, const char *localmachine, uint32 printerlocal, SPOOL_NOTIFY_OPTION *option); @@ -6277,8 +6172,8 @@ void copy_id25_to_sam_passwd(struct samu *to, /* The following definitions come from rpc_server/srv_spoolss.c */ -void spoolss_get_pipe_fns( struct api_struct **fns, int *n_fns ); -NTSTATUS rpc_spoolss_init(void); +void spoolss2_get_pipe_fns( struct api_struct **fns, int *n_fns ); +NTSTATUS rpc_spoolss2_init(void); /* The following definitions come from rpc_server/srv_spoolss_nt.c */ @@ -6298,10 +6193,6 @@ WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u); bool convert_devicemode(const char *printername, const DEVICEMODE *devmode, NT_DEVICEMODE **pp_nt_devmode); -WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R_CLOSEPRINTER *r_u); -WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL_R_DELETEPRINTER *r_u); -WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER *q_u, SPOOL_R_DELETEPRINTERDRIVER *r_u); -WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, SPOOL_R_DELETEPRINTERDRIVEREX *r_u); 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); @@ -6377,23 +6268,16 @@ DEVICEMODE *construct_dev_mode(const char *servicename); WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u); WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GETPRINTER *r_u); WERROR _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_u, SPOOL_R_GETPRINTERDRIVER2 *r_u); -WERROR _spoolss_startpageprinter(pipes_struct *p, SPOOL_Q_STARTPAGEPRINTER *q_u, SPOOL_R_STARTPAGEPRINTER *r_u); -WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPOOL_R_ENDPAGEPRINTER *r_u); WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, SPOOL_R_STARTDOCPRINTER *r_u); -WERROR _spoolss_enddocprinter(pipes_struct *p, SPOOL_Q_ENDDOCPRINTER *q_u, SPOOL_R_ENDDOCPRINTER *r_u); -WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R_WRITEPRINTER *r_u); -WERROR _spoolss_abortprinter(pipes_struct *p, SPOOL_Q_ABORTPRINTER *q_u, SPOOL_R_ABORTPRINTER *r_u); 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 _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SETPRINTER *r_u); -WERROR _spoolss_fcpn(pipes_struct *p, SPOOL_Q_FCPN *q_u, SPOOL_R_FCPN *r_u); WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB *r_u); WERROR _spoolss_enumjobs( pipes_struct *p, SPOOL_Q_ENUMJOBS *q_u, SPOOL_R_ENUMJOBS *r_u); WERROR _spoolss_schedulejob( pipes_struct *p, SPOOL_Q_SCHEDULEJOB *q_u, SPOOL_R_SCHEDULEJOB *r_u); WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB *r_u); WERROR _spoolss_enumprinterdrivers( pipes_struct *p, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, SPOOL_R_ENUMPRINTERDRIVERS *r_u); WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMFORMS *r_u); -WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *r_u); WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines ); WERROR _spoolss_enumports( pipes_struct *p, SPOOL_Q_ENUMPORTS *q_u, SPOOL_R_ENUMPORTS *r_u); WERROR _spoolss_addprinterex( pipes_struct *p, SPOOL_Q_ADDPRINTEREX *q_u, SPOOL_R_ADDPRINTEREX *r_u); @@ -6403,19 +6287,13 @@ WERROR _spoolss_getprinterdriverdirectory(pipes_struct *p, SPOOL_Q_GETPRINTERDRI 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_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u); -WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u); -WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM *r_u); -WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DELETEFORM *r_u); -WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *r_u); WERROR _spoolss_enumprintprocessors(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, SPOOL_R_ENUMPRINTPROCESSORS *r_u); WERROR _spoolss_enumprintprocdatatypes(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u); WERROR _spoolss_enumprintmonitors(pipes_struct *p, SPOOL_Q_ENUMPRINTMONITORS *q_u, SPOOL_R_ENUMPRINTMONITORS *r_u); WERROR _spoolss_getjob( pipes_struct *p, SPOOL_Q_GETJOB *q_u, SPOOL_R_GETJOB *r_u); WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, SPOOL_R_GETPRINTERDATAEX *r_u); WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u, SPOOL_R_SETPRINTERDATAEX *r_u); -WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX *q_u, SPOOL_R_DELETEPRINTERDATAEX *r_u); WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPOOL_R_ENUMPRINTERKEY *r_u); -WERROR _spoolss_deleteprinterkey(pipes_struct *p, SPOOL_Q_DELETEPRINTERKEY *q_u, SPOOL_R_DELETEPRINTERKEY *r_u); WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u); WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u); WERROR _spoolss_xcvdataport(pipes_struct *p, SPOOL_Q_XCVDATAPORT *q_u, SPOOL_R_XCVDATAPORT *r_u); @@ -7609,12 +7487,4 @@ NTSTATUS nss_info_template_init( void ); /* Misc protos */ -struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, - struct wb_context *wb_ctx, bool need_priv, - const struct winbindd_request *wb_req); -NTSTATUS wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx, - struct winbindd_response **presponse); -struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx); - - #endif /* _PROTO_H_ */ diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 61b861c3b4..afa18899ca 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -37,6 +37,7 @@ #include "librpc/gen_ndr/cli_ntsvcs.h" #include "librpc/gen_ndr/cli_epmapper.h" #include "librpc/gen_ndr/cli_drsuapi.h" +#include "librpc/gen_ndr/cli_spoolss.h" #define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, (_ctx_), (_io_)) diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h index 32909335d6..feabd3fff7 100644 --- a/source3/include/rpc_spoolss.h +++ b/source3/include/rpc_spoolss.h @@ -217,57 +217,6 @@ #define PRINTER_NOTIFY_OPTIONS_REFRESH 0x01 -#define PRINTER_CHANGE_ADD_PRINTER 0x00000001 -#define PRINTER_CHANGE_SET_PRINTER 0x00000002 -#define PRINTER_CHANGE_DELETE_PRINTER 0x00000004 -#define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 0x00000008 -#define PRINTER_CHANGE_PRINTER (PRINTER_CHANGE_ADD_PRINTER | \ - PRINTER_CHANGE_SET_PRINTER | \ - PRINTER_CHANGE_DELETE_PRINTER | \ - PRINTER_CHANGE_FAILED_CONNECTION_PRINTER ) - -#define PRINTER_CHANGE_ADD_JOB 0x00000100 -#define PRINTER_CHANGE_SET_JOB 0x00000200 -#define PRINTER_CHANGE_DELETE_JOB 0x00000400 -#define PRINTER_CHANGE_WRITE_JOB 0x00000800 -#define PRINTER_CHANGE_JOB (PRINTER_CHANGE_ADD_JOB | \ - PRINTER_CHANGE_SET_JOB | \ - PRINTER_CHANGE_DELETE_JOB | \ - PRINTER_CHANGE_WRITE_JOB ) - -#define PRINTER_CHANGE_ADD_FORM 0x00010000 -#define PRINTER_CHANGE_SET_FORM 0x00020000 -#define PRINTER_CHANGE_DELETE_FORM 0x00040000 -#define PRINTER_CHANGE_FORM (PRINTER_CHANGE_ADD_FORM | \ - PRINTER_CHANGE_SET_FORM | \ - PRINTER_CHANGE_DELETE_FORM ) - -#define PRINTER_CHANGE_ADD_PORT 0x00100000 -#define PRINTER_CHANGE_CONFIGURE_PORT 0x00200000 -#define PRINTER_CHANGE_DELETE_PORT 0x00400000 -#define PRINTER_CHANGE_PORT (PRINTER_CHANGE_ADD_PORT | \ - PRINTER_CHANGE_CONFIGURE_PORT | \ - PRINTER_CHANGE_DELETE_PORT ) - -#define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x01000000 -#define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x04000000 -#define PRINTER_CHANGE_PRINT_PROCESSOR (PRINTER_CHANGE_ADD_PRINT_PROCESSOR | \ - PRINTER_CHANGE_DELETE_PRINT_PROCESSOR ) - -#define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000 -#define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000 -#define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000 -#define PRINTER_CHANGE_PRINTER_DRIVER (PRINTER_CHANGE_ADD_PRINTER_DRIVER | \ - PRINTER_CHANGE_SET_PRINTER_DRIVER | \ - PRINTER_CHANGE_DELETE_PRINTER_DRIVER ) - -#define PRINTER_CHANGE_TIMEOUT 0x80000000 -#define PRINTER_CHANGE_ALL (PRINTER_CHANGE_JOB | \ - PRINTER_CHANGE_FORM | \ - PRINTER_CHANGE_PORT | \ - PRINTER_CHANGE_PRINT_PROCESSOR | \ - PRINTER_CHANGE_PRINTER_DRIVER ) - #define PRINTER_NOTIFY_INFO_DISCARDED 0x1 /* @@ -317,14 +266,6 @@ PRINTER_MESSAGE_INFO; #define DEF_PRIORITY 1 /* the flags of each printers */ -#define PRINTER_ENUM_UNKNOWN_8 0x00000008 -#define PRINTER_ENUM_ICONMASK 0x00ff0000 - -/* FLAGS for SPOOLSS_DELETEPRINTERDRIVEREX */ - -#define DPD_DELETE_UNUSED_FILES 0x00000001 -#define DPD_DELETE_SPECIFIC_VERSION 0x00000002 -#define DPD_DELETE_ALL_FILES 0x00000004 #define DRIVER_ANY_VERSION 0xffffffff #define DRIVER_MAX_VERSION 4 @@ -532,90 +473,6 @@ typedef struct spool_r_getprinterdata } SPOOL_R_GETPRINTERDATA; -typedef struct spool_q_deleteprinterdata -{ - POLICY_HND handle; - UNISTR2 valuename; -} -SPOOL_Q_DELETEPRINTERDATA; - -typedef struct spool_r_deleteprinterdata -{ - WERROR status; -} -SPOOL_R_DELETEPRINTERDATA; - -typedef struct spool_q_closeprinter -{ - POLICY_HND handle; -} -SPOOL_Q_CLOSEPRINTER; - -typedef struct spool_r_closeprinter -{ - POLICY_HND handle; - WERROR status; -} -SPOOL_R_CLOSEPRINTER; - -typedef struct spool_q_startpageprinter -{ - POLICY_HND handle; -} -SPOOL_Q_STARTPAGEPRINTER; - -typedef struct spool_r_startpageprinter -{ - WERROR status; -} -SPOOL_R_STARTPAGEPRINTER; - -typedef struct spool_q_endpageprinter -{ - POLICY_HND handle; -} -SPOOL_Q_ENDPAGEPRINTER; - -typedef struct spool_r_endpageprinter -{ - WERROR status; -} -SPOOL_R_ENDPAGEPRINTER; - - -typedef struct spool_q_deleteprinterdriver -{ - uint32 server_ptr; - UNISTR2 server; - UNISTR2 arch; - UNISTR2 driver; -} -SPOOL_Q_DELETEPRINTERDRIVER; - -typedef struct spool_r_deleteprinterdriver -{ - WERROR status; -} -SPOOL_R_DELETEPRINTERDRIVER; - -typedef struct spool_q_deleteprinterdriverex -{ - uint32 server_ptr; - UNISTR2 server; - UNISTR2 arch; - UNISTR2 driver; - uint32 delete_flags; - uint32 version; -} -SPOOL_Q_DELETEPRINTERDRIVEREX; - -typedef struct spool_r_deleteprinterdriverex -{ - WERROR status; -} -SPOOL_R_DELETEPRINTERDRIVEREX; - - typedef struct spool_doc_info_1 { uint32 p_docname; @@ -655,34 +512,6 @@ typedef struct spool_r_startdocprinter } SPOOL_R_STARTDOCPRINTER; -typedef struct spool_q_enddocprinter -{ - POLICY_HND handle; -} -SPOOL_Q_ENDDOCPRINTER; - -typedef struct spool_r_enddocprinter -{ - WERROR status; -} -SPOOL_R_ENDDOCPRINTER; - -typedef struct spool_q_writeprinter -{ - POLICY_HND handle; - uint32 buffer_size; - uint8 *buffer; - uint32 buffer_size2; -} -SPOOL_Q_WRITEPRINTER; - -typedef struct spool_r_writeprinter -{ - uint32 buffer_written; - WERROR status; -} -SPOOL_R_WRITEPRINTER; - typedef struct spool_notify_option { uint32 version; @@ -763,20 +592,6 @@ typedef struct spool_r_rfnpcnex } SPOOL_R_RFNPCNEX; -/* Find Close Printer Notify */ -typedef struct spool_q_fcpn -{ - POLICY_HND handle; -} -SPOOL_Q_FCPN; - -typedef struct spool_r_fcpn -{ - WERROR status; -} -SPOOL_R_FCPN; - - typedef struct printer_info_0 { UNISTR printername; @@ -1329,24 +1144,6 @@ typedef struct spool_r_enumforms } SPOOL_R_ENUMFORMS; -typedef struct spool_q_getform -{ - POLICY_HND handle; - UNISTR2 formname; - uint32 level; - RPC_BUFFER *buffer; - uint32 offered; -} -SPOOL_Q_GETFORM; - -typedef struct spool_r_getform -{ - RPC_BUFFER *buffer; - uint32 needed; - WERROR status; -} -SPOOL_R_GETFORM; - typedef struct spool_printer_info_level_1 { uint32 flags; @@ -1518,28 +1315,6 @@ SPOOL_R_SETPRINTER; /********************************************/ typedef struct { - POLICY_HND handle; -} SPOOL_Q_DELETEPRINTER; - -typedef struct { - POLICY_HND handle; - WERROR status; -} SPOOL_R_DELETEPRINTER; - -/********************************************/ - -typedef struct { - POLICY_HND handle; -} SPOOL_Q_ABORTPRINTER; - -typedef struct { - WERROR status; -} SPOOL_R_ABORTPRINTER; - - -/********************************************/ - -typedef struct { UNISTR2 *server_name; uint32 level; SPOOL_PRINTER_INFO_LEVEL info; @@ -1796,50 +1571,6 @@ typedef struct _form } FORM; -typedef struct spool_q_addform -{ - POLICY_HND handle; - uint32 level; - uint32 level2; /* This should really be part of the FORM structure */ - FORM form; -} -SPOOL_Q_ADDFORM; - -typedef struct spool_r_addform -{ - WERROR status; -} -SPOOL_R_ADDFORM; - -typedef struct spool_q_setform -{ - POLICY_HND handle; - UNISTR2 name; - uint32 level; - uint32 level2; - FORM form; -} -SPOOL_Q_SETFORM; - -typedef struct spool_r_setform -{ - WERROR status; -} -SPOOL_R_SETFORM; - -typedef struct spool_q_deleteform -{ - POLICY_HND handle; - UNISTR2 name; -} -SPOOL_Q_DELETEFORM; - -typedef struct spool_r_deleteform -{ - WERROR status; -} -SPOOL_R_DELETEFORM; - typedef struct spool_q_getjob { POLICY_HND handle; @@ -1975,21 +1706,6 @@ typedef struct spool_r_setprinterdataex SPOOL_R_SETPRINTERDATAEX; -typedef struct spool_q_deleteprinterdataex -{ - POLICY_HND handle; - UNISTR2 keyname; - UNISTR2 valuename; -} -SPOOL_Q_DELETEPRINTERDATAEX; - -typedef struct spool_r_deleteprinterdataex -{ - WERROR status; -} -SPOOL_R_DELETEPRINTERDATAEX; - - typedef struct spool_q_enumprinterkey { POLICY_HND handle; @@ -2006,19 +1722,6 @@ typedef struct spool_r_enumprinterkey } SPOOL_R_ENUMPRINTERKEY; -typedef struct spool_q_deleteprinterkey -{ - POLICY_HND handle; - UNISTR2 keyname; -} -SPOOL_Q_DELETEPRINTERKEY; - -typedef struct spool_r_deleteprinterkey -{ - WERROR status; -} -SPOOL_R_DELETEPRINTERKEY; - typedef struct printer_enum_values { UNISTR valuename; diff --git a/source3/include/smb.h b/source3/include/smb.h index b441b3476a..eaf09dd09c 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -257,6 +257,7 @@ struct id_map { #include "librpc/gen_ndr/nbt.h" #include "librpc/gen_ndr/drsuapi.h" #include "librpc/gen_ndr/drsblobs.h" +#include "librpc/gen_ndr/spoolss.h" struct lsa_dom_info { bool valid; diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h new file mode 100644 index 0000000000..7a8768029a --- /dev/null +++ b/source3/include/wbc_async.h @@ -0,0 +1,68 @@ +/* + Unix SMB/CIFS implementation. + Headers for the async winbind client library + Copyright (C) Kai Blin 2009 + + 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/>. +*/ + +#ifndef _WBC_ASYNC_H_ +#define _WBC_ASYNC_H_ + +#include "nsswitch/libwbclient/wbclient.h" + +struct wb_context { + struct async_req_queue *queue; + int fd; + bool is_priv; +}; + +struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct wb_context *wb_ctx, bool need_priv, + const struct winbindd_request *wb_req); +wbcErr wb_trans_recv(struct async_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); + +struct async_req *wb_req_read_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + int fd, size_t max_extra_data); + +wbcErr wb_req_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx, + struct winbindd_request **preq); + +struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, int fd, + struct winbindd_request *wb_req); + +wbcErr wb_req_write_recv(struct async_req *req); + +struct async_req *wb_resp_read_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, int fd); + +wbcErr wb_resp_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx, + struct winbindd_response **presp); + +struct async_req *wb_resp_write_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, int fd, + struct winbindd_response *wb_resp); + +wbcErr wb_resp_write_recv(struct async_req *req); + +#endif /*_WBC_ASYNC_H_*/ |