Extend NTIMES to allow setting create_time
[metze/samba/wip.git] / source3 / include / proto.h
index d644b09a6acaed5965c14ecbceccf8ea60213a6b..1414ba89ecf118405b521523f6c65a375e0c698e 100644 (file)
@@ -801,7 +801,7 @@ bool set_remote_machine_name(const char *remote_name, bool perm);
 const char *get_remote_machine_name(void);
 void sub_set_smb_name(const char *name);
 void set_current_user_info(const char *smb_name, const char *unix_name,
-                          const char *full_name, const char *domain);
+                          const char *domain);
 const char *get_current_username(void);
 void standard_sub_basic(const char *smb_name, const char *domain_name,
                        char *str, size_t len);
@@ -4722,7 +4722,6 @@ bool parse_lpq_entry(enum printing_types printing_type,char *line,
 /* The following definitions come from printing/notify.c  */
 
 int print_queue_snum(const char *qname);
-bool print_notify_messages_pending(void);
 void print_notify_send_messages(struct messaging_context *msg_ctx,
                                unsigned int timeout);
 void notify_printer_status_byname(const char *sharename, uint32 status);
@@ -4745,7 +4744,6 @@ void notify_printer_printername(int snum, char *printername);
 void notify_printer_port(int snum, char *port_name);
 void notify_printer_location(int snum, char *location);
 void notify_printer_byname( const char *printername, uint32 change, const char *value );
-bool print_notify_pid_list(const char *printername, TALLOC_CTX *mem_ctx, size_t *p_num_pids, pid_t **pp_pid_list);
 
 /* The following definitions come from printing/nt_printing.c  */
 
@@ -5197,16 +5195,27 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
 
 /* The following definitions come from rpc_client/cli_pipe.c  */
 
-NTSTATUS rpc_api_pipe_req(struct rpc_pipe_client *cli,
+struct async_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx,
+                                       struct event_context *ev,
+                                       struct rpc_pipe_client *cli,
+                                       uint8_t op_num,
+                                       prs_struct *req_data);
+NTSTATUS rpc_api_pipe_req_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+                              prs_struct *reply_pdu);
+NTSTATUS rpc_api_pipe_req(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *cli,
                        uint8 op_num,
                        prs_struct *in_data,
                        prs_struct *out_data);
+struct async_req *rpc_pipe_bind_send(TALLOC_CTX *mem_ctx,
+                                    struct event_context *ev,
+                                    struct rpc_pipe_client *cli,
+                                    struct cli_pipe_auth_data *auth);
+NTSTATUS rpc_pipe_bind_recv(struct async_req *req);
 NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli,
                       struct cli_pipe_auth_data *auth);
 unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli,
                                unsigned int timeout);
 bool rpccli_get_pwd_hash(struct rpc_pipe_client *cli, uint8_t nt_hash[16]);
-struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p);
 NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
                               struct cli_pipe_auth_data **presult);
 NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
@@ -5232,6 +5241,10 @@ NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx, const char *host,
 NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
                               const struct ndr_syntax_id *abstract_syntax,
                               struct rpc_pipe_client **presult);
+NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *abstract_syntax, 
+                               NTSTATUS (*dispatch) (struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *r),
+                               struct auth_serversupplied_info *serversupplied_info,
+                               struct rpc_pipe_client **presult);
 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
                                  const struct ndr_syntax_id *interface,
                                  struct rpc_pipe_client **presult);
@@ -5282,6 +5295,17 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
                             struct rpc_pipe_client *cli,
                             DATA_BLOB *session_key);
 
+/* The following definitions come from rpc_client/rpc_transport_np.c  */
+
+NTSTATUS rpc_transport_np_init(TALLOC_CTX *mem_ctx, struct cli_state *cli,
+                              const struct ndr_syntax_id *abstract_syntax,
+                              struct rpc_cli_transport **presult);
+struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p);
+
+/* The following definitions come from rpc_client/rpc_transport_sock.c  */
+
+NTSTATUS rpc_transport_sock_init(TALLOC_CTX *mem_ctx, int fd,
+                                struct rpc_cli_transport **presult);
 
 /* The following definitions come from rpc_client/cli_reg.c  */
 
@@ -5565,7 +5589,7 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
 
 /* The following definitions come from rpc_parse/parse_buffer.c  */
 
-void rpcbuf_init(RPC_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx);
+bool rpcbuf_init(RPC_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx);
 bool prs_rpcbuffer(const char *desc, prs_struct *ps, int depth, RPC_BUFFER *buffer);
 bool prs_rpcbuffer_p(const char *desc, prs_struct *ps, int depth, RPC_BUFFER **buffer);
 bool rpcbuf_alloc_size(RPC_BUFFER *buffer, uint32 buffer_size);
@@ -5755,7 +5779,6 @@ bool prs_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
 /* The following definitions come from rpc_parse/parse_rpc.c  */
 
 const char *cli_get_pipe_name_from_iface(TALLOC_CTX *mem_ctx,
-                                        struct cli_state *cli,
                                         const struct ndr_syntax_id *interface);
 void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags,
                                uint32 call_id, int data_len, int auth_len);
@@ -6211,14 +6234,15 @@ bool api_pipe_request(pipes_struct *p);
 
 pipes_struct *get_first_internal_pipe(void);
 pipes_struct *get_next_internal_pipe(pipes_struct *p);
-void init_rpc_pipe_hnd(void);
 
 bool fsp_is_np(struct files_struct *fsp);
-NTSTATUS np_open(struct smb_request *smb_req, const char *name,
-                struct files_struct **pfsp);
-NTSTATUS np_write(struct files_struct *fsp, const uint8_t *data, size_t len,
-                 ssize_t *nwritten);
-NTSTATUS np_read(struct files_struct *fsp, uint8_t *data, size_t len,
+NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
+                const char *client_address,
+                struct auth_serversupplied_info *server_info,
+                struct fake_file_handle **phandle);
+NTSTATUS np_write(struct fake_file_handle *handle, const uint8_t *data,
+                 size_t len, ssize_t *nwritten);
+NTSTATUS np_read(struct fake_file_handle *handle, uint8_t *data, size_t len,
                 ssize_t *nread, bool *is_data_outstanding);
 
 /* The following definitions come from rpc_server/srv_samr_util.c  */
@@ -6664,7 +6688,8 @@ int file_set_dosmode(connection_struct *conn, const char *fname,
                     uint32 dosmode, SMB_STRUCT_STAT *st,
                     const char *parent_dir,
                     bool newfile);
-int file_ntimes(connection_struct *conn, const char *fname, const struct timespec ts[2]);
+int file_ntimes(connection_struct *conn, const char *fname,
+               struct smb_file_time *ft);
 bool set_sticky_write_time_path(connection_struct *conn, const char *fname,
                         struct file_id fileid, const struct timespec mtime);
 bool set_sticky_write_time_fsp(struct files_struct *fsp, const struct timespec mtime);
@@ -7010,8 +7035,8 @@ NTSTATUS get_relative_fid_filename(connection_struct *conn,
 /* The following definitions come from smbd/oplock.c  */
 
 int32 get_number_of_exclusive_open_oplocks(void);
-bool oplock_message_waiting(fd_set *fds);
-void process_kernel_oplocks(struct messaging_context *msg_ctx, fd_set *pfds);
+bool oplock_message_waiting(void);
+void process_kernel_oplocks(struct messaging_context *msg_ctx);
 bool set_file_oplock(files_struct *fsp, int oplock_type);
 void release_file_oplock(files_struct *fsp);
 bool remove_oplock(files_struct *fsp);
@@ -7025,14 +7050,14 @@ bool init_oplocks(struct messaging_context *msg_ctx);
 
 /* The following definitions come from smbd/oplock_irix.c  */
 
-struct kernel_oplocks *irix_init_kernel_oplocks(void) ;
+struct kernel_oplocks *irix_init_kernel_oplocks(TALLOC_CTX *mem_ctx) ;
 
 /* The following definitions come from smbd/oplock_linux.c  */
 
 void linux_set_lease_capability(void);
 int linux_set_lease_sighandler(int fd);
 int linux_setlease(int fd, int leasetype);
-struct kernel_oplocks *linux_init_kernel_oplocks(void) ;
+struct kernel_oplocks *linux_init_kernel_oplocks(TALLOC_CTX *mem_ctx) ;
 
 /* The following definitions come from smbd/password.c  */
 
@@ -7056,6 +7081,8 @@ bool authorise_login(int snum, fstring user, DATA_BLOB password,
 
 /* The following definitions come from smbd/pipes.c  */
 
+NTSTATUS open_np_file(struct smb_request *smb_req, const char *name,
+                     struct files_struct **pfsp);
 void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req);
 void reply_pipe_write(struct smb_request *req);
 void reply_pipe_write_and_X(struct smb_request *req);
@@ -7398,7 +7425,7 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
                           files_struct *fsp,
                           const char *fname,
                           const SMB_STRUCT_STAT *psbuf,
-                          struct timespec ts[2],
+                          struct smb_file_time *ft,
                           bool setting_write_time);
 void reply_findclose(struct smb_request *req);
 void reply_findnclose(struct smb_request *req);