summaryrefslogblamecommitdiff
path: root/user/fuse3/fix-realpath.patch
blob: 375bedc961ca4f4a957aef33d2165bdc4e6c1856 (plain) (tree)


























                                                                                  
--- fuse-3.1.0.orig/util/fusermount.c
+++ fuse-3.1.0/util/fusermount.c
@@ -1200,19 +1200,16 @@
 
 	origmnt = argv[optind];
 
-	drop_privs();
 	mnt = fuse_mnt_resolve_path(progname, origmnt);
-	if (mnt != NULL) {
-		res = chdir("/");
-		if (res == -1) {
-			fprintf(stderr, "%s: failed to chdir to '/'\n", progname);
-			goto err_out;
-		}
-	}
-	restore_privs();
 	if (mnt == NULL)
 		exit(1);
 
+	res = chdir("/");
+	if (res == -1) {
+		fprintf(stderr, "%s: failed to chdir to '/'\n", progname);
+		exit(1);
+	}
+
 	umask(033);
 	if (unmount)
 		goto do_unmount;