/* The following definitions come from smbd/signing.c */
-struct smbd_server_connection;
bool srv_check_sign_mac(struct smbd_server_connection *conn,
const char *inbuf, uint32_t *seqnum, bool trusted_channel);
void srv_calculate_sign_mac(struct smbd_server_connection *conn,
char *outbuf, uint32_t seqnum);
void srv_cancel_sign_response(struct smbd_server_connection *conn);
bool srv_init_signing(struct smbd_server_connection *conn);
-void srv_set_signing_negotiated(struct smbd_server_connection *conn);
+void srv_set_signing_negotiated(struct smbd_server_connection *conn,
+ bool allowed, bool mandatory);
bool srv_is_signing_active(struct smbd_server_connection *conn);
bool srv_is_signing_negotiated(struct smbd_server_connection *conn);
void srv_set_signing(struct smbd_server_connection *conn,
const char *orig_path,
struct smb_filename **smb_fname,
uint32_t ucf_flags);
+NTSTATUS check_veto_path(connection_struct *conn, const char *name);
NTSTATUS check_name(connection_struct *conn, const char *name);
int get_real_filename(connection_struct *conn, const char *path,
const char *name, TALLOC_CTX *mem_ctx,
struct junction_map;
NTSTATUS get_referred_path(TALLOC_CTX *ctx,
const char *dfs_path,
+ struct smbd_server_connection *sconn,
struct junction_map *jucn,
int *consumedcntp,
bool *self_referralp);
char **ppdata, NTSTATUS *pstatus);
bool create_junction(TALLOC_CTX *ctx,
const char *dfs_path,
+ bool allow_broken_path,
struct junction_map *jucn);
bool create_msdfs_link(const struct junction_map *jucn);
bool remove_msdfs_link(const struct junction_map *jucn);
char **pp_name_out,
bool *ppath_contains_wcard);
NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
+ struct smbd_server_connection *sconn,
connection_struct **pconn,
int snum,
const char *path,
int register_existing_vuid(struct smbd_server_connection *sconn,
uint16 vuid,
struct auth_session_info *session_info,
- DATA_BLOB response_blob,
- const char *smb_name);
+ DATA_BLOB response_blob);
void add_session_user(struct smbd_server_connection *sconn, const char *user);
void add_session_workgroup(struct smbd_server_connection *sconn,
const char *workgroup);
uint64_t mid);
void schedule_deferred_open_message_smb(struct smbd_server_connection *sconn,
uint64_t mid);
-bool open_was_deferred(uint64_t mid);
+bool open_was_deferred(struct smbd_server_connection *sconn, uint64_t mid);
bool get_deferred_open_message_state(struct smb_request *smbreq,
struct timeval *p_request_time,
void **pp_state);
size_t req_wct_ofs(struct smb_request *req);
void chain_reply(struct smb_request *req);
bool req_is_in_chain(struct smb_request *req);
-void smbd_process(struct smbd_server_connection *sconn);
+void smbd_process(struct tevent_context *ev_ctx,
+ struct smbd_server_connection *sconn);
bool fork_echo_handler(struct smbd_server_connection *sconn);
/* The following definitions come from smbd/quotas.c */
/* The following definitions come from smbd/seal.c */
-uint16_t srv_enc_ctx(void);
-bool is_encrypted_packet(const uint8_t *inbuf);
-void srv_free_enc_buffer(char *buf);
-NTSTATUS srv_decrypt_buffer(char *buf);
-NTSTATUS srv_encrypt_buffer(char *buf, char **buf_out);
+bool is_encrypted_packet(struct smbd_server_connection *sconn,
+ const uint8_t *inbuf);
+void srv_free_enc_buffer(struct smbd_server_connection *sconn, char *buf);
+NTSTATUS srv_decrypt_buffer(struct smbd_server_connection *sconn, char *buf);
+NTSTATUS srv_encrypt_buffer(struct smbd_server_connection *sconn, char *buf,
+ char **buf_out);
NTSTATUS srv_request_encryption_setup(connection_struct *conn,
unsigned char **ppdata,
size_t *p_data_size,
unsigned char **pparam,
size_t *p_param_size);
NTSTATUS srv_encryption_start(connection_struct *conn);
-void server_encryption_shutdown(void);
+void server_encryption_shutdown(struct smbd_server_connection *sconn);
/* The following definitions come from smbd/sec_ctx.c */
/* The following definitions come from smbd/server.c */
-struct event_context *smbd_event_context(void);
struct messaging_context *smbd_messaging_context(void);
struct memcache *smbd_memcache(void);
-void reload_printers(struct tevent_context *ev,
- struct messaging_context *msg_ctx);
+void delete_and_reload_printers(struct tevent_context *ev,
+ struct messaging_context *msg_ctx);
bool reload_services(struct messaging_context *msg_ctx, int smb_sock,
bool test);
void exit_server(const char *const explanation);
void exit_server_cleanly(const char *const explanation);
-void exit_server_fault(void);
+NTSTATUS messaging_send_to_children(struct messaging_context *msg_ctx,
+ uint32_t msg_type, DATA_BLOB* data);
/* The following definitions come from smbd/service.c */
char *translated_path,
bool case_sensitive);
bool stat_cache_lookup(connection_struct *conn,
+ bool posix_paths,
char **pp_name,
char **pp_dirpath,
char **pp_start,
SMB_STRUCT_STAT *psbuf);
NTSTATUS vfs_stat_fsp(files_struct *fsp);
NTSTATUS vfs_chown_fsp(files_struct *fsp, uid_t uid, gid_t gid);
+NTSTATUS vfs_streaminfo(connection_struct *conn,
+ struct files_struct *fsp,
+ const char *fname,
+ TALLOC_CTX *mem_ctx,
+ unsigned int *num_streams,
+ struct stream_struct **streams);
/* The following definitions come from smbd/avahi_register.c */
/* The following definitions come from smbd/msg_idmap.c */
-void msg_idmap_register_msgs(struct messaging_context *ctx);
+void msg_idmap_register_msg(struct messaging_context *ctx);
#endif /* _SMBD_PROTO_H_ */