Remove reply_unixerror() - no longer needed. Should make Metze's refactoring a lot...
[samba.git] / source3 / include / proto.h
index 17c3a5135a7079e5b970c215fd1a2bd8dda5e281..27b5f45eb07d1513a8f6491a834297d3f0e6f1c5 100644 (file)
@@ -554,7 +554,7 @@ void init_ldap_debugging(void);
 
 /* The following definitions come from lib/ldap_escape.c  */
 
-char *escape_ldap_string_alloc(const char *s);
+char *escape_ldap_string(TALLOC_CTX *mem_ctx, const char *s);
 char *escape_rdn_val_string_alloc(const char *s);
 
 /* The following definitions come from lib/module.c  */
@@ -911,6 +911,7 @@ ssize_t sys_recv(int fd, void *buf, size_t count, int flags);
 ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
 int sys_fcntl_ptr(int fd, int cmd, void *arg);
 int sys_fcntl_long(int fd, int cmd, long arg);
+void update_stat_ex_mtime(struct stat_ex *dst, struct timespec write_ts);
 int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf);
 int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf);
 int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf);
@@ -1201,8 +1202,6 @@ void *_talloc_memdup_zeronull(const void *t, const void *p, size_t size, const c
 void *_talloc_array_zeronull(const void *ctx, size_t el_size, unsigned count, const char *name);
 void *_talloc_zero_array_zeronull(const void *ctx, size_t el_size, unsigned count, const char *name);
 void *talloc_zeronull(const void *context, size_t size, const char *name);
-NTSTATUS split_ntfs_stream_name(TALLOC_CTX *mem_ctx, const char *fname,
-                               char **pbase, char **pstream);
 bool is_valid_policy_hnd(const struct policy_handle *hnd);
 bool policy_hnd_equal(const struct policy_handle *hnd1,
                      const struct policy_handle *hnd2);
@@ -2831,14 +2830,14 @@ bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 sty
 bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char *workstation);
 int cli_NetPrintQEnum(struct cli_state *cli,
                void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
-               void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,uint,uint,const char*));
+               void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,uint_t,uint_t,const char*));
 int cli_NetPrintQGetInfo(struct cli_state *cli, const char *printer,
        void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
-       void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,uint,uint,const char*));
+       void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,uint_t,uint_t,const char*));
 int cli_RNetServiceEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
-int cli_NetSessionEnum(struct cli_state *cli, void (*fn)(char *, char *, uint16, uint16, uint16, uint, uint, uint, char *));
+int cli_NetSessionEnum(struct cli_state *cli, void (*fn)(char *, char *, uint16, uint16, uint16, uint_t, uint_t, uint_t, char *));
 int cli_NetSessionGetInfo(struct cli_state *cli, const char *workstation,
-               void (*fn)(const char *, const char *, uint16, uint16, uint16, uint, uint, uint, const char *));
+               void (*fn)(const char *, const char *, uint16, uint16, uint16, uint_t, uint_t, uint_t, const char *));
 int cli_NetSessionDel(struct cli_state *cli, const char *workstation);
 int cli_NetConnectionEnum(struct cli_state *cli, const char *qualifier,
                        void (*fn)(uint16_t conid, uint16_t contype,
@@ -3444,16 +3443,14 @@ char *share_mode_str(TALLOC_CTX *ctx, int num, const struct share_mode_entry *e)
 struct share_mode_lock *get_share_mode_lock(TALLOC_CTX *mem_ctx,
                                            const struct file_id id,
                                            const char *servicepath,
-                                           const char *fname,
+                                           const struct smb_filename *smb_fname,
                                            const struct timespec *old_write_time);
 struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
-                                                 const struct file_id id,
-                                                 const char *servicepath,
-                                                 const char *fname);
+                                                 const struct file_id id);
 bool rename_share_filename(struct messaging_context *msg_ctx,
                        struct share_mode_lock *lck,
                        const char *servicepath,
-                       const char *newname);
+                       const struct smb_filename *smb_fname);
 void get_file_infos(struct file_id id,
                    bool *delete_on_close,
                    struct timespec *write_time);
@@ -6233,20 +6230,20 @@ bool smbd_setup_mdns_registration(struct tevent_context *ev,
 
 /* The following definitions come from smbd/dosmode.c  */
 
-mode_t unix_mode(connection_struct *conn, int dosmode, const char *fname,
+mode_t unix_mode(connection_struct *conn, int dosmode,
+                const struct smb_filename *smb_fname,
                 const char *inherit_from_dir);
-uint32 dos_mode_msdfs(connection_struct *conn, const char *path, const SMB_STRUCT_STAT *sbuf);
+uint32 dos_mode_msdfs(connection_struct *conn,
+                     const struct smb_filename *smb_fname);
 int dos_attributes_to_stat_dos_flags(uint32_t dosmode);
-uint32 dos_mode(connection_struct *conn, const char *path, const SMB_STRUCT_STAT *sbuf);
-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,
-               struct smb_file_time *ft, const SMB_STRUCT_STAT *psbuf);
-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);
+uint32 dos_mode(connection_struct *conn, const struct smb_filename *smb_fname);
+int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
+                    uint32 dosmode, const char *parent_dir, bool newfile);
+int file_ntimes(connection_struct *conn, const struct smb_filename *smb_fname,
+               struct smb_file_time *ft);
+bool set_sticky_write_time_path(struct file_id fileid, struct timespec mtime);
+bool set_sticky_write_time_fsp(struct files_struct *fsp,
+                              struct timespec mtime);
 bool update_write_time(struct files_struct *fsp);
 
 /* The following definitions come from smbd/error.c  */
@@ -6263,8 +6260,6 @@ void reply_dos_error(struct smb_request *req, uint8 eclass, uint32 ecode,
 void reply_both_error(struct smb_request *req, uint8 eclass, uint32 ecode,
                      NTSTATUS status, int line, const char *file);
 void reply_openerror(struct smb_request *req, NTSTATUS status);
-void reply_unix_error(struct smb_request *req, uint8 defclass, uint32 defcode,
-                       NTSTATUS defstatus, int line, const char *file);
 
 /* The following definitions come from smbd/fake_file.c  */
 
@@ -6547,7 +6542,6 @@ void send_nt_replies(connection_struct *conn,
                        struct smb_request *req, NTSTATUS nt_error,
                     char *params, int paramsize,
                     char *pdata, int datasize);
-bool is_ntfs_stream_name(const char *fname);
 bool is_ntfs_stream_smb_fname(const struct smb_filename *smb_fname);
 bool is_ntfs_default_stream_smb_fname(const struct smb_filename *smb_fname);
 void reply_ntcreate_and_X(struct smb_request *req);
@@ -6583,7 +6577,7 @@ bool open_match_attributes(connection_struct *conn,
 NTSTATUS fcb_or_dos_open(struct smb_request *req,
                         connection_struct *conn,
                         files_struct *fsp_to_dup_into,
-                        const char *fname,
+                        const struct smb_filename *smb_fname,
                         struct file_id id,
                         uint16 file_pid,
                         uint16 vuid,
@@ -6596,8 +6590,8 @@ bool map_open_params_to_ntcreate(const char *fname, int deny_mode, int open_func
                                 uint32 *pcreate_disposition,
                                 uint32 *pcreate_options);
 NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn,
-                         const char *fname,
-                         SMB_STRUCT_STAT *psbuf, files_struct **result);
+                         struct smb_filename *smb_fname,
+                         files_struct **result);
 NTSTATUS close_file_fchmod(struct smb_request *req, files_struct *fsp);
 NTSTATUS create_directory(connection_struct *conn, struct smb_request *req,
                          struct smb_filename *smb_dname);
@@ -6718,7 +6712,8 @@ NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
                           SEC_DESC **ppdesc);
 NTSTATUS posix_get_nt_acl(struct connection_struct *conn, const char *name,
                          uint32_t security_info, SEC_DESC **ppdesc);
-int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid);
+int try_chown(connection_struct *conn, struct smb_filename *smb_fname,
+             uid_t uid, gid_t gid);
 NTSTATUS append_parent_acl(files_struct *fsp,
                                const SEC_DESC *pcsd,
                                SEC_DESC **pp_new_sd);
@@ -7048,8 +7043,7 @@ NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
                const struct smb_filename *smb_fname_new);
 NTSTATUS smb_set_file_time(connection_struct *conn,
                           files_struct *fsp,
-                          const char *fname,
-                          const SMB_STRUCT_STAT *psbuf,
+                          const struct smb_filename *smb_fname,
                           struct smb_file_time *ft,
                           bool setting_write_time);
 void reply_findclose(struct smb_request *req);