Rename more things from fuse to fuse3
authorPrzemysław Pawełczyk <przemoc@gmail.com>
Tue, 29 Nov 2016 05:33:14 +0000 (06:33 +0100)
committerNikolaus Rath <Nikolaus@rath.org>
Tue, 29 Nov 2016 05:33:14 +0000 (21:33 -0800)
12 files changed:
Makefile.am
README.md
doc/Makefile.am
doc/fusermount.1 [deleted file]
doc/fusermount3.1 [new file with mode: 0644]
doc/kernel.txt
doc/mount.fuse.8
lib/mount.c
test/util.py
util/Makefile.am
util/fusermount.c
util/init_script

index 33b8e0a88ac90a3ad9fa709c60107bfacf8b8fb5..4e95a71532fc8cb1c089e16bf276d5be746ccc7a 100644 (file)
@@ -17,14 +17,14 @@ $(pkgconfig_DATA): config.status
 
 .PHONY: setuid_fusermount
 setuid_fusermount:
-       @echo "Attempting to use sudo to make util/fusermount setuid root"
+       @echo "Attempting to use sudo to make util/fusermount3 setuid root"
        @echo "If this fails, set permissions manually and re-run make test"
        test $$(ls -n util/fusermount3 | awk 'NR==1 {print $$3}') -eq 0 || \
            sudo chown root util/fusermount3
        test -u util/fusermount3 || \
            sudo chmod u+s util/fusermount3
 
-# If we are not root, util/fusermount needs to be setuid root
+# If we are not root, util/fusermount3 needs to be setuid root
 # for tests to work.
 
 test_deps = $(shell [ "$${UID}" -eq 0 ] || echo setuid_fusermount)
index f2d9ceb14be6cfe07d1b868713039349d9b43d38..ae4171991ff336a7cdd8d5d825af3f9244fdea56 100644 (file)
--- a/README.md
+++ b/README.md
@@ -73,7 +73,7 @@ contain FUSE support).
 Security implications
 ---------------------
 
-If you run `make install`, the *fusermount* program is installed
+If you run `make install`, the *fusermount3* program is installed
 set-user-id to root.  This is done to allow normal users to mount
 their own filesystem implementations.
 
index f92214b964078416e1a849c4be52b6f629e55095..8801da2bfb2e4174b3beab060d8bec9a62b6e530 100644 (file)
@@ -1,5 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
-dist_man_MANS = fusermount.1 mount.fuse.8
+dist_man_MANS = fusermount3.1 mount.fuse.8
 
 EXTRA_DIST = kernel.txt Doxyfile html README.NFS
