diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/auth.h | 3 | ||||
-rw-r--r-- | source3/include/dbwrap.h | 4 | ||||
-rw-r--r-- | source3/include/includes.h | 10 | ||||
-rw-r--r-- | source3/include/libsmbclient.h | 20 | ||||
-rw-r--r-- | source3/include/locking.h | 1 | ||||
-rw-r--r-- | source3/include/nt_printing.h | 2 | ||||
-rw-r--r-- | source3/include/ntlmssp.h | 3 | ||||
-rw-r--r-- | source3/include/proto.h | 235 | ||||
-rw-r--r-- | source3/include/reg_db.h | 1 | ||||
-rw-r--r-- | source3/include/reg_objects.h | 16 | ||||
-rw-r--r-- | source3/include/regfio.h | 2 | ||||
-rw-r--r-- | source3/include/rpc_secdes.h | 3 | ||||
-rw-r--r-- | source3/include/rpc_spoolss.h | 388 | ||||
-rw-r--r-- | source3/include/smb.h | 56 | ||||
-rw-r--r-- | source3/include/smb_ldap.h | 255 | ||||
-rw-r--r-- | source3/include/smb_share_modes.h | 11 | ||||
-rw-r--r-- | source3/include/smbprofile.h | 28 | ||||
-rw-r--r-- | source3/include/vfs.h | 3 | ||||
-rw-r--r-- | source3/include/vfs_macros.h | 6 |
19 files changed, 193 insertions, 854 deletions
diff --git a/source3/include/auth.h b/source3/include/auth.h index 17bccce3d7..7d778b92d0 100644 --- a/source3/include/auth.h +++ b/source3/include/auth.h @@ -92,7 +92,8 @@ struct auth_context { struct auth_methods *auth_method_list; TALLOC_CTX *mem_ctx; - const uint8 *(*get_ntlm_challenge)(struct auth_context *auth_context); + void (*get_ntlm_challenge)(struct auth_context *auth_context, + uint8_t chal[8]); NTSTATUS (*check_ntlm_password)(const struct auth_context *auth_context, const struct auth_usersupplied_info *user_info, struct auth_serversupplied_info **server_info); diff --git a/source3/include/dbwrap.h b/source3/include/dbwrap.h index aad4ccd721..16f10cc125 100644 --- a/source3/include/dbwrap.h +++ b/source3/include/dbwrap.h @@ -46,6 +46,10 @@ struct db_context { int (*transaction_start)(struct db_context *db); int (*transaction_commit)(struct db_context *db); int (*transaction_cancel)(struct db_context *db); + int (*parse_record)(struct db_context *db, TDB_DATA key, + int (*parser)(TDB_DATA key, TDB_DATA data, + void *private_data), + void *private_data); void *private_data; bool persistent; }; diff --git a/source3/include/includes.h b/source3/include/includes.h index 1906830d48..523a11e255 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -190,12 +190,12 @@ typedef int ber_int_t; #undef HAVE_LDAP #endif -#if HAVE_GSSAPI_H -#include <gssapi.h> -#elif HAVE_GSSAPI_GSSAPI_H +#if HAVE_GSSAPI_GSSAPI_H #include <gssapi/gssapi.h> #elif HAVE_GSSAPI_GSSAPI_GENERIC_H #include <gssapi/gssapi_generic.h> +#elif HAVE_GSSAPI_H +#include <gssapi.h> #endif #if HAVE_COM_ERR_H @@ -577,6 +577,8 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx); #include "../talloc/talloc.h" #include "event.h" +#include "../lib/util/tevent_unix.h" +#include "../lib/util/tevent_ntstatus.h" #include "../lib/util/data_blob.h" #include "../lib/util/time.h" @@ -677,8 +679,6 @@ struct printjob; #include "smbldap.h" -#include "smb_ldap.h" - /* * Reasons for cache flush. */ diff --git a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h index f8a6c8a235..869aeb6a03 100644 --- a/source3/include/libsmbclient.h +++ b/source3/include/libsmbclient.h @@ -2677,12 +2677,24 @@ smbc_version(void); */ void -smbc_set_credentials(char *workgroup, - char *user, - char *password, +smbc_set_credentials(const char *workgroup, + const char *user, + const char *password, smbc_bool use_kerberos, - char *signing_state); + const char *signing_state); +/* + * Wrapper around smbc_set_credentials. + * Used to set correct credentials that will + * be used to connect to DFS target share + * in libsmbclient + */ + +void +smbc_set_credentials_with_fallback(SMBCCTX *ctx, + const char *workgroup, + const char *user, + const char *password); /** * @ingroup structure diff --git a/source3/include/locking.h b/source3/include/locking.h index 3fd5b94de7..1833ba3f80 100644 --- a/source3/include/locking.h +++ b/source3/include/locking.h @@ -49,6 +49,7 @@ struct file_id { other than a dev_t for the device */ uint64_t devid; uint64_t inode; + uint64_t extid; /* Support systems that use an extended id (e.g. snapshots). */ }; struct byte_range_lock { diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index 3bf51f2c9d..43fd363b55 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -439,7 +439,7 @@ typedef struct _Printer{ uint32 options; fstring localmachine; uint32 printerlocal; - SPOOL_NOTIFY_OPTION *option; + struct spoolss_NotifyOption *option; POLICY_HND client_hnd; bool client_connected; uint32 change; diff --git a/source3/include/ntlmssp.h b/source3/include/ntlmssp.h index 55b9249ea7..f3414fe928 100644 --- a/source3/include/ntlmssp.h +++ b/source3/include/ntlmssp.h @@ -109,7 +109,8 @@ typedef struct ntlmssp_state * @return 8 bytes of challnege data, determined by the server to be the challenge for NTLM authentication * */ - const uint8 *(*get_challenge)(const struct ntlmssp_state *ntlmssp_state); + void (*get_challenge)(const struct ntlmssp_state *ntlmssp_state, + uint8_t challenge[8]); /** * Callback to find if the challenge used by NTLM authentication may be modified diff --git a/source3/include/proto.h b/source3/include/proto.h index 3806c9657e..5bae973c3d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -110,7 +110,6 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info **server_info, NTSTATUS create_local_token(auth_serversupplied_info *server_info); NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username, bool is_guest, - bool force_nss, uid_t *uid, gid_t *gid, char **found_username, struct nt_user_token **token); @@ -508,12 +507,12 @@ void dump_core_setup(const char *progname); /* The following definitions come from lib/file_id.c */ -struct file_id file_id_create_dev(SMB_DEV_T dev, SMB_INO_T inode); struct file_id vfs_file_id_from_sbuf(connection_struct *conn, const SMB_STRUCT_STAT *sbuf); bool file_id_equal(const struct file_id *id1, const struct file_id *id2); const char *file_id_string_tos(const struct file_id *id); void push_file_id_16(char *buf, const struct file_id *id); -void pull_file_id_16(char *buf, struct file_id *id); +void push_file_id_24(char *buf, const struct file_id *id); +void pull_file_id_24(char *buf, struct file_id *id); /* The following definitions come from lib/gencache.c */ @@ -696,8 +695,13 @@ SEC_DESC *dup_sec_desc(TALLOC_CTX *ctx, const SEC_DESC *src); NTSTATUS marshall_sec_desc(TALLOC_CTX *mem_ctx, struct security_descriptor *secdesc, uint8 **data, size_t *len); +NTSTATUS marshall_sec_desc_buf(TALLOC_CTX *mem_ctx, + struct sec_desc_buf *secdesc_buf, + uint8_t **data, size_t *len); NTSTATUS unmarshall_sec_desc(TALLOC_CTX *mem_ctx, uint8 *data, size_t len, struct security_descriptor **psecdesc); +NTSTATUS unmarshall_sec_desc_buf(TALLOC_CTX *mem_ctx, uint8_t *data, size_t len, + struct sec_desc_buf **psecdesc_buf); SEC_DESC *make_standard_sec_desc(TALLOC_CTX *ctx, const DOM_SID *owner_sid, const DOM_SID *grp_sid, SEC_ACL *dacl, size_t *sd_size); SEC_DESC_BUF *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc); @@ -973,8 +977,6 @@ struct passwd *sys_getpwnam(const char *name); struct passwd *sys_getpwuid(uid_t uid); struct group *sys_getgrnam(const char *name); struct group *sys_getgrgid(gid_t gid); -pid_t sys_fork(void); -pid_t sys_getpid(void); int sys_popen(const char *command); int sys_pclose(int fd); ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t size); @@ -1139,11 +1141,9 @@ int set_message_bcc(char *buf,int num_bytes); ssize_t message_push_blob(uint8 **outbuf, DATA_BLOB blob); char *unix_clean_name(TALLOC_CTX *ctx, const char *s); char *clean_name(TALLOC_CTX *ctx, const char *s); -void close_low_fds(bool stderr_too); ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, SMB_OFF_T pos); int set_blocking(int fd, bool set); void smb_msleep(unsigned int t); -void become_daemon(bool Fork, bool no_process_group); bool reinit_after_fork(struct messaging_context *msg_ctx, struct event_context *ev_ctx, bool parent_longlived); @@ -1243,15 +1243,6 @@ bool is_valid_policy_hnd(const POLICY_HND *hnd); bool policy_hnd_equal(const struct policy_handle *hnd1, const struct policy_handle *hnd2); const char *strip_hostname(const char *s); -struct async_req *read_pkt_send(TALLOC_CTX *mem_ctx, - struct event_context *ev, - int fd, size_t initial, - ssize_t (*more)(uint8_t *buf, size_t buflen, - void *priv), - void *priv); -ssize_t read_pkt_recv(struct async_req *req, TALLOC_CTX *mem_ctx, - uint8_t **pbuf, int *perr); - /* The following definitions come from lib/util_file.c */ @@ -1432,12 +1423,12 @@ int open_socket_in(int type, bool rebind); NTSTATUS open_socket_out(const struct sockaddr_storage *pss, uint16_t port, int timeout, int *pfd); -struct async_req *open_socket_out_send(TALLOC_CTX *mem_ctx, - struct event_context *ev, - const struct sockaddr_storage *pss, - uint16_t port, - int timeout); -NTSTATUS open_socket_out_recv(struct async_req *req, int *pfd); +struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx, + struct event_context *ev, + const struct sockaddr_storage *pss, + 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, @@ -2283,6 +2274,9 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads, enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r); enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r); void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r); +enum ndr_err_code ndr_push_file_id(struct ndr_push *ndr, int ndr_flags, const struct file_id *r); +enum ndr_err_code ndr_pull_file_id(struct ndr_pull *ndr, int ndr_flags, struct file_id *r); +void ndr_print_file_id(struct ndr_print *ndr, const char *name, const struct file_id *r); _PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b); _PUBLIC_ void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss); const char *ndr_errstr(enum ndr_err_code err); @@ -3114,7 +3108,7 @@ struct packet_struct *receive_dgram_packet(int fd, int t, bool match_mailslot_name(struct packet_struct *p, const char *mailslot_name); int matching_len_bits(unsigned char *p1, unsigned char *p2, size_t len); void sort_query_replies(char *data, int n, struct in_addr ip); -int name_mangle( char *In, char *Out, char name_type ); +char *name_mangle(TALLOC_CTX *mem_ctx, char *In, char name_type); int name_extract(char *buf,int ofs, fstring name); int name_len(char *s1); @@ -3970,7 +3964,6 @@ const char *lp_afs_username_map(void); int lp_afs_token_lifetime(void); char *lp_log_nt_token_command(void); char *lp_username_map(void); -bool lp_force_username_map(void); const char *lp_logon_script(void); const char *lp_logon_path(void); const char *lp_logon_drive(void); @@ -4700,6 +4693,10 @@ NTSTATUS pdb_nds_init(void); NTSTATUS pdb_smbpasswd_init(void) ; +/* The following definitions come from passdb/pdb_wbc_sam.c */ + +NTSTATUS pdb_wbc_sam_init(void); + /* The following definitions come from passdb/pdb_tdb.c */ bool init_sam_from_buffer_v2(struct samu *sampass, uint8 *buf, uint32 buflen); @@ -5052,12 +5049,15 @@ WERROR init_registry_data(void); WERROR regdb_init(void); WERROR regdb_open( void ); int regdb_close( void ); +WERROR regdb_transaction_start(void); +WERROR regdb_transaction_commit(void); +WERROR regdb_transaction_cancel(void); int regdb_get_seqnum(void); -bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr); -int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr); +bool regdb_store_keys(const char *key, struct regsubkey_ctr *ctr); +int regdb_fetch_keys(const char *key, struct regsubkey_ctr *ctr); int regdb_fetch_values( const char* key, REGVAL_CTR *values ); bool regdb_store_values( const char *key, REGVAL_CTR *values ); -bool regdb_subkeys_need_update(REGSUBKEY_CTR *subkeys); +bool regdb_subkeys_need_update(struct regsubkey_ctr *subkeys); bool regdb_values_need_update(REGVAL_CTR *values); /* The following definitions come from registry/reg_backend_hkpt_params.c */ @@ -5093,9 +5093,11 @@ void reghook_dump_cache( int debuglevel ); /* The following definitions come from registry/reg_dispatcher.c */ -bool store_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys ); +bool store_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkeys ); bool store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ); -int fetch_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkey_ctr ); +WERROR create_reg_subkey(REGISTRY_KEY *key, const char *subkey); +WERROR delete_reg_subkey(REGISTRY_KEY *key, const char *subkey); +int fetch_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkey_ctr ); int fetch_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ); bool regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted, const struct nt_user_token *token ); @@ -5103,7 +5105,7 @@ WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key, struct security_descriptor **psecdesc); WERROR regkey_set_secdesc(REGISTRY_KEY *key, struct security_descriptor *psecdesc); -bool reg_subkeys_need_update(REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys); +bool reg_subkeys_need_update(REGISTRY_KEY *key, struct regsubkey_ctr *subkeys); bool reg_values_need_update(REGISTRY_KEY *key, REGVAL_CTR *values); /* The following definitions come from registry/reg_eventlog.c */ @@ -5129,11 +5131,14 @@ WERROR registry_init_smbconf(const char *keyname); /* The following definitions come from registry/reg_objects.c */ -WERROR regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, const char *keyname ); -int regsubkey_ctr_delkey( REGSUBKEY_CTR *ctr, const char *keyname ); -bool regsubkey_ctr_key_exists( REGSUBKEY_CTR *ctr, const char *keyname ); -int regsubkey_ctr_numkeys( REGSUBKEY_CTR *ctr ); -char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 key_index ); +WERROR regsubkey_ctr_init(TALLOC_CTX *mem_ctx, struct regsubkey_ctr **ctr); +WERROR regsubkey_ctr_set_seqnum(struct regsubkey_ctr *ctr, int seqnum); +int regsubkey_ctr_get_seqnum(struct regsubkey_ctr *ctr); +WERROR regsubkey_ctr_addkey( struct regsubkey_ctr *ctr, const char *keyname ); +WERROR regsubkey_ctr_delkey( struct regsubkey_ctr *ctr, const char *keyname ); +bool regsubkey_ctr_key_exists( struct regsubkey_ctr *ctr, const char *keyname ); +int regsubkey_ctr_numkeys( struct regsubkey_ctr *ctr ); +char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32 key_index ); int regval_ctr_numvals( REGVAL_CTR *ctr ); REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val ); void free_registry_value( REGISTRY_VALUE *val ); @@ -5472,40 +5477,49 @@ WERROR rpccli_spoolss_openprinter_ex(struct rpc_pipe_client *cli, const char *printername, uint32_t access_desired, struct policy_handle *handle); +WERROR rpccli_spoolss_getprinterdriver2(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + const char *architecture, + uint32_t level, + uint32_t offered, + uint32_t client_major_version, + uint32_t client_minor_version, + union spoolss_DriverInfo *info, + uint32_t *server_major_version, + uint32_t *server_minor_version); +WERROR rpccli_spoolss_addprinterex(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct spoolss_SetPrinterInfoCtr *info_ctr); +WERROR rpccli_spoolss_getprinter(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t level, + uint32_t offered, + union spoolss_PrinterInfo *info); +WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle, + uint32_t job_id, + uint32_t level, + uint32_t offered, + union spoolss_JobInfo *info); 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); WERROR rpccli_spoolss_enum_ports(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32 level, uint32 *num_ports, PORT_INFO_CTR *ctr); -WERROR rpccli_spoolss_getprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, - PRINTER_INFO_CTR *ctr); -WERROR rpccli_spoolss_setprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, - PRINTER_INFO_CTR *ctr, uint32 command); -WERROR rpccli_spoolss_getprinterdriver(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, - const char *env, int version, PRINTER_DRIVER_CTR *ctr); WERROR rpccli_spoolss_enumprinterdrivers (struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32 level, const char *env, uint32 *num_drivers, PRINTER_DRIVER_CTR *ctr); -WERROR rpccli_spoolss_addprinterdriver (struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, uint32 level, - 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_enumforms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *handle, int level, uint32 *num_forms, FORM_1 **forms); WERROR rpccli_spoolss_enumjobs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hnd, uint32 level, uint32 firstjob, uint32 num_jobs, uint32 *returned, JOB_INFO_CTR *ctr); -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_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *hnd, const char *valuename, REGISTRY_VALUE *value); @@ -5523,17 +5537,6 @@ WERROR rpccli_spoolss_enumprinterkey(struct rpc_pipe_client *cli, TALLOC_CTX *me POLICY_HND *hnd, const char *keyname, uint16 **keylist, uint32 *len); -/* The following definitions come from rpc_client/cli_spoolss_notify.c */ - -WERROR rpccli_spoolss_rrpcn(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 notify_data_len, - SPOOL_NOTIFY_INFO_DATA *notify_data, - uint32 change_low, uint32 change_high); -WERROR rpccli_spoolss_rffpcnex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 flags, uint32 options, - const char *localmachine, uint32 printerlocal, - SPOOL_NOTIFY_OPTION *option); - /* The following definitions come from rpc_client/init_spoolss.c */ bool init_systemtime(struct spoolss_Time *r, @@ -5818,28 +5821,12 @@ bool sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int bool spoolss_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime); bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime); -bool smb_io_notify_info_data_strings(const char *desc,SPOOL_NOTIFY_INFO_DATA *data, - prs_struct *ps, int depth); -bool spool_io_user_level_1( const char *desc, prs_struct *ps, int depth, SPOOL_USER_1 *q_u ); bool spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode); -bool make_spoolss_q_addprinterex( TALLOC_CTX *mem_ctx, SPOOL_Q_ADDPRINTEREX *q_u, - const char *srv_name, const char* clientname, const char* user_name, - uint32 level, PRINTER_INFO_CTR *ctr); -bool make_spoolss_printer_info_2(TALLOC_CTX *ctx, SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2, - PRINTER_INFO_2 *info); -bool make_spoolss_printer_info_3(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_3 **spool_info3, - PRINTER_INFO_3 *info); -bool make_spoolss_printer_info_7(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_7 **spool_info7, - PRINTER_INFO_7 *info); 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); -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); -bool spoolss_io_r_rfnpcnex(const char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth); bool smb_io_printer_info_0(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_0 *info, int depth); bool smb_io_printer_info_1(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_1 *info, int depth); bool smb_io_printer_info_2(const char *desc, RPC_BUFFER *buffer, PRINTER_INFO_2 *info, int depth); @@ -5887,11 +5874,6 @@ uint32 spoolss_size_printprocdatatype_info_1(PRINTPROCDATATYPE_1 *info); uint32 spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES *p); uint32 spoolss_size_printmonitor_info_1(PRINTMONITOR_1 *info); uint32 spoolss_size_printmonitor_info_2(PRINTMONITOR_2 *info); -bool make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u, - const POLICY_HND *hnd, - const fstring architecture, - uint32 level, uint32 clientmajor, uint32 clientminor, - RPC_BUFFER *buffer, uint32 offered); bool spoolss_io_q_getprinterdriver2(const char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth); bool spoolss_io_r_getprinterdriver2(const char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth); bool make_spoolss_q_enumprinters( @@ -5909,19 +5891,6 @@ bool spoolss_io_q_enumprinters(const char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_ bool spoolss_io_r_enumprinters(const char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth); bool spoolss_io_r_getprinter(const char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth); bool spoolss_io_q_getprinter(const char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth); -bool make_spoolss_q_getprinter( - TALLOC_CTX *mem_ctx, - SPOOL_Q_GETPRINTER *q_u, - const POLICY_HND *hnd, - uint32 level, - RPC_BUFFER *buffer, - uint32 offered -); -bool make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u, - const POLICY_HND *hnd, uint32 level, PRINTER_INFO_CTR *info, - 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_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth); bool make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd, uint32 firstjob, @@ -5941,31 +5910,7 @@ bool spoolss_io_q_enumforms(const char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct bool spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *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); -bool spool_io_printer_info_level_3(const char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, prs_struct *ps, int depth); -bool spool_io_printer_info_level_2(const char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth); -bool spool_io_printer_info_level_7(const char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, prs_struct *ps, int depth); -bool spool_io_printer_info_level(const char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth); -bool spoolss_io_q_addprinterex(const char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_addprinterex(const char *desc, SPOOL_R_ADDPRINTEREX *r_u, - prs_struct *ps, int depth); -bool spool_io_printer_driver_info_level_3(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **q_u, - prs_struct *ps, int depth); -bool spool_io_printer_driver_info_level_6(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 **q_u, - prs_struct *ps, int depth); -bool smb_io_unibuffer(const char *desc, UNISTR2 *buffer, prs_struct *ps, int depth); -bool spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth); -bool make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx, - SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name, - uint32 level, PRINTER_DRIVER_CTR *info); -bool make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx, - SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info, - DRIVER_INFO_3 *info3); bool make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src); -bool spoolss_io_q_addprinterdriver(const char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth); -bool uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni, - NT_PRINTER_INFO_LEVEL_2 *d); bool spoolss_io_r_enumprintprocessors(const char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth); bool spoolss_io_q_enumprintprocessors(const char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, prs_struct *ps, int depth); bool spoolss_io_r_enumprintprocdatatypes(const char *desc, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u, prs_struct *ps, int depth); @@ -5995,11 +5940,6 @@ void free_printer_info_5(PRINTER_INFO_5 *printer); void free_printer_info_6(PRINTER_INFO_6 *printer); void free_printer_info_7(PRINTER_INFO_7 *printer); void free_job_info_2(JOB_INFO_2 *job); -bool make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd, - uint32 change_low, uint32 change_high, - SPOOL_NOTIFY_INFO *info); -bool spoolss_io_q_reply_rrpcn(const char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth); -bool spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *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); @@ -6010,12 +5950,6 @@ bool spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX bool make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, uint32 level, RPC_BUFFER *buffer, uint32 offered); -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_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle, - uint32 flags, uint32 options, const char *localmachine, - uint32 printerlocal, SPOOL_NOTIFY_OPTION *option); /* The following definitions come from rpc_server/srv_eventlog_lib.c */ @@ -6141,74 +6075,75 @@ bool convert_devicemode(const char *printername, const DEVICEMODE *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); -WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNEX *r_u); void spoolss_notify_server_name(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_printer_name(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_share_name(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_port_name(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_driver_name(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_comment(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_location(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_sepfile(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_print_processor(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_parameters(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_datatype(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_attributes(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); void spoolss_notify_cjobs(int snum, - SPOOL_NOTIFY_INFO_DATA *data, + struct spoolss_Notify *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); -void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id); -WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u); +void construct_info_data(struct spoolss_Notify *info_data, + enum spoolss_NotifyType type, + enum spoolss_Field field, + int id); 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); @@ -6263,7 +6198,6 @@ bool init_service_op_table( void ); /* The following definitions come from rpcclient/cmd_spoolss.c */ -void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); /* The following definitions come from rpcclient/cmd_srvsvc.c */ @@ -6587,6 +6521,7 @@ files_struct *file_find_fsp(files_struct *orig_fsp); files_struct *file_find_di_first(struct file_id id); files_struct *file_find_di_next(files_struct *start_fsp); files_struct *file_find_print(void); +bool file_find_subpath(files_struct *dir_fsp); void file_sync_all(connection_struct *conn); void file_free(struct smb_request *req, files_struct *fsp); files_struct *file_fnum(uint16 fnum); diff --git a/source3/include/reg_db.h b/source3/include/reg_db.h index 92448ae543..5cafa0a5fb 100644 --- a/source3/include/reg_db.h +++ b/source3/include/reg_db.h @@ -26,5 +26,6 @@ #define REG_VALUE_PREFIX "SAMBA_REGVAL" #define REG_SECDESC_PREFIX "SAMBA_SECDESC" +#define REG_SORTED_SUBKEYS_PREFIX "SAMBA_SORTED_SUBKEYS" #endif /* _REG_DB_H */ diff --git a/source3/include/reg_objects.h b/source3/include/reg_objects.h index d9159dd464..a03ac1bff4 100644 --- a/source3/include/reg_objects.h +++ b/source3/include/reg_objects.h @@ -66,11 +66,7 @@ typedef struct { /* container for registry subkey names */ -typedef struct { - uint32 num_subkeys; - char **subkeys; - int seqnum; -} REGSUBKEY_CTR; +struct regsubkey_ctr; /* * @@ -132,9 +128,11 @@ typedef struct { typedef struct { /* functions for enumerating subkeys and values */ - int (*fetch_subkeys)( const char *key, REGSUBKEY_CTR *subkeys); + int (*fetch_subkeys)( const char *key, struct regsubkey_ctr *subkeys); int (*fetch_values) ( const char *key, REGVAL_CTR *val ); - bool (*store_subkeys)( const char *key, REGSUBKEY_CTR *subkeys ); + bool (*store_subkeys)( const char *key, struct regsubkey_ctr *subkeys ); + WERROR (*create_subkey)(const char *key, const char *subkey); + WERROR (*delete_subkey)(const char *key, const char *subkey); bool (*store_values)( const char *key, REGVAL_CTR *val ); bool (*reg_access_check)( const char *keyname, uint32 requested, uint32 *granted, @@ -143,7 +141,7 @@ typedef struct { struct security_descriptor **psecdesc); WERROR (*set_secdesc)(const char *key, struct security_descriptor *sec_desc); - bool (*subkeys_need_update)(REGSUBKEY_CTR *subkeys); + bool (*subkeys_need_update)(struct regsubkey_ctr *subkeys); bool (*values_need_update)(REGVAL_CTR *values); } REGISTRY_OPS; @@ -164,7 +162,7 @@ typedef struct _RegistryKey { struct registry_key { REGISTRY_KEY *key; - REGSUBKEY_CTR *subkeys; + struct regsubkey_ctr *subkeys; REGVAL_CTR *values; struct nt_user_token *token; }; diff --git a/source3/include/regfio.h b/source3/include/regfio.h index 63516a358d..0e957d51e5 100644 --- a/source3/include/regfio.h +++ b/source3/include/regfio.h @@ -214,7 +214,7 @@ int regfio_close( REGF_FILE *r ); REGF_NK_REC* regfio_rootkey( REGF_FILE *file ); REGF_NK_REC* regfio_fetch_subkey( REGF_FILE *file, REGF_NK_REC *nk ); REGF_NK_REC* regfio_write_key ( REGF_FILE *file, const char *name, - REGVAL_CTR *values, REGSUBKEY_CTR *subkeys, + REGVAL_CTR *values, struct regsubkey_ctr *subkeys, SEC_DESC *sec_desc, REGF_NK_REC *parent ); diff --git a/source3/include/rpc_secdes.h b/source3/include/rpc_secdes.h index a1cfad9003..4bf0d9cb9d 100644 --- a/source3/include/rpc_secdes.h +++ b/source3/include/rpc_secdes.h @@ -39,9 +39,6 @@ #define SEC_RIGHTS_RESET_PASSWD SEC_RIGHTS_EXTENDED #define SEC_RIGHTS_FULL_CTRL 0xf01ff -#define SEC_ACE_OBJECT_PRESENT 0x00000001 /* thanks for Jim McDonough <jmcd@us.ibm.com> */ -#define SEC_ACE_OBJECT_INHERITED_PRESENT 0x00000002 - /* * New Windows 2000 bits. */ diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h index 99da007d32..798bbf922c 100644 --- a/source3/include/rpc_spoolss.h +++ b/source3/include/rpc_spoolss.h @@ -123,39 +123,11 @@ #define PRINTER_STATUS_OK 0x00000000 -#define JOB_ACCESS_READ 0x00000020 - -/* JOB status codes. */ - -#define JOB_STATUS_QUEUED 0x0000 -#define JOB_STATUS_PAUSED 0x0001 -#define JOB_STATUS_ERROR 0x0002 -#define JOB_STATUS_DELETING 0x0004 -#define JOB_STATUS_SPOOLING 0x0008 -#define JOB_STATUS_PRINTING 0x0010 -#define JOB_STATUS_OFFLINE 0x0020 -#define JOB_STATUS_PAPEROUT 0x0040 -#define JOB_STATUS_PRINTED 0x0080 -#define JOB_STATUS_DELETED 0x0100 -#define JOB_STATUS_BLOCKED 0x0200 -#define JOB_STATUS_USER_INTERVENTION 0x0400 /* Notify field types */ -#define NOTIFY_ONE_VALUE 1 /* Notify data is stored in value1 */ -#define NOTIFY_TWO_VALUE 2 /* Notify data is stored in value2 */ -#define NOTIFY_POINTER 3 /* Data is a pointer to a buffer */ -#define NOTIFY_STRING 4 /* Data is a pointer to a buffer w/length */ -#define NOTIFY_SECDESC 5 /* Data is a security descriptor */ - #define PRINTER_NOTIFY_TYPE 0x00 #define JOB_NOTIFY_TYPE 0x01 -#define PRINT_TABLE_END 0xFF - -#define MAX_PRINTER_NOTIFY 26 -#define MAX_JOB_NOTIFY 24 - -#define MAX_NOTIFY_TYPE_FOR_NOW 26 #define PRINTER_NOTIFY_SERVER_NAME 0x00 #define PRINTER_NOTIFY_PRINTER_NAME 0x01 @@ -209,8 +181,6 @@ #define JOB_NOTIFY_TOTAL_BYTES 0x16 #define JOB_NOTIFY_BYTES_PRINTED 0x17 -#define PRINTER_NOTIFY_OPTIONS_REFRESH 0x01 - /* * Set of macros for flagging what changed in the PRINTER_INFO_2 struct * when sending messages to other smbd's @@ -263,25 +233,6 @@ PRINTER_MESSAGE_INFO; #define DRIVER_MAX_VERSION 4 -/* this struct is undocumented */ -/* thanks to the ddk ... */ -typedef struct { - uint32 size; /* length of user_name & client_name + 2? */ - UNISTR2 *client_name; - UNISTR2 *user_name; - uint32 build; - uint32 major; - uint32 minor; - uint32 processor; -} SPOOL_USER_1; - -typedef struct { - uint32 level; - union { - SPOOL_USER_1 *user1; - } user; -} SPOOL_USER_CTR; - /* * Devicemode structure */ @@ -345,41 +296,6 @@ PRINTER_DEFAULT; /********************************************/ -typedef struct spool_notify_option_type -{ - uint16 type; - uint16 reserved0; - uint32 reserved1; - uint32 reserved2; - uint32 count; - uint32 fields_ptr; - uint32 count2; - uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW]; -} -SPOOL_NOTIFY_OPTION_TYPE; - -typedef struct spool_notify_option_type_ctr -{ - uint32 count; - SPOOL_NOTIFY_OPTION_TYPE *type; -} -SPOOL_NOTIFY_OPTION_TYPE_CTR; - - - -typedef struct s_header_type -{ - uint32 type; - union - { - uint32 value; - UNISTR string; - } - data; -} -HEADER_TYPE; - - typedef struct spool_q_getprinterdata { POLICY_HND handle; @@ -398,86 +314,6 @@ typedef struct spool_r_getprinterdata } SPOOL_R_GETPRINTERDATA; -typedef struct spool_notify_option -{ - uint32 version; - uint32 flags; - uint32 count; - uint32 option_type_ptr; - SPOOL_NOTIFY_OPTION_TYPE_CTR ctr; -} -SPOOL_NOTIFY_OPTION; - -typedef struct spool_notify_info_data -{ - uint16 type; - uint16 field; - uint32 reserved; - uint32 id; - union { - uint32 value[2]; - struct { - uint32 length; - uint16 *string; - } data; - struct { - uint32 size; - SEC_DESC *desc; - } sd; - } - notify_data; - uint32 size; - uint32 enc_type; -} SPOOL_NOTIFY_INFO_DATA; - -typedef struct spool_notify_info -{ - uint32 version; - uint32 flags; - uint32 count; - SPOOL_NOTIFY_INFO_DATA *data; -} -SPOOL_NOTIFY_INFO; - -/* If the struct name looks obscure, yes it is ! */ -/* RemoteFindFirstPrinterChangeNotificationEx query struct */ -typedef struct spoolss_q_rffpcnex -{ - POLICY_HND handle; - uint32 flags; - uint32 options; - uint32 localmachine_ptr; - UNISTR2 localmachine; - uint32 printerlocal; - uint32 option_ptr; - SPOOL_NOTIFY_OPTION *option; -} -SPOOL_Q_RFFPCNEX; - -typedef struct spool_r_rffpcnex -{ - WERROR status; -} -SPOOL_R_RFFPCNEX; - -/* Remote Find Next Printer Change Notify Ex */ -typedef struct spool_q_rfnpcnex -{ - POLICY_HND handle; - uint32 change; - uint32 option_ptr; - SPOOL_NOTIFY_OPTION *option; -} -SPOOL_Q_RFNPCNEX; - -typedef struct spool_r_rfnpcnex -{ - uint32 info_ptr; - SPOOL_NOTIFY_INFO info; - WERROR status; -} -SPOOL_R_RFNPCNEX; - typedef struct printer_info_0 { UNISTR printername; @@ -592,11 +428,6 @@ typedef struct printer_info_6 } PRINTER_INFO_6; -#define SPOOL_DS_PUBLISH 1 -#define SPOOL_DS_UPDATE 2 -#define SPOOL_DS_UNPUBLISH 4 -#define SPOOL_DS_PENDING 0x80000000 - typedef struct printer_info_7 { UNISTR guid; /* text form of printer guid */ @@ -976,208 +807,8 @@ typedef struct spool_r_enumforms } SPOOL_R_ENUMFORMS; -typedef struct spool_printer_info_level_1 -{ - uint32 flags; - uint32 description_ptr; - uint32 name_ptr; - uint32 comment_ptr; - UNISTR2 description; - UNISTR2 name; - UNISTR2 comment; -} SPOOL_PRINTER_INFO_LEVEL_1; - -typedef struct spool_printer_info_level_2 -{ - uint32 servername_ptr; - uint32 printername_ptr; - uint32 sharename_ptr; - uint32 portname_ptr; - uint32 drivername_ptr; - uint32 comment_ptr; - uint32 location_ptr; - uint32 devmode_ptr; - uint32 sepfile_ptr; - uint32 printprocessor_ptr; - uint32 datatype_ptr; - uint32 parameters_ptr; - uint32 secdesc_ptr; - uint32 attributes; - uint32 priority; - uint32 default_priority; - uint32 starttime; - uint32 untiltime; - uint32 status; - uint32 cjobs; - uint32 averageppm; - UNISTR2 servername; - UNISTR2 printername; - UNISTR2 sharename; - UNISTR2 portname; - UNISTR2 drivername; - UNISTR2 comment; - UNISTR2 location; - UNISTR2 sepfile; - UNISTR2 printprocessor; - UNISTR2 datatype; - UNISTR2 parameters; -} -SPOOL_PRINTER_INFO_LEVEL_2; - -typedef struct spool_printer_info_level_3 -{ - uint32 secdesc_ptr; -} -SPOOL_PRINTER_INFO_LEVEL_3; - -typedef struct spool_printer_info_level_7 -{ - uint32 guid_ptr; - uint32 action; - UNISTR2 guid; -} -SPOOL_PRINTER_INFO_LEVEL_7; - -typedef struct spool_printer_info_level -{ - uint32 level; - uint32 info_ptr; - SPOOL_PRINTER_INFO_LEVEL_1 *info_1; - SPOOL_PRINTER_INFO_LEVEL_2 *info_2; - SPOOL_PRINTER_INFO_LEVEL_3 *info_3; - SPOOL_PRINTER_INFO_LEVEL_7 *info_7; -} -SPOOL_PRINTER_INFO_LEVEL; - -typedef struct spool_printer_driver_info_level_3 -{ - uint32 cversion; - uint32 name_ptr; - uint32 environment_ptr; - uint32 driverpath_ptr; - uint32 datafile_ptr; - uint32 configfile_ptr; - uint32 helpfile_ptr; - uint32 monitorname_ptr; - uint32 defaultdatatype_ptr; - uint32 dependentfilessize; - uint32 dependentfiles_ptr; - - UNISTR2 name; - UNISTR2 environment; - UNISTR2 driverpath; - UNISTR2 datafile; - UNISTR2 configfile; - UNISTR2 helpfile; - UNISTR2 monitorname; - UNISTR2 defaultdatatype; - BUFFER5 dependentfiles; - -} -SPOOL_PRINTER_DRIVER_INFO_LEVEL_3; - -/* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */ -typedef struct { - uint32 version; - uint32 name_ptr; - uint32 environment_ptr; - uint32 driverpath_ptr; - uint32 datafile_ptr; - uint32 configfile_ptr; - uint32 helpfile_ptr; - uint32 monitorname_ptr; - uint32 defaultdatatype_ptr; - uint32 dependentfiles_len; - uint32 dependentfiles_ptr; - uint32 previousnames_len; - uint32 previousnames_ptr; - NTTIME driverdate; - uint64 driverversion; - uint32 dummy4; - uint32 mfgname_ptr; - uint32 oemurl_ptr; - uint32 hardwareid_ptr; - uint32 provider_ptr; - UNISTR2 name; - UNISTR2 environment; - UNISTR2 driverpath; - UNISTR2 datafile; - UNISTR2 configfile; - UNISTR2 helpfile; - UNISTR2 monitorname; - UNISTR2 defaultdatatype; - BUFFER5 dependentfiles; - BUFFER5 previousnames; - UNISTR2 mfgname; - UNISTR2 oemurl; - UNISTR2 hardwareid; - UNISTR2 provider; -} SPOOL_PRINTER_DRIVER_INFO_LEVEL_6; - - -typedef struct spool_printer_driver_info_level -{ - uint32 level; - uint32 ptr; - SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3; - SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *info_6; -} -SPOOL_PRINTER_DRIVER_INFO_LEVEL; - - -typedef struct spool_q_setprinter -{ - POLICY_HND handle; - uint32 level; - SPOOL_PRINTER_INFO_LEVEL info; - SEC_DESC_BUF *secdesc_ctr; - DEVMODE_CTR devmode_ctr; - - uint32 command; - -} -SPOOL_Q_SETPRINTER; - -typedef struct spool_r_setprinter -{ - WERROR status; -} -SPOOL_R_SETPRINTER; - -/********************************************/ - -typedef struct { - UNISTR2 *server_name; - uint32 level; - SPOOL_PRINTER_INFO_LEVEL info; - DEVMODE_CTR devmode_ctr; - SEC_DESC_BUF *secdesc_ctr; - uint32 user_switch; - SPOOL_USER_CTR user_ctr; -} SPOOL_Q_ADDPRINTEREX; - -typedef struct { - POLICY_HND handle; - WERROR status; -} SPOOL_R_ADDPRINTEREX; - /********************************************/ -typedef struct spool_q_addprinterdriver -{ - uint32 server_name_ptr; - UNISTR2 server_name; - uint32 level; - SPOOL_PRINTER_DRIVER_INFO_LEVEL info; -} -SPOOL_Q_ADDPRINTERDRIVER; - -typedef struct spool_r_addprinterdriver -{ - WERROR status; -} -SPOOL_R_ADDPRINTERDRIVER; - typedef struct spool_q_enumprintprocessors { uint32 name_ptr; @@ -1351,25 +982,6 @@ typedef struct spool_r_getjob } SPOOL_R_GETJOB; -typedef struct spool_q_rrpcn -{ - POLICY_HND handle; - uint32 change_low; - uint32 change_high; - uint32 unknown0; - uint32 unknown1; - uint32 info_ptr; - SPOOL_NOTIFY_INFO info; -} -SPOOL_Q_REPLY_RRPCN; - -typedef struct spool_r_rrpcn -{ - uint32 unknown0; - WERROR status; -} -SPOOL_R_REPLY_RRPCN; - typedef struct spool_q_enumprinterkey { POLICY_HND handle; diff --git a/source3/include/smb.h b/source3/include/smb.h index bef0fd177b..f02088731d 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -758,18 +758,19 @@ Offset Data length. 16 uint32 private_options 4 20 uint32 time sec 4 24 uint32 time usec 4 -28 SMB_DEV_T dev 8 bytes. -36 SMB_INO_T inode 8 bytes -44 unsigned long file_id 4 bytes -48 uint32 uid 4 bytes -52 uint16 flags 2 bytes -54 +28 uint64 dev 8 bytes +36 uint64 inode 8 bytes +44 uint64 extid 8 bytes +52 unsigned long file_id 4 bytes +56 uint32 uid 4 bytes +60 uint16 flags 2 bytes +62 */ #ifdef CLUSTER_SUPPORT -#define MSG_SMB_SHARE_MODE_ENTRY_SIZE 58 +#define MSG_SMB_SHARE_MODE_ENTRY_SIZE 66 #else -#define MSG_SMB_SHARE_MODE_ENTRY_SIZE 54 +#define MSG_SMB_SHARE_MODE_ENTRY_SIZE 62 #endif struct share_mode_lock { @@ -1620,48 +1621,43 @@ enum acl_compatibility {ACL_COMPAT_AUTO, ACL_COMPAT_WINNT, ACL_COMPAT_WIN2K}; #define BATCH_OPLOCK_TYPE(lck) ((lck) & (unsigned int)BATCH_OPLOCK) #define LEVEL_II_OPLOCK_TYPE(lck) ((lck) & ((unsigned int)LEVEL_II_OPLOCK|(unsigned int)FAKE_LEVEL_II_OPLOCK)) -struct inform_level2_message { - SMB_DEV_T dev; - SMB_INO_T inode; - uint16 mid; - unsigned long target_file_id; - unsigned long source_file_id; -}; - /* kernel_oplock_message definition. struct kernel_oplock_message { - SMB_DEV_T dev; - SMB_INO_T inode; + uint64_t dev; + uint64_t inode; + unit64_t extid; unsigned long file_id; }; Offset Data length. -0 SMB_DEV_T dev 8 bytes. -8 SMB_INO_T inode 8 bytes -16 unsigned long file_id 4 bytes -20 +0 uint64_t dev 8 bytes +8 uint64_t inode 8 bytes +16 uint64_t extid 8 bytes +24 unsigned long file_id 4 bytes +28 */ -#define MSG_SMB_KERNEL_BREAK_SIZE 20 +#define MSG_SMB_KERNEL_BREAK_SIZE 28 /* file_renamed_message definition. struct file_renamed_message { - SMB_DEV_T dev; - SMB_INO_T inode; + uint64_t dev; + uint64_t inode; char names[1]; A variable area containing sharepath and filename. }; Offset Data length. -0 SMB_DEV_T dev 8 bytes. -8 SMB_INO_T inode 8 bytes -16 char [] name zero terminated namelen bytes -minimum length == 18. +0 uint64_t dev 8 bytes +8 uint64_t inode 8 bytes +16 unit64_t extid 8 bytes +24 char [] name zero terminated namelen bytes +minimum length == 24. */ -#define MSG_FILE_RENAMED_MIN_SIZE 16 +#define MSG_FILE_RENAMED_MIN_SIZE 24 /* * On the wire return values for oplock types. diff --git a/source3/include/smb_ldap.h b/source3/include/smb_ldap.h deleted file mode 100644 index a3c270d95c..0000000000 --- a/source3/include/smb_ldap.h +++ /dev/null @@ -1,255 +0,0 @@ -/* - Unix SMB/CIFS Implementation. - LDAP protocol helper functions for SAMBA - Copyright (C) Volker Lendecke 2004 - - 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 _SMB_LDAP_H -#define _SMB_LDAP_H - -enum ldap_request_tag { - LDAP_TAG_BindRequest = 0, - LDAP_TAG_BindResponse = 1, - LDAP_TAG_UnbindRequest = 2, - LDAP_TAG_SearchRequest = 3, - LDAP_TAG_SearchResultEntry = 4, - LDAP_TAG_SearchResultDone = 5, - LDAP_TAG_ModifyRequest = 6, - LDAP_TAG_ModifyResponse = 7, - LDAP_TAG_AddRequest = 8, - LDAP_TAG_AddResponse = 9, - LDAP_TAG_DelRequest = 10, - LDAP_TAG_DelResponse = 11, - LDAP_TAG_ModifyDNRequest = 12, - LDAP_TAG_ModifyDNResponse = 13, - LDAP_TAG_CompareRequest = 14, - LDAP_TAG_CompareResponse = 15, - LDAP_TAG_AbandonRequest = 16, - LDAP_TAG_SearchResultReference = 19, - LDAP_TAG_ExtendedRequest = 23, - LDAP_TAG_ExtendedResponse = 24 -}; - -enum ldap_auth_mechanism { - LDAP_AUTH_MECH_SIMPLE = 0, - LDAP_AUTH_MECH_SASL = 3 -}; - -#ifndef LDAP_SUCCESS -enum ldap_result_code { - LDAP_SUCCESS = 0, - LDAP_SASL_BIND_IN_PROGRESS = 0x0e, - LDAP_INVALID_CREDENTIALS = 0x31, - LDAP_OTHER = 0x50 -}; -#endif /* LDAP_SUCCESS */ - -struct ldap_Result { - int resultcode; - const char *dn; - const char *errormessage; - const char *referral; -}; - -struct ldap_attribute { - const char *name; - int num_values; - DATA_BLOB *values; -}; - -struct ldap_BindRequest { - int version; - const char *dn; - enum ldap_auth_mechanism mechanism; - union { - const char *password; - struct { - const char *mechanism; - DATA_BLOB secblob; - } SASL; - } creds; -}; - -struct ldap_BindResponse { - struct ldap_Result response; - union { - DATA_BLOB secblob; - } SASL; -}; - -struct ldap_UnbindRequest { - uint8 __dummy; -}; - -enum ldap_scope { - LDAP_SEARCH_SCOPE_BASE = 0, - LDAP_SEARCH_SCOPE_SINGLE = 1, - LDAP_SEARCH_SCOPE_SUB = 2 -}; - -enum ldap_deref { - LDAP_DEREFERENCE_NEVER = 0, - LDAP_DEREFERENCE_IN_SEARCHING = 1, - LDAP_DEREFERENCE_FINDING_BASE = 2, - LDAP_DEREFERENCE_ALWAYS -}; - -struct ldap_SearchRequest { - const char *basedn; - enum ldap_scope scope; - enum ldap_deref deref; - uint32 timelimit; - uint32 sizelimit; - bool attributesonly; - char *filter; - int num_attributes; - const char **attributes; -}; - -struct ldap_SearchResEntry { - const char *dn; - int num_attributes; - struct ldap_attribute *attributes; -}; - -struct ldap_SearchResRef { - int num_referrals; - const char **referrals; -}; - -enum ldap_modify_type { - LDAP_MODIFY_NONE = -1, - LDAP_MODIFY_ADD = 0, - LDAP_MODIFY_DELETE = 1, - LDAP_MODIFY_REPLACE = 2 -}; - -struct ldap_mod { - enum ldap_modify_type type; - struct ldap_attribute attrib; -}; - -struct ldap_ModifyRequest { - const char *dn; - int num_mods; - struct ldap_mod *mods; -}; - -struct ldap_AddRequest { - const char *dn; - int num_attributes; - struct ldap_attribute *attributes; -}; - -struct ldap_DelRequest { - const char *dn; -}; - -struct ldap_ModifyDNRequest { - const char *dn; - const char *newrdn; - bool deleteolddn; - const char *newsuperior; -}; - -struct ldap_CompareRequest { - const char *dn; - const char *attribute; - const char *value; -}; - -struct ldap_AbandonRequest { - uint32 messageid; -}; - -struct ldap_ExtendedRequest { - const char *oid; - DATA_BLOB value; -}; - -struct ldap_ExtendedResponse { - struct ldap_Result response; - const char *name; - DATA_BLOB value; -}; - -union ldap_Request { - struct ldap_BindRequest BindRequest; - struct ldap_BindResponse BindResponse; - struct ldap_UnbindRequest UnbindRequest; - struct ldap_SearchRequest SearchRequest; - struct ldap_SearchResEntry SearchResultEntry; - struct ldap_Result SearchResultDone; - struct ldap_SearchResRef SearchResultReference; - struct ldap_ModifyRequest ModifyRequest; - struct ldap_Result ModifyResponse; - struct ldap_AddRequest AddRequest; - struct ldap_Result AddResponse; - struct ldap_DelRequest DelRequest; - struct ldap_Result DelResponse; - struct ldap_ModifyDNRequest ModifyDNRequest; - struct ldap_Result ModifyDNResponse; - struct ldap_CompareRequest CompareRequest; - struct ldap_Result CompareResponse; - struct ldap_AbandonRequest AbandonRequest; - struct ldap_ExtendedRequest ExtendedRequest; - struct ldap_ExtendedResponse ExtendedResponse; -}; - -struct ldap_Control { - const char *oid; - bool critical; - DATA_BLOB value; -}; - -struct ldap_message { - TALLOC_CTX *mem_ctx; - uint32 messageid; - uint8 type; - union ldap_Request r; - int num_controls; - struct ldap_Control *controls; -}; - -struct ldap_queue_entry { - struct ldap_queue_entry *next, *prev; - int msgid; - struct ldap_message *msg; -}; - -struct ldap_connection { - TALLOC_CTX *mem_ctx; - int sock; - int next_msgid; - char *host; - uint16 port; - bool ldaps; - - const char *auth_dn; - const char *simple_pw; - - /* Current outstanding search entry */ - int searchid; - - /* List for incoming search entries */ - struct ldap_queue_entry *search_entries; - - /* Outstanding LDAP requests that have not yet been replied to */ - struct ldap_queue_entry *outstanding; -}; - -#endif diff --git a/source3/include/smb_share_modes.h b/source3/include/smb_share_modes.h index 101bec8245..4a2d832cc2 100644 --- a/source3/include/smb_share_modes.h +++ b/source3/include/smb_share_modes.h @@ -46,6 +46,7 @@ struct smbdb_ctx; struct smb_share_mode_entry { uint64_t dev; uint64_t ino; + uint64_t extid; uint32_t share_access; uint32_t access_mask; struct timeval open_time; @@ -66,11 +67,13 @@ int smb_share_mode_db_close(struct smbdb_ctx *db_ctx); int smb_lock_share_mode_entry(struct smbdb_ctx *db_ctx, uint64_t dev, - uint64_t ino); + uint64_t ino, + uint64_t extid); int smb_unlock_share_mode_entry(struct smbdb_ctx *db_ctx, uint64_t dev, - uint64_t ino); + uint64_t ino, + uint64_t extid); /* * Share mode database accessor functions. @@ -79,23 +82,27 @@ int smb_unlock_share_mode_entry(struct smbdb_ctx *db_ctx, int smb_get_share_mode_entries(struct smbdb_ctx *db_ctx, uint64_t dev, uint64_t ino, + uint64_t extid, struct smb_share_mode_entry **pp_list, unsigned char *p_delete_on_close); int smb_create_share_mode_entry(struct smbdb_ctx *db_ctx, uint64_t dev, uint64_t ino, + uint64_t extid, const struct smb_share_mode_entry *set_entry, const char *path); int smb_delete_share_mode_entry(struct smbdb_ctx *db_ctx, uint64_t dev, uint64_t ino, + uint64_t extid, const struct smb_share_mode_entry *set_entry); int smb_change_share_mode_entry(struct smbdb_ctx *db_ctx, uint64_t dev, uint64_t ino, + uint64_t extid, const struct smb_share_mode_entry *set_entry, const struct smb_share_mode_entry *new_entry); diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 131416b685..f9a0436546 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -75,6 +75,10 @@ enum profile_stats_values #define syscall_open_count __profile_stats_value(PR_VALUE_SYSCALL_OPEN, count) #define syscall_open_time __profile_stats_value(PR_VALUE_SYSCALL_OPEN, time) + PR_VALUE_SYSCALL_CREATEFILE, +#define syscall_createfile_count __profile_stats_value(PR_VALUE_SYSCALL_CREATEFILE, count) +#define syscall_createfile_time __profile_stats_value(PR_VALUE_SYSCALL_CREATEFILE, time) + PR_VALUE_SYSCALL_CLOSE, #define syscall_close_count __profile_stats_value(PR_VALUE_SYSCALL_CLOSE, count) #define syscall_close_time __profile_stats_value(PR_VALUE_SYSCALL_CLOSE, time) @@ -111,6 +115,10 @@ enum profile_stats_values #define syscall_rename_count __profile_stats_value(PR_VALUE_SYSCALL_RENAME, count) #define syscall_rename_time __profile_stats_value(PR_VALUE_SYSCALL_RENAME, time) + PR_VALUE_SYSCALL_RENAME_AT, +#define syscall_rename_at_count __profile_stats_value(PR_VALUE_SYSCALL_RENAME_AT, count) +#define syscall_rename_at_time __profile_stats_value(PR_VALUE_SYSCALL_RENAME_AT, time) + PR_VALUE_SYSCALL_FSYNC, #define syscall_fsync_count __profile_stats_value(PR_VALUE_SYSCALL_FSYNC, count) #define syscall_fsync_time __profile_stats_value(PR_VALUE_SYSCALL_FSYNC, time) @@ -215,6 +223,26 @@ enum profile_stats_values #define syscall_set_quota_count __profile_stats_value(PR_VALUE_SYSCALL_SET_QUOTA, count) #define syscall_set_quota_time __profile_stats_value(PR_VALUE_SYSCALL_SET_QUOTA, time) + PR_VALUE_SYSCALL_GET_SD, +#define syscall_get_sd_count __profile_stats_value(PR_VALUE_SYSCALL_GET_SD, count) +#define syscall_get_sd_time __profile_stats_value(PR_VALUE_SYSCALL_GET_SD, time) + + PR_VALUE_SYSCALL_SET_SD, +#define syscall_set_sd_count __profile_stats_value(PR_VALUE_SYSCALL_SET_SD, count) +#define syscall_set_sd_time __profile_stats_value(PR_VALUE_SYSCALL_SET_SD, time) + + PR_VALUE_SYSCALL_BRL_LOCK, +#define syscall_brl_lock_count __profile_stats_value(PR_VALUE_SYSCALL_BRL_LOCK, count) +#define syscall_brl_lock_time __profile_stats_value(PR_VALUE_SYSCALL_BRL_LOCK, time) + + PR_VALUE_SYSCALL_BRL_UNLOCK, +#define syscall_brl_unlock_count __profile_stats_value(PR_VALUE_SYSCALL_BRL_UNLOCK, count) +#define syscall_brl_unlock_time __profile_stats_value(PR_VALUE_SYSCALL_BRL_UNLOCK, time) + + PR_VALUE_SYSCALL_BRL_CANCEL, +#define syscall_brl_cancel_count __profile_stats_value(PR_VALUE_SYSCALL_BRL_CANCEL, count) +#define syscall_brl_cancel_time __profile_stats_value(PR_VALUE_SYSCALL_BRL_CANCEL, time) + /* counters for individual SMB types */ PR_VALUE_SMBMKDIR, #define SMBmkdir_count __profile_stats_value(PR_VALUE_SMBMKDIR, count) diff --git a/source3/include/vfs.h b/source3/include/vfs.h index ffa1a95ed0..0ee7f236b0 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -383,7 +383,8 @@ struct vfs_ops { struct notify_event *ev), void *private_data, void *handle_p); int (*chflags)(struct vfs_handle_struct *handle, const char *path, unsigned int flags); - struct file_id (*file_id_create)(struct vfs_handle_struct *handle, SMB_DEV_T dev, SMB_INO_T inode); + struct file_id (*file_id_create)(struct vfs_handle_struct *handle, + const SMB_STRUCT_STAT *sbuf); NTSTATUS (*streaminfo)(struct vfs_handle_struct *handle, struct files_struct *fsp, diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index 3af612375b..7dacd2319a 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -85,7 +85,7 @@ #define SMB_VFS_REALPATH(conn, path, resolved_path) ((conn)->vfs.ops.realpath((conn)->vfs.handles.realpath, (path), (resolved_path))) #define SMB_VFS_NOTIFY_WATCH(conn, ctx, e, callback, private_data, handle_p) ((conn)->vfs.ops.notify_watch((conn)->vfs.handles.notify_watch, (ctx), (e), (callback), (private_data), (handle_p))) #define SMB_VFS_CHFLAGS(conn, path, flags) ((conn)->vfs.ops.chflags((conn)->vfs.handles.chflags, (path), (flags))) -#define SMB_VFS_FILE_ID_CREATE(conn, dev, inode) ((conn)->vfs.ops.file_id_create((conn)->vfs.handles.file_id_create, (dev), (inode))) +#define SMB_VFS_FILE_ID_CREATE(conn, sbuf) ((conn)->vfs.ops.file_id_create((conn)->vfs.handles.file_id_create, (sbuf))) #define SMB_VFS_STREAMINFO(conn, fsp, fname, mem_ctx, num_streams, streams) ((conn)->vfs.ops.streaminfo((conn)->vfs.handles.streaminfo, (fsp), (fname), (mem_ctx), (num_streams), (streams))) #define SMB_VFS_GET_REAL_FILENAME(conn, path, name, mem_ctx, found_name) ((conn)->vfs.ops.get_real_filename((conn)->vfs.handles.get_real_filename, (path), (name), (mem_ctx), (found_name))) #define SMB_VFS_BRL_LOCK_WINDOWS(conn, br_lck, plock, blocking_lock, blr) ((conn)->vfs.ops.brl_lock_windows((conn)->vfs.handles.brl_lock_windows, (br_lck), (plock), (blocking_lock), (blr))) @@ -217,7 +217,7 @@ #define SMB_VFS_OPAQUE_REALPATH(conn, path, resolved_path) ((conn)->vfs_opaque.ops.realpath((conn)->vfs_opaque.handles.realpath, (path), (resolved_path))) #define SMB_VFS_OPAQUE_NOTIFY_WATCH(conn, ctx, e, callback, private_data, handle_p) ((conn)->vfs_opaque.ops.notify_watch((conn)->vfs_opaque.handles.notify_watch, (ctx), (e), (callback), (private_data), (handle_p))) #define SMB_VFS_OPAQUE_CHFLAGS(conn, path, flags) ((conn)->vfs_opaque.ops.chflags((conn)->vfs_opaque.handles.chflags, (path), (flags))) -#define SMB_VFS_OPAQUE_FILE_ID_CREATE(conn, dev, inode) ((conn)->vfs.ops_opaque.file_id_create((conn)->vfs_opaque.handles.file_id_create, (dev), (inode))) +#define SMB_VFS_OPAQUE_FILE_ID_CREATE(conn, sbuf) ((conn)->vfs.ops_opaque.file_id_create((conn)->vfs_opaque.handles.file_id_create, (sbuf))) #define SMB_VFS_OPAQUE_STREAMINFO(conn, fsp, fname, mem_ctx, num_streams, streams) ((conn)->vfs_opaque.ops.streaminfo((conn)->vfs_opaque.handles.streaminfo, (fsp), (fname), (mem_ctx), (num_streams), (streams))) #define SMB_VFS_OPAQUE_GET_REAL_FILENAME(conn, path, name, mem_ctx, found_name) ((conn)->vfs_opaque.ops.get_real_filename((conn)->vfs_opaque.handles.get_real_filename, (path), (name), (mem_ctx), (found_name))) #define SMB_VFS_OPAQUE_BRL_LOCK_WINDOWS(conn, br_lck, plock, blocking_lock, blr) ((conn)->vfs_opaque.ops.brl_lock_windows((conn)->vfs_opaque.handles.brl_lock_windows, (br_lck), (plock), (blocking_lock), (blr))) @@ -350,7 +350,7 @@ #define SMB_VFS_NEXT_REALPATH(handle, path, resolved_path) ((handle)->vfs_next.ops.realpath((handle)->vfs_next.handles.realpath, (path), (resolved_path))) #define SMB_VFS_NEXT_NOTIFY_WATCH(conn, ctx, e, callback, private_data, handle_p) ((conn)->vfs_next.ops.notify_watch((conn)->vfs_next.handles.notify_watch, (ctx), (e), (callback), (private_data), (handle_p))) #define SMB_VFS_NEXT_CHFLAGS(handle, path, flags) ((handle)->vfs_next.ops.chflags((handle)->vfs_next.handles.chflags, (path), (flags))) -#define SMB_VFS_NEXT_FILE_ID_CREATE(handle, dev, inode) ((handle)->vfs_next.ops.file_id_create((handle)->vfs_next.handles.file_id_create, (dev), (inode))) +#define SMB_VFS_NEXT_FILE_ID_CREATE(handle, sbuf) ((handle)->vfs_next.ops.file_id_create((handle)->vfs_next.handles.file_id_create, (sbuf))) #define SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, num_streams, streams) ((handle)->vfs_next.ops.streaminfo((handle)->vfs_next.handles.streaminfo, (fsp), (fname), (mem_ctx), (num_streams), (streams))) #define SMB_VFS_NEXT_GET_REAL_FILENAME(handle, path, name, mem_ctx, found_name) ((handle)->vfs_next.ops.get_real_filename((handle)->vfs_next.handles.get_real_filename, (path), (name), (mem_ctx), (found_name))) #define SMB_VFS_NEXT_BRL_LOCK_WINDOWS(handle, br_lck, plock, blocking_lock, blr) ((handle)->vfs_next.ops.brl_lock_windows((handle)->vfs_next.handles.brl_lock_windows, (br_lck), (plock), (blocking_lock), (blr))) |