From 945b0a12b7a47039260330e02b89919c2cefb8d2 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 3 Apr 2020 15:25:44 +0530 Subject: fuse: Add error-logs to debug bug-1433815-auth-allow.t failures Fixes: #1149 Change-Id: I38483fc7d76d7fe0ac9fb649669a46bdf9c82234 Signed-off-by: Pranith Kumar K --- contrib/fuse-lib/mount.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'contrib/fuse-lib') diff --git a/contrib/fuse-lib/mount.c b/contrib/fuse-lib/mount.c index ffa0a4b6316..351972ce3cf 100644 --- a/contrib/fuse-lib/mount.c +++ b/contrib/fuse-lib/mount.c @@ -52,12 +52,16 @@ gf_fuse_unmount (const char *mountpoint, int fd) if (geteuid () == 0) { fuse_mnt_umount ("fuse", mountpoint, mountpoint, 1); return; + } else { + GFFUSE_LOGERR ("fuse: Effective-uid: %d", geteuid()); } res = umount2 (mountpoint, 2); if (res == 0) return; + GFFUSE_LOGERR ("fuse: failed to unmount %s: %s", + mountpoint, strerror (errno)); pid = fork (); if (pid == -1) return; @@ -67,6 +71,8 @@ gf_fuse_unmount (const char *mountpoint, int fd) "--", mountpoint, NULL }; execvp (FUSERMOUNT_PROG, (char **)argv); + GFFUSE_LOGERR ("fuse: failed to execute fuserumount: %s", + strerror (errno)); _exit (1); } waitpid (pid, NULL, 0); -- cgit