diff --git a/doc/fusermount.1 b/doc/fusermount.1
deleted file mode 100644 (file)
index 9f4cd5a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-.TH FUSERMOUNT 1 2011\-10\-23 2.8.6 "Filesystem in Userspace (FUSE)"
-
-.SH NAME
-\fBfusermount\fR \- mount and unmount FUSE filesystems
-
-.SH SYNOPSIS
-\fBfusermount\fR [\fIOPTIONS\fR] \fIMOUNTPOINT\fR
-
-.SH DESCRIPTION
-Filesystem in Userspace (FUSE) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. It also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations.
-.PP
-\fBfusermount\fR is a program to mount and unmount FUSE
-filesystems. It should be called directly only for unmounting FUSE
-file systems. To allow mounting and unmounting by unprivileged users,
-\fBfusermount\fR needs to be installed set-uid root.
-.SH OPTIONS
-.IP "\-h" 4
-print help.
-.IP "\-V" 4
-print version.
-.IP "-o \fIOPTION\fR[,\fIOPTION\fR...]" 4
-mount options.
-.IP "-u" 4
-unmount.
-.IP "-q" 4
-quiet.
-.IP "-z" 4
-lazy unmount.
-
-.SH SEE ALSO
-\fImount\fR(8),
-\fImount.fuse\fR(8),
-
-.SH HOMEPAGE
-More information about fusermount and the FUSE project can be found at <\fIhttp://fuse.sourceforge.net/\fR>.
-
-.SH AUTHORS
-.LP
-FUSE is currently maintained by Nikolaus Rath <Nikolaus@rath.org>
-.LP
-The original author of FUSE is Miklos Szeredi <\fImiklos@szeredi.hu\fR>.
-.LP
-This manual page was originally written by Daniel Baumann <\fIdaniel.baumann@progress\-technologies.net\fR>.
diff --git a/doc/fusermount3.1 b/doc/fusermount3.1
new file mode 100644 (file)
index 0000000..6f94e42
--- /dev/null
@@ -0,0 +1,43 @@
+.TH FUSERMOUNT3 1 2011\-10\-23 2.8.6 "Filesystem in Userspace (FUSE)"
+
+.SH NAME
+\fBfusermount3\fR \- mount and unmount FUSE filesystems
+
+.SH SYNOPSIS
+\fBfusermount3\fR [\fIOPTIONS\fR] \fIMOUNTPOINT\fR
+
+.SH DESCRIPTION
+Filesystem in Userspace (FUSE) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. It also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations.
+.PP
+\fBfusermount3\fR is a program to mount and unmount FUSE
+filesystems. It should be called directly only for unmounting FUSE
+file systems. To allow mounting and unmounting by unprivileged users,
+\fBfusermount3\fR needs to be installed set-uid root.
+.SH OPTIONS
+.IP "\-h" 4
+print help.
+.IP "\-V" 4
+print version.
+.IP "-o \fIOPTION\fR[,\fIOPTION\fR...]" 4
+mount options.
+.IP "-u" 4
+unmount.
+.IP "-q" 4
+quiet.
+.IP "-z" 4
+lazy unmount.
+
+.SH SEE ALSO
+\fImount\fR(8),
+\fImount.fuse\fR(8),
+
+.SH HOMEPAGE
+More information about fusermount3 and the FUSE project can be found at <\fIhttp://fuse.sourceforge.net/\fR>.
+
+.SH AUTHORS
+.LP
+FUSE is currently maintained by Nikolaus Rath <Nikolaus@rath.org>
+.LP
+The original author of FUSE is Miklos Szeredi <\fImiklos@szeredi.hu\fR>.
+.LP
+This manual page was originally written by Daniel Baumann <\fIdaniel.baumann@progress\-technologies.net\fR>.
index 7938aabfc525b9c34218836e0feb419dc2b42494..e73484f6a48bc6bb17aaa55ee4b0cd27ad1141b8 100644 (file)
@@ -39,7 +39,7 @@ What is FUSE?
 
 FUSE is a userspace filesystem framework.  It consists of a kernel
 module (fuse.ko), a userspace library (libfuse.*) and a mount utility
-(fusermount).
+(fusermount3).
 
 One of the most important features of FUSE is allowing secure,
 non-privileged mounts.  This opens up new possibilities for the use of
@@ -176,7 +176,7 @@ How do non-privileged mounts work?
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Since the mount() system call is a privileged operation, a helper
-program (fusermount) is needed, which is installed setuid root.
+program (fusermount3) is needed, which is installed setuid root.
 
 The implication of providing non-privileged mounts is that the mount
 owner must not be able to use this capability to compromise the
@@ -204,7 +204,7 @@ How are requirements fulfilled?
 
     The solution is not to allow opening device files and ignore
     setuid and setgid bits when executing programs.  To ensure this
-    fusermount always adds "nosuid" and "nodev" to the mount options
+    fusermount3 always adds "nosuid" and "nodev" to the mount options
     for non-privileged mounts.
 
  B) If another user is accessing files or directories in the
@@ -222,7 +222,7 @@ How are requirements fulfilled?
         owner could otherwise not be able to modify (or could only
         make limited modifications).
 
