[PATCHES] Change some log levels
Christof Schmitt
cs at samba.org
Wed Jul 8 21:50:35 UTC 2015
Going through a log from Samba running at log level 3 shows many
messages from check_reduced_name and unix_mode, while they should
probably get only logged on a higher level. The attached patches change
the log levels of these messages and also uses the new debug macros.
Christof
-------------- next part --------------
From 2b58b3705cb1adbc8ec08da714305d3fee61d60c Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Wed, 8 Jul 2015 14:07:18 -0700
Subject: [PATCH 1/3] vfs: Make entry message for check_reduced_name a debug message
The interesting information is already logged later; having an
additional message when entering the function should be only done as
debug message (level 10).
Signed-off-by: Christof Schmitt <cs at samba.org>
---
source3/smbd/vfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 7f60b06..0f443ee 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -1140,7 +1140,7 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
bool allow_symlinks = true;
bool allow_widelinks = false;
- DEBUG(3,("check_reduced_name [%s] [%s]\n", fname, conn->connectpath));
+ DBG_DEBUG("check_reduced_name [%s] [%s]\n", fname, conn->connectpath);
resolved_name = SMB_VFS_REALPATH(conn,fname);
--
1.7.1
From b1206e1a55b4fe50c84b64e36bebe8646a086319 Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Wed, 8 Jul 2015 14:12:20 -0700
Subject: [PATCH 2/3] vfs: Change final message in check_reduce_name to "info"
"Informational" is a better description for this message; change the log
level accordingly (level 5).
Signed-off-by: Christof Schmitt <cs at samba.org>
---
source3/smbd/vfs.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 0f443ee..9f3ba6d 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -1269,8 +1269,7 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
out:
- DEBUG(3,("check_reduced_name: %s reduced to %s\n", fname,
- resolved_name));
+ DBG_INFO("%s reduced to %s\n", fname, resolved_name);
SAFE_FREE(resolved_name);
return NT_STATUS_OK;
}
--
1.7.1
From 9470af2fb56d14c868da0c4c3e038582fbfb82b1 Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Wed, 8 Jul 2015 14:40:25 -0700
Subject: [PATCH 3/3] dosmode: Change message of result to informational
Logging the returned mode bits should be only "informational" (level 5).
Signed-off-by: Christof Schmitt <cs at samba.org>
---
source3/smbd/dosmode.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 714a7f8..72acd4e 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -192,8 +192,9 @@ mode_t unix_mode(connection_struct *conn, int dosmode,
}
}
- DEBUG(3,("unix_mode(%s) returning 0%o\n", smb_fname_str_dbg(smb_fname),
- (int)result));
+ DBG_INFO("unix_mode(%s) returning 0%o\n",
+ smb_fname_str_dbg(smb_fname), (int)result);
+
return(result);
}
--
1.7.1
More information about the samba-technical
mailing list