*/
#include "includes.h"
+#include "memcache.h"
+#include "smbd/smbd.h"
+#include "messages.h"
+#include "smbprofile.h"
+#include "tdb_compat.h"
/****************************************************************************
Stat cache code used in unix_convert.
DATA_BLOB data_val;
char *name;
TALLOC_CTX *ctx = talloc_tos();
+ struct smb_filename smb_fname;
*pp_dirpath = NULL;
*pp_start = *pp_name;
"-> [%s]\n", chk_name, translated_path ));
DO_PROFILE_INC(statcache_hits);
- if (vfs_stat_smb_fname(conn, translated_path, pst) != 0) {
+ ZERO_STRUCT(smb_fname);
+ smb_fname.base_name = translated_path;
+
+ if (SMB_VFS_STAT(conn, &smb_fname) != 0) {
/* Discard this entry - it doesn't exist in the filesystem. */
memcache_delete(smbd_memcache(), STAT_CACHE,
data_blob_const(chk_name, strlen(chk_name)));
TALLOC_FREE(translated_path);
return False;
}
+ *pst = smb_fname.st;
if (!sizechanged) {
memcpy(*pp_name, translated_path,
Tell all smbd's to delete an entry.
**************************************************************************/
-void send_stat_cache_delete_message(const char *name)
+void smbd_send_stat_cache_delete_message(struct messaging_context *msg_ctx,
+ const char *name)
{
#ifdef DEVELOPER
- message_send_all(smbd_messaging_context(),
+ message_send_all(msg_ctx,
MSG_SMB_STAT_CACHE_DELETE,
name,
strlen(name)+1,