summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/onefs_streams.c23
-rw-r--r--source3/modules/onefs_system.c2
-rw-r--r--source3/smbd/filename.c2
3 files changed, 25 insertions, 2 deletions
diff --git a/source3/modules/onefs_streams.c b/source3/modules/onefs_streams.c
index da2666130c..fa65b51996 100644
--- a/source3/modules/onefs_streams.c
+++ b/source3/modules/onefs_streams.c
@@ -71,6 +71,13 @@ NTSTATUS onefs_stream_prep_smb_fname(TALLOC_CTX *ctx,
stream_name, &smb_fname_in->st,
smb_fname_out);
TALLOC_FREE(stream_name);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(5, ("Failed to prep stream name for %s: %s\n",
+ *smb_fname_out ?
+ smb_fname_str_dbg(*smb_fname_out) : "NULL",
+ nt_errstr(status)));
+ }
return status;
}
@@ -96,6 +103,9 @@ static int get_stream_dir_fd(connection_struct *conn, const char *base,
int dir_fd;
int saved_errno;
+ DEBUG(10, ("Getting stream directory fd: %s (%d)\n", base,
+ base_fdp ? *base_fdp : -1));
+
/* If a valid base_fdp was given, use it. */
if (base_fdp && *base_fdp >= 0) {
base_fd = *base_fdp;
@@ -115,6 +125,8 @@ static int get_stream_dir_fd(connection_struct *conn, const char *base,
0,
NULL);
if (base_fd < 0) {
+ DEBUG(5, ("Failed getting base fd: %s\n",
+ strerror(errno)));
return -1;
}
}
@@ -147,6 +159,11 @@ static int get_stream_dir_fd(connection_struct *conn, const char *base,
*base_fdp = base_fd;
}
+ if (dir_fd < 0) {
+ DEBUG(5, ("Failed getting stream directory fd: %s\n",
+ strerror(errno)));
+ }
+
return dir_fd;
}
@@ -173,6 +190,9 @@ int onefs_rename(vfs_handle_struct *handle,
/* For now don't allow renames from or to the default stream. */
if (is_ntfs_default_stream_smb_fname(smb_fname_src) ||
is_ntfs_default_stream_smb_fname(smb_fname_dst)) {
+ DEBUG(3, ("Unable to rename to/from a default stream: %s -> "
+ "%s\n", smb_fname_str_dbg(smb_fname_src),
+ smb_fname_str_dbg(smb_fname_dst)));
errno = ENOSYS;
goto done;
}
@@ -311,6 +331,9 @@ static int stat_stream(struct connection_struct *conn, const char *base,
/* Stat the stream. */
ret = onefs_sys_fstat_at(dir_fd, stream, sbuf, flags);
if (ret != -1) {
+ DEBUG(10, ("stat of stream '%s' failed: %s\n", stream,
+ strerror(errno)));
+ } else {
/* Now stat the base file and merge the results. */
ret = onefs_sys_fstat(base_fd, &base_sbuf);
if (ret != -1) {
diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c
index e3edc81608..33bec2658b 100644
--- a/source3/modules/onefs_system.c
+++ b/source3/modules/onefs_system.c
@@ -178,7 +178,7 @@ int onefs_sys_create_file(connection_struct *conn,
open_access_mask));
}
- DEBUG(10,("onefs_sys_create_file: base_fd = %d, fname = %s"
+ DEBUG(10,("onefs_sys_create_file: base_fd = %d, fname = %s "
"open_access_mask = 0x%x, flags = 0x%x, mode = 0%o, "
"desired_oplock = %s, id = 0x%x, secinfo = 0x%x, sd = %p, "
"dos_attributes = 0x%x, path = %s, "
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index ee97388da2..a64ca27114 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -973,8 +973,8 @@ static NTSTATUS build_stream_path(TALLOC_CTX *mem_ctx,
}
if (errno != ENOENT) {
+ DEBUG(10, ("vfs_stat failed: %s\n", strerror(errno)));
status = map_nt_error_from_unix(errno);
- DEBUG(10, ("vfs_stat failed: %s\n", nt_errstr(status)));
goto fail;
}