| From 58abe1b651a85f8c0dbb3183db98a0571360d0c7 Mon Sep 17 00:00:00 2001 |
| From: =?UTF-8?q?Fran=C3=A7ois=20Degros?= <fdegros@chromium.org> |
| Date: Wed, 2 Nov 2022 14:11:04 +1100 |
| Subject: [PATCH] Don't log volume label |
| |
| Drive labels are considered private information and should not be |
| captured in logs. The ntfs3g logs go to /var/log/messages. So ensure the |
| label is not included in this message. |
| --- |
| src/ntfs-3g.c | 8 +++----- |
| 1 file changed, 3 insertions(+), 5 deletions(-) |
| |
| diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c |
| index faf372fd..f46758e5 100644 |
| --- a/src/ntfs-3g.c |
| +++ b/src/ntfs-3g.c |
| @@ -3914,8 +3914,7 @@ static void ntfs_close(void) |
| return; |
| |
| if (ctx->mounted) { |
| - ntfs_log_info("Unmounting %s (%s)\n", opts.device, |
| - ctx->vol->vol_name); |
| + ntfs_log_info("Unmounting %s\n", opts.device); |
| if (ntfs_fuse_fill_security_context(&security)) { |
| if (ctx->seccache && ctx->seccache->head.p_reads) { |
| ntfs_log_info("Permissions cache : %lu writes, " |
| @@ -4315,10 +4314,9 @@ static void setup_logging(char *parsed_options) |
| if (strcmp(opts.arg_device,opts.device)) |
| ntfs_log_info("Requested device %s canonicalized as %s\n", |
| opts.arg_device,opts.device); |
| - ntfs_log_info("Mounted %s (%s, label \"%s\", NTFS %d.%d)\n", |
| + ntfs_log_info("Mounted %s (%s, NTFS %d.%d)\n", |
| opts.device, (ctx->ro) ? "Read-Only" : "Read-Write", |
| - ctx->vol->vol_name, ctx->vol->major_ver, |
| - ctx->vol->minor_ver); |
| + ctx->vol->major_ver, ctx->vol->minor_ver); |
| ntfs_log_info("Cmdline options: %s\n", opts.options ? opts.options : ""); |
| ntfs_log_info("Mount options: %s\n", parsed_options); |
| } |
| -- |
| 2.38.1.273.g43a17bfeac-goog |
| |