/* The following definitions come from lib/sharesec.c */
+bool share_info_db_init(void);
SEC_DESC *get_share_security_default( TALLOC_CTX *ctx, size_t *psize, uint32 def_access);
SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char *servicename,
size_t *psize);
void srv_put_dos_date(char *buf,int offset,time_t unixdate);
void srv_put_dos_date2(char *buf,int offset, time_t unixdate);
void srv_put_dos_date3(char *buf,int offset,time_t unixdate);
-void put_long_date_timespec(char *p, struct timespec ts);
+void round_timespec(enum timestamp_set_resolution res, struct timespec *ts);
+void put_long_date_timespec(enum timestamp_set_resolution res, char *p, struct timespec ts);
void put_long_date(char *p, time_t t);
void dos_filetime_timespec(struct timespec *tsp);
time_t make_unix_date2(const void *date_ptr, int zone_offset);
struct timespec timespec_min(const struct timespec *ts1,
const struct timespec *ts2);
int timespec_compare(const struct timespec *ts1, const struct timespec *ts2);
+void round_timespec_to_sec(struct timespec *ts);
+void round_timespec_to_usec(struct timespec *ts);
struct timespec interpret_long_date(const char *p);
void cli_put_dos_date(struct cli_state *cli, char *buf, int offset, time_t unixdate);
void cli_put_dos_date2(struct cli_state *cli, char *buf, int offset, time_t unixdate);
const char *sitename,
struct sockaddr_storage *pss);
-
-/* The following definitions come from libsmb/credentials.c */
-
-char *credstr(const unsigned char *cred);
-void creds_server_init(uint32 neg_flags,
- struct dcinfo *dc,
- struct netr_Credential *clnt_chal,
- struct netr_Credential *srv_chal,
- const unsigned char mach_pw[16],
- struct netr_Credential *init_chal_out);
-bool netlogon_creds_server_check(const struct dcinfo *dc,
- const struct netr_Credential *rcv_cli_chal_in);
-bool netlogon_creds_server_step(struct dcinfo *dc,
- const struct netr_Authenticator *received_cred,
- struct netr_Authenticator *cred_out);
-void cred_hash3(unsigned char *out, const unsigned char *in, const unsigned char *key, int forw);
-
/* The following definitions come from libads/kerberos_keytab.c */
int ads_keytab_add_entry(ADS_STRUCT *ads, const char *srvPrinc);
NTSTATUS dsgetdcname(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
const char *domain_name,
- struct GUID *domain_guid,
+ const struct GUID *domain_guid,
const char *site_name,
uint32_t flags,
struct netr_DsRGetDCNameInfo **info);
bool lp_winbind_offline_logon(void);
bool lp_winbind_normalize_names(void);
bool lp_winbind_rpc_only(void);
+bool lp_create_krb5_conf(void);
const char **lp_idmap_domains(void);
const char *lp_idmap_backend(void);
char *lp_idmap_alloc_backend(void);
bool lp_print_ok(int );
bool lp_map_hidden(int );
bool lp_map_archive(int );
+bool lp_store_create_time(int );
bool lp_store_dos_attributes(int );
bool lp_dmapi_support(int );
bool lp_locking(const struct share_params *p );
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);
-bool secrets_store_schannel_session_info(TALLOC_CTX *mem_ctx,
- const char *remote_machine,
- const struct dcinfo *pdc);
-bool secrets_restore_schannel_session_info(TALLOC_CTX *mem_ctx,
- const char *remote_machine,
- struct dcinfo **ppdc);
+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_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 */
+
+NTSTATUS schannel_fetch_session_key(TALLOC_CTX *mem_ctx,
+ const char *computer_name,
+ struct netlogon_creds_CredentialState **pcreds);
+NTSTATUS schannel_store_session_key(TALLOC_CTX *mem_ctx,
+ struct netlogon_creds_CredentialState *creds);
+
/* The following definitions come from passdb/util_builtin.c */
bool lookup_builtin_rid(TALLOC_CTX *mem_ctx, uint32 rid, const char **name);
bool conn_close_all(struct smbd_server_connection *sconn);
bool conn_idle_all(struct smbd_server_connection *sconn, time_t t);
void conn_clear_vuid_caches(struct smbd_server_connection *sconn, uint16 vuid);
-void conn_free_internal(connection_struct *conn);
void conn_free(connection_struct *conn);
void msg_force_tdis(struct messaging_context *msg,
void *private_data,
uint32 mode,
time_t date,
bool uc);
-void init_dptrs(void);
-char *dptr_path(int key);
-char *dptr_wcard(int key);
-uint16 dptr_attr(int key);
-void dptr_close(int *key);
+bool init_dptrs(struct smbd_server_connection *sconn);
+char *dptr_path(struct smbd_server_connection *sconn, int key);
+char *dptr_wcard(struct smbd_server_connection *sconn, int key);
+uint16 dptr_attr(struct smbd_server_connection *sconn, int key);
+void dptr_close(struct smbd_server_connection *sconn, int *key);
void dptr_closecnum(connection_struct *conn);
void dptr_idlecnum(connection_struct *conn);
-void dptr_closepath(char *path,uint16 spid);
+void dptr_closepath(struct smbd_server_connection *sconn,
+ char *path,uint16 spid);
NTSTATUS dptr_create(connection_struct *conn, const char *path, bool old_handle, bool expect_close,uint16 spid,
const char *wcard, bool wcard_has_wild, uint32 attr, struct dptr_struct **dptr_ret);
int dptr_CloseDir(struct dptr_struct *dptr);
bool dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst);
void dptr_DirCacheAdd(struct dptr_struct *dptr, const char *name, long offset);
void dptr_init_search_op(struct dptr_struct *dptr);
-bool dptr_fill(char *buf1,unsigned int key);
-struct dptr_struct *dptr_fetch(char *buf,int *num);
-struct dptr_struct *dptr_fetch_lanman2(int dptr_num);
+bool dptr_fill(struct smbd_server_connection *sconn,
+ char *buf1,unsigned int key);
+struct dptr_struct *dptr_fetch(struct smbd_server_connection *sconn,
+ char *buf,int *num);
+struct dptr_struct *dptr_fetch_lanman2(struct smbd_server_connection *sconn,
+ int dptr_num);
bool dir_check_ftype(connection_struct *conn, uint32 mode, uint32 dirtype);
bool get_dir_entry(TALLOC_CTX *ctx,
- connection_struct *conn,
+ struct dptr_struct *dirptr,
const char *mask,
uint32 dirtype,
char **pp_fname_out,
struct timespec mtime);
bool update_write_time(struct files_struct *fsp);
+NTSTATUS set_create_timespec_ea(connection_struct *conn,
+ struct files_struct *fsp,
+ const struct smb_filename *smb_fname,
+ struct timespec create_time);
+
+struct timespec get_create_timespec(connection_struct *conn,
+ struct files_struct *fsp,
+ const struct smb_filename *smb_fname);
+
+struct timespec get_change_timespec(connection_struct *conn,
+ struct files_struct *fsp,
+ const struct smb_filename *smb_fname);
+
/* The following definitions come from smbd/error.c */
bool use_nt_status(void);