Get closer to an accurate model of Windows timestamp changes.
[samba.git] / source3 / include / proto.h
index 530f167df6acf36bd6306f9764f21a9a1b487fca..ef811e5774b7f02158aa95baa774950946015e0e 100644 (file)
@@ -491,7 +491,6 @@ void check_log_size( void );
 void dbgflush( void );
 bool dbghdrclass(int level, int cls, const char *location, const char *func);
 bool dbghdr(int level, const char *location, const char *func);
-TALLOC_CTX *debug_ctx(void);
 
 /* The following definitions come from lib/display_sec.c  */
 
@@ -937,7 +936,7 @@ SMB_OFF_T sys_ftell(FILE *fp);
 int sys_creat(const char *path, mode_t mode);
 int sys_open(const char *path, int oflag, mode_t mode);
 FILE *sys_fopen(const char *path, const char *type);
-void kernel_flock(int fd, uint32 share_mode);
+void kernel_flock(int fd, uint32 share_mode, uint32 access_mask);
 SMB_STRUCT_DIR *sys_opendir(const char *name);
 SMB_STRUCT_DIRENT *sys_readdir(SMB_STRUCT_DIR *dirp);
 void sys_seekdir(SMB_STRUCT_DIR *dirp, long offset);
@@ -1074,6 +1073,8 @@ struct passwd *Get_Pwnam_alloc(TALLOC_CTX *mem_ctx, const char *user);
 
 /* The following definitions come from lib/util.c  */
 
+enum protocol_types get_Protocol(void);
+void set_Protocol(enum protocol_types  p);
 bool all_zero(const uint8_t *ptr, size_t size);
 bool set_global_myname(const char *myname);
 const char *global_myname(void);
@@ -2258,6 +2259,15 @@ bool cli_resolve_path(TALLOC_CTX *ctx,
                        struct cli_state **targetcli,
                        char **pp_targetpath);
 
+bool cli_check_msdfs_proxy(TALLOC_CTX *ctx,
+                       struct cli_state *cli,
+                       const char *sharename,
+                       char **pp_newserver,
+                       char **pp_newshare,
+                       bool force_encrypt,
+                       const char *username,
+                       const char *password,
+                       const char *domain);
 /* The following definitions come from libsmb/clidgram.c  */
 
 bool send_getdc_request(TALLOC_CTX *mem_ctx,
@@ -2659,6 +2669,14 @@ struct tevent_req *cli_posix_rmdir_send(TALLOC_CTX *mem_ctx,
                                        const char *fname);
 NTSTATUS cli_posix_rmdir_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
 NTSTATUS cli_posix_rmdir(struct cli_state *cli, const char *fname);
+struct tevent_req *cli_notify_send(TALLOC_CTX *mem_ctx,
+                                  struct tevent_context *ev,
+                                  struct cli_state *cli, uint16_t fnum,
+                                  uint32_t buffer_size,
+                                  uint32_t completion_filter, bool recursive);
+NTSTATUS cli_notify_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+                        uint32_t *pnum_changes,
+                        struct notify_change **pchanges);
 
 /* The following definitions come from libsmb/clifsinfo.c  */
 
@@ -3307,8 +3325,9 @@ void update_trustdom_cache( void );
 
 NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
                                      const char *domain,
+                                     const char *account_name,
                                      unsigned char orig_trust_passwd_hash[16],
-                                     uint32 sec_channel_type);
+                                     enum netr_SchannelType sec_channel_type);
 NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli, 
                                           TALLOC_CTX *mem_ctx, 
                                           const char *domain) ;
@@ -3976,6 +3995,7 @@ char *lp_ldap_suffix(void);
 char *lp_ldap_admin_dn(void);
 int lp_ldap_ssl(void);
 bool lp_ldap_ssl_ads(void);
+int lp_ldap_follow_referral(void);
 int lp_ldap_passwd_sync(void);
 bool lp_ldap_delete_dn(void);
 int lp_ldap_replication_sleep(void);
@@ -4110,6 +4130,7 @@ int lp_cups_connection_timeout(void);
 const char *lp_ctdbd_socket(void);
 const char **lp_cluster_addresses(void);
 bool lp_clustering(void);
+int lp_ctdb_timeout(void);
 char *lp_printcommand(int );
 char *lp_lpqcommand(int );
 char *lp_lprmcommand(int );
@@ -4435,9 +4456,11 @@ bool pdb_update_autolock_flag(struct samu *sampass, bool *updated);
 bool pdb_increment_bad_password_count(struct samu *sampass);
 bool is_dc_trusted_domain_situation(const char *domain_name);
 bool get_trust_pw_clear(const char *domain, char **ret_pwd,
-                       const char **account_name, uint32 *channel);
+                       const char **account_name,
+                       enum netr_SchannelType *channel);
 bool get_trust_pw_hash(const char *domain, uint8 ret_pwd[16],
-                      const char **account_name, uint32 *channel);
+                      const char **account_name,
+                      enum netr_SchannelType *channel);
 struct samr_LogonHours get_logon_hours_from_pdb(TALLOC_CTX *mem_ctx,
                                                struct samu *pw);
 /* The following definitions come from passdb/pdb_compat.c  */
@@ -4670,14 +4693,14 @@ bool secrets_fetch_domain_sid(const char *domain, DOM_SID *sid);
 bool secrets_store_domain_guid(const char *domain, struct GUID *guid);
 bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid);
 void *secrets_get_trust_account_lock(TALLOC_CTX *mem_ctx, const char *domain);
-uint32 get_default_sec_channel(void);
+enum netr_SchannelType get_default_sec_channel(void);
 bool secrets_fetch_trust_account_password_legacy(const char *domain,
                                                 uint8 ret_pwd[16],
                                                 time_t *pass_last_set_time,
-                                                uint32 *channel);
+                                                enum netr_SchannelType *channel);
 bool secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
                                          time_t *pass_last_set_time,
-                                         uint32 *channel);
+                                         enum netr_SchannelType *channel);
 bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
                                            DOM_SID *sid, time_t *pass_last_set_time);
 bool secrets_store_trusted_domain_password(const char* domain, const char* pwd,
@@ -4685,10 +4708,10 @@ bool secrets_store_trusted_domain_password(const char* domain, const char* pwd,
 bool secrets_delete_machine_password(const char *domain);
 bool secrets_delete_machine_password_ex(const char *domain);
 bool secrets_delete_domain_sid(const char *domain);
-bool secrets_store_machine_password(const char *pass, const char *domain, uint32 sec_channel);
+bool secrets_store_machine_password(const char *pass, const char *domain, enum netr_SchannelType sec_channel);
 char *secrets_fetch_machine_password(const char *domain,
                                     time_t *pass_last_set_time,
-                                    uint32 *channel);
+                                    enum netr_SchannelType *channel);
 bool trusted_domain_password_delete(const char *domain);
 bool secrets_store_ldap_pw(const char* dn, char* pw);
 bool fetch_ldap_pw(char **dn, char** pw);
@@ -4697,14 +4720,15 @@ NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
 bool secrets_store_afs_keyfile(const char *cell, const struct afs_keyfile *keyfile);
 bool secrets_fetch_afs_key(const char *cell, struct afs_key *result);
 void secrets_fetch_ipc_userpass(char **username, char **domain, char **password);
-TDB_CONTEXT *open_schannel_session_store(TALLOC_CTX *mem_ctx);
 bool secrets_store_generic(const char *owner, const char *key, const char *secret);
 char *secrets_fetch_generic(const char *owner, const char *key);
+bool secrets_delete_generic(const char *owner, const char *key);
 bool secrets_store_local_schannel_key(uint8_t schannel_key[16]);
 bool secrets_fetch_local_schannel_key(uint8_t schannel_key[16]);
 
 /* The following definitions come from passdb/secrets_schannel.c  */
 
+TDB_CONTEXT *open_schannel_session_store(TALLOC_CTX *mem_ctx);
 NTSTATUS schannel_fetch_session_key(TALLOC_CTX *mem_ctx,
                                    const char *computer_name,
                                    struct netlogon_creds_CredentialState **pcreds);
@@ -5130,20 +5154,6 @@ uint32 reg_perfcount_get_last_counter(uint32 base_index);
 uint32 reg_perfcount_get_last_help(uint32 last_counter);
 uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
 uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
-bool _reg_perfcount_get_counter_data(TDB_DATA key, TDB_DATA *data);
-bool _reg_perfcount_get_instance_info(struct PERF_INSTANCE_DEFINITION *inst,
-                                     prs_struct *ps,
-                                     int instId,
-                                     struct PERF_OBJECT_TYPE *obj,
-                                     TDB_CONTEXT *names);
-bool _reg_perfcount_add_instance(struct PERF_OBJECT_TYPE *obj,
-                                prs_struct *ps,
-                                int instInd,
-                                TDB_CONTEXT *names);
-uint32 reg_perfcount_get_perf_data_block(uint32 base_index, 
-                                        prs_struct *ps, 
-                                        struct PERF_DATA_BLOCK *block,
-                                        const char *object_ids);
 WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
 
 /* The following definitions come from registry/reg_util.c  */
@@ -5251,10 +5261,11 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
                                              struct netr_SamInfo3 **info3);
 NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
                                            TALLOC_CTX *mem_ctx,
+                                           const char *account_name,
                                            const unsigned char orig_trust_passwd_hash[16],
                                            const char *new_trust_pwd_cleartext,
                                            const unsigned char new_trust_passwd_hash[16],
-                                           uint32_t sec_channel_type);
+                                           enum netr_SchannelType sec_channel_type);
 
 /* The following definitions come from rpc_client/cli_pipe.c  */
 
@@ -5441,7 +5452,7 @@ NTSTATUS rpccli_samr_chgpasswd_user3(struct rpc_pipe_client *cli,
                                     const char *newpassword,
                                     const char *oldpassword,
                                     struct samr_DomInfo1 **dominfo1,
-                                    struct samr_ChangeReject **reject);
+                                    struct userPwdChangeFailureInformation **reject);
 void get_query_dispinfo_params(int loop_count, uint32 *max_entries,
                               uint32 *max_size);
 NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli,
@@ -6092,12 +6103,14 @@ NTSTATUS pass_oem_change(char *user,
                         const uchar old_lm_hash_encrypted[16],
                         uchar password_encrypted_with_nt_hash[516],
                         const uchar old_nt_hash_encrypted[16],
-                        uint32 *reject_reason);
-NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, bool as_root, uint32 *samr_reject_reason);
+                        enum samPwdChangeReason *reject_reason);
+NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, bool as_root, enum samPwdChangeReason *samr_reject_reason);
 
 /* The following definitions come from smbd/close.c  */
 
-void set_close_write_time(struct files_struct *fsp, struct timespec ts);
+void set_close_write_time(struct share_mode_lock *lck,
+                       struct files_struct *fsp,
+                       struct timespec ts);
 NTSTATUS close_file(struct smb_request *req, files_struct *fsp,
                    enum file_close_type close_type);
 void msg_close_file(struct messaging_context *msg_ctx,
@@ -6238,7 +6251,6 @@ int file_ntimes(connection_struct *conn, const struct smb_filename *smb_fname,
 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);
 
 NTSTATUS set_create_timespec_ea(connection_struct *conn,
                                struct files_struct *fsp,
@@ -7130,6 +7142,7 @@ int vfs_stat_smb_fname(struct connection_struct *conn, const char *fname,
                       SMB_STRUCT_STAT *psbuf);
 int vfs_lstat_smb_fname(struct connection_struct *conn, const char *fname,
                        SMB_STRUCT_STAT *psbuf);
+NTSTATUS vfs_stat_fsp(files_struct *fsp);
 
 /* The following definitions come from torture/denytest.c  */