-        This is solved in fusermount, by checking the access
+        This is solved in fusermount3, by checking the access
         permissions on the mountpoint and only allowing the mount if
         the mount owner can do unlimited modification (has write
         access to the mountpoint, and mountpoint is not a "sticky"
index 81c498e9305100de4f765e170a37cbee704b4ce7..c42894b134942d95f835882813851bb989385783 100644 (file)
@@ -16,14 +16,14 @@ kernel.
 \fBlibfuse\fP
 The shared library that most (user-space) filesystems use to
 communicate with FUSE (the kernel filesystem). libfuse also provides
-the \fBfusermount\fP helper to allow non-privileged users to mount
-filesystems.
+the \fBfusermount3\fP (or \fBfusermount\fP if you have older version of
+libfuse) helper to allow non-privileged users to mount filesystems.
 .TP
 \fBfilesystem owner\fP
 The user that starts the filesystem and instructs the kernel to
 associate it with a particular mountpoint. The latter is typically done
 by the filesystem itself on start-up. When using libfuse, this is done
-by calling the \fBfusermount\fP utility.
+by calling the \fBfusermount3\fP utility.
 .TP
 \fBclient\fP
 Any process that interacts with the mountpoint.
@@ -37,7 +37,7 @@ Set the maximum number of FUSE mounts allowed to non-root users. The default is
 Allow non-root users to specify the \fBallow_other\fP or
 \fBallow_root\fP mount options (see below).
 .TP
-These limits are enforced by the \fBfusermount\fP helper, so they can be avoided by filesystems that run as root.
+These limits are enforced by the \fBfusermount3\fP helper, so they can be avoided by filesystems that run as root.
 .SH OPTIONS
 Most of the generic mount options described in \fBmount\fP are
 supported (\fBro\fP, \fBrw\fP, \fBsuid\fP, \fBnosuid\fP, \fBdev\fP,
@@ -217,7 +217,7 @@ Transform absolute symlinks into relative
 \fBnorellinks\fP
 Do not transform absolute symlinks into relative.  This is the default.
 .SH SECURITY
-The fusermount program is installed set-user-gid to fuse. This is done to allow users from fuse group to mount
+The fusermount3 program is installed set-user-gid to fuse. This is done to allow users from fuse group to mount
 their own filesystem implementations.
 There must however be some limitations, in order to prevent Bad User from
 doing nasty things.  Currently those limitations are:
@@ -228,7 +228,7 @@ The mountpoint is not a sticky directory which isn't owned by the user (like \fI
 .IP 3.
 No other user (including root) can access the contents of the mounted filesystem.
 .SH NOTE
-FUSE filesystems are unmounted using the \fBfusermount\fP(1) command (\fBfusermount -u mountpoint\fP).
+FUSE filesystems are unmounted using the \fBfusermount3\fP(1) command (\fBfusermount3 -u mountpoint\fP).
 .SH "AUTHORS"
 .LP
 FUSE is currently maintained by Nikolaus Rath <Nikolaus@rath.org>
@@ -238,5 +238,6 @@ The original author of FUSE is Miklos Szeredi <mszeredi@inf.bme.hu>.
 This man page was originally written by Bastien Roucaries <roucaries.bastien+debian@gmail.com> for the
 Debian GNU/Linux distribution.
 .SH SEE ALSO
-fusermount(1)
-mount(8)
+.BR fusermount3 (1)
+.BR fusermount (1)
+.BR mount (8)
index 8fbebbfc0c1d82fdb5c7bda518321338e72215f2..d19242eaba98a8811eb57cdb3be82dc85c376b16 100644 (file)
@@ -356,7 +356,7 @@ static int fuse_mount_fusermount(const char *mountpoint, struct mount_opts *mo,
                snprintf(env, sizeof(env), "%i", fds[0]);
                setenv(FUSE_COMMFD_ENV, env, 1);
                exec_fusermount(argv);
-               perror("fuse: failed to exec fusermount");
+               perror("fuse: failed to exec fusermount3");
                _exit(1);
        }
 
@@ -364,7 +364,7 @@ static int fuse_mount_fusermount(const char *mountpoint, struct mount_opts *mo,
        rv = receive_fd(fds[1]);
 
        if (!mo->auto_unmount) {
-               /* with auto_unmount option fusermount will not exit until
+               /* with auto_unmount option fusermount3 will not exit until
                   this socket is closed */
                close(fds[1]);
                waitpid(pid, NULL, 0); /* bury zombie */
@@ -404,7 +404,7 @@ static int fuse_mount_sys(const char *mnt, struct mount_opts *mo,
        }
 
        if (mo->auto_unmount) {
-               /* Tell the caller to fallback to fusermount because
+               /* Tell the caller to fallback to fusermount3 because
                   auto-unmount does not work otherwise. */
                return -2;
        }
@@ -462,7 +462,7 @@ static int fuse_mount_sys(const char *mnt, struct mount_opts *mo,
        if (res == -1) {
                /*
                 * Maybe kernel doesn't support unprivileged mounts, in this
-                * case try falling back to fusermount
+                * case try falling back to fusermount3
                 */
                if (errno == EPERM) {
                        res = -2;
index 4f8e123263b14cf75f6d5f7d17ef4f749b6379f3..76b8ec1145a8af8758e5d842c644436c7b35ed39 100644 (file)
@@ -28,7 +28,7 @@ def cleanup(mnt_dir):
                     stderr=subprocess.STDOUT)
 
 def umount(mount_process, mnt_dir):
-    # fusermount will be setuid root, so we can only trace it with
+    # fusermount3 will be setuid root, so we can only trace it with
     # valgrind if we're root
     if os.getuid() == 0:
         cmdline = base_cmdline
@@ -85,5 +85,5 @@ else:
     base_cmdline = []
 
 
-# Try to use local fusermount
+# Try to use local fusermount3
 os.environ['PATH'] = '%s:%s' % (pjoin(basename, 'util'), os.environ['PATH'])
index 32c4e1e37803fe114ca830533c893e43212257e3..756afea8235549f0642d6144e04d1f6c2238e4c1 100644 (file)
@@ -33,7 +33,7 @@ install-exec-local:
        $(MKDIR_P) $(DESTDIR)$(MOUNT_FUSE_PATH)
        $(INSTALL_PROGRAM) $(builddir)/mount.fuse3 $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse3
        $(MKDIR_P) $(DESTDIR)$(INIT_D_PATH)
-       $(INSTALL_SCRIPT) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse
+       $(INSTALL_SCRIPT) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse3
        @if test -x /usr/sbin/update-rc.d; then \
                echo "/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true"; \
                /usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true; \
@@ -41,7 +41,7 @@ install-exec-local:
 
 install-data-local:
        $(MKDIR_P) $(DESTDIR)$(UDEV_RULES_PATH)
-       $(INSTALL_DATA) $(srcdir)/udev.rules $(DESTDIR)$(UDEV_RULES_PATH)/99-fuse.rules
+       $(INSTALL_DATA) $(srcdir)/udev.rules $(DESTDIR)$(UDEV_RULES_PATH)/99-fuse3.rules
 
 uninstall-local:
        rm -f $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse3
index 03da451cf34637290ea7e823efc3602e03c8cc38..0f65435698aa10023dcb7ddf2d7ce0c8152a9ae2 100644 (file)
@@ -209,10 +209,10 @@ static int may_unmount(const char *mnt, int quiet)
 }
 
 /*
- * Check whether the file specified in "fusermount -u" is really a
+ * Check whether the file specified in "fusermount3 -u" is really a
  * mountpoint and not a symlink.  This is necessary otherwise the user
  * could move the mountpoint away and replace it with a symlink
- * pointing to an arbitrary mount, thereby tricking fusermount into
+ * pointing to an arbitrary mount, thereby tricking fusermount3 into
  * unmounting that (umount(2) will follow symlinks).
  *
  * This is the child process running in a separate mount namespace, so
@@ -780,7 +780,7 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode,
                        if (getuid() != 0 && !user_allow_other &&
                            (opt_eq(s, len, "allow_other") ||
                             opt_eq(s, len, "allow_root"))) {
-                               fprintf(stderr, "%s: option %.*s only allowed if 'user_allow_other' is set in /etc/fuse.conf\n", progname, len, s);
+                               fprintf(stderr, "%s: option %.*s only allowed if 'user_allow_other' is set in %s\n", progname, len, s, FUSE_CONF);
                                goto err;
                        }
                        if (!skip_option) {
@@ -1022,7 +1022,7 @@ static int mount_fuse(const char *mnt, const char *opts)
        if (getuid() != 0 && mount_max != -1) {
                int mount_count = count_fuse_fs();
                if (mount_count >= mount_max) {
-                       fprintf(stderr, "%s: too many FUSE filesystems mounted; mount_max=N can be set in /etc/fuse.conf\n", progname);
+                       fprintf(stderr, "%s: too many FUSE filesystems mounted; mount_max=N can be set in %s\n", progname, FUSE_CONF);
                        goto fail_close_fd;
                }
        }
@@ -1119,7 +1119,7 @@ static void usage(void)
 
 static void show_version(void)
 {
-       printf("fusermount version: %s\n", PACKAGE_VERSION);
+       printf("fusermount3 version: %s\n", PACKAGE_VERSION);
        exit(0);
 }
 
index 331b33addb049de173bbf70712df7a33c3c57e7e..4815e7b3c559df75a0e3cfadc98b03a44624622d 100755 (executable)
@@ -17,7 +17,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 MOUNTPOINT=/sys/fs/fuse/connections
 
 # Gracefully exit if the package has been removed.
-which fusermount &>/dev/null || exit 5
+which fusermount3 &>/dev/null || exit 5
 
 case "$1" in
     start|restart|force-reload)