s3: smbd: Change the function signature of srvstr_push() from returning a length...
[metze/samba/wip.git] / source3 / smbd / proto.h
index efabfad331b5aabd5c9cfe1fd362eab6bd68a460..3a5ebcce08fa6d028490dbe9f6b74b4dbe7a3a01 100644 (file)
@@ -179,14 +179,6 @@ uint64_t get_dfree_info(connection_struct *conn,
 
 /* The following definitions come from smbd/dir.c  */
 
-bool make_dir_struct(TALLOC_CTX *ctx,
-                       char *buf,
-                       const char *mask,
-                       const char *fname,
-                       off_t size,
-                       uint32 mode,
-                       time_t date,
-                       bool uc);
 bool init_dptrs(struct smbd_server_connection *sconn);
 const char *dptr_path(struct smbd_server_connection *sconn, int key);
 const char *dptr_wcard(struct smbd_server_connection *sconn, int key);
@@ -639,6 +631,7 @@ NTSTATUS create_file_default(connection_struct *conn,
                             uint32_t create_options,
                             uint32_t file_attributes,
                             uint32_t oplock_request,
+                            struct smb2_lease *lease,
                             uint64_t allocation_size,
                             uint32_t private_flags,
                             struct security_descriptor *sd,
@@ -836,7 +829,7 @@ bool check_fsp(connection_struct *conn, struct smb_request *req,
               files_struct *fsp);
 bool check_fsp_ntquota_handle(connection_struct *conn, struct smb_request *req,
                              files_struct *fsp);
-void reply_special(struct smbd_server_connection *sconn, char *inbuf, size_t inbuf_len);
+void reply_special(struct smbXsrv_connection *xconn, char *inbuf, size_t inbuf_size);
 void reply_tcon(struct smb_request *req);
 void reply_tcon_and_X(struct smb_request *req);
 void reply_unknown_new(struct smb_request *req, uint8 type);
@@ -856,11 +849,13 @@ NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
                          uint32 dirtype, struct smb_filename *smb_fname,
                          bool has_wild);
 void reply_unlink(struct smb_request *req);
-ssize_t fake_sendfile(files_struct *fsp, off_t startpos, size_t nread);
-void sendfile_short_send(files_struct *fsp,
-                               ssize_t nread,
-                               size_t headersize,
-                               size_t smb_maxcnt);
+ssize_t fake_sendfile(struct smbXsrv_connection *xconn, files_struct *fsp,
+                     off_t startpos, size_t nread);
+ssize_t sendfile_short_send(struct smbXsrv_connection *xconn,
+                           files_struct *fsp,
+                           ssize_t nread,
+                           size_t headersize,
+                           size_t smb_maxcnt);
 void reply_readbraw(struct smb_request *req);
 void reply_lockread(struct smb_request *req);
 void reply_read(struct smb_request *req);
@@ -869,7 +864,7 @@ void error_to_writebrawerr(struct smb_request *req);
 void reply_writebraw(struct smb_request *req);
 void reply_writeunlock(struct smb_request *req);
 void reply_write(struct smb_request *req);
-bool is_valid_writeX_buffer(struct smbd_server_connection *sconn,
+bool is_valid_writeX_buffer(struct smbXsrv_connection *xconn,
                            const uint8_t *inbuf);
 void reply_write_and_X(struct smb_request *req);
 void reply_lseek(struct smb_request *req);
@@ -927,11 +922,10 @@ void reply_getattrE(struct smb_request *req);
 
 /* The following definitions come from smbd/seal.c  */
 
-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,
+bool is_encrypted_packet(const uint8_t *inbuf);
+void srv_free_enc_buffer(struct smbXsrv_connection *xconn, char *buf);
+NTSTATUS srv_decrypt_buffer(struct smbXsrv_connection *xconn, char *buf);
+NTSTATUS srv_encrypt_buffer(struct smbXsrv_connection *xconn, char *buf,
                            char **buf_out);
 NTSTATUS srv_request_encryption_setup(connection_struct *conn,
                                        unsigned char **ppdata,
@@ -939,7 +933,7 @@ NTSTATUS srv_request_encryption_setup(connection_struct *conn,
                                        unsigned char **pparam,
                                        size_t *p_param_size);
 NTSTATUS srv_encryption_start(connection_struct *conn);
-void server_encryption_shutdown(struct smbd_server_connection *sconn);
+void server_encryption_shutdown(struct smbXsrv_connection *xconn);
 
 /* The following definitions come from smbd/sec_ctx.c  */
 
@@ -954,6 +948,7 @@ const struct security_token *sec_ctx_active_token(void);
 /* The following definitions come from smbd/server.c  */
 
 struct memcache *smbd_memcache(void);
+bool snum_is_shared_printer(int snum);
 void delete_and_reload_printers(struct tevent_context *ev,
                                struct messaging_context *msg_ctx);
 bool reload_services(struct smbd_server_connection *sconn,
@@ -1016,8 +1011,8 @@ bool is_share_read_only_for_token(const char *username,
 
 /* The following definitions come from smbd/srvstr.c  */
 
-size_t srvstr_push_fn(const char *base_ptr, uint16 smb_flags2, void *dest,
-                     const char *src, int dest_len, int flags);
+NTSTATUS srvstr_push_fn(const char *base_ptr, uint16 smb_flags2, void *dest,
+                     const char *src, int dest_len, int flags, size_t *ret_len);
 ssize_t message_push_string(uint8 **outbuf, const char *str, int flags);
 
 /* The following definitions come from smbd/statcache.c  */