|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[PATCH] mount.cifs: don't pass text ro/rw options to kernel/bin/mount strips off the ro/rw options after setting the MS_RDONLY
flag appropriately. Make mount.cifs do the same thing. Signed-off-by: Jeff Layton <jlayton@...> --- client/mount.cifs.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/client/mount.cifs.c b/client/mount.cifs.c index db05665..4387f59 100644 --- a/client/mount.cifs.c +++ b/client/mount.cifs.c @@ -771,8 +771,10 @@ static int parse_options(char ** optionsp, unsigned long * filesys_flags) got_password = 1; } else if (strncmp(data, "ro", 2) == 0) { *filesys_flags |= MS_RDONLY; + goto nocopy; } else if (strncmp(data, "rw", 2) == 0) { *filesys_flags &= ~MS_RDONLY; + goto nocopy; } else if (strncmp(data, "remount", 7) == 0) { *filesys_flags |= MS_REMOUNT; } /* else if (strnicmp(data, "port", 4) == 0) { -- 1.6.0.6 _______________________________________________ linux-cifs-client mailing list linux-cifs-client@... https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
|
[PATCH] umount.cifs: don't build it by defaultNow that the sanity checks for mount.cifs default to matching the
behavior of /bin/mount, then there is virtually no need for umount.cifs. The only exception is when someone enables the loose setuid behavior in mount.cifs. If an unprivileged user mounts a share that isn't in /etc/fstab, then /bin/mount won't allow that user to unmount it. In that situation, umount.cifs will be necessary to allow unmounting the share. Signed-off-by: Jeff Layton <jlayton@...> --- source3/Makefile.in | 13 ++++++++++--- source3/configure.in | 43 +++++++++++++++++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 9 deletions(-) diff --git a/source3/Makefile.in b/source3/Makefile.in index a6c918e..0306411 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -204,7 +204,7 @@ PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \ SBIN_PROGS = bin/smbd@EXEEXT@ bin/nmbd@EXEEXT@ @SWAT_SBIN_TARGETS@ @EXTRA_SBIN_PROGS@ -ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@ +ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@ @CIFSUMOUNT_PROGS@ BIN_PROGS1 = bin/smbclient@EXEEXT@ bin/net@EXEEXT@ bin/smbspool@EXEEXT@ \ bin/testparm@EXEEXT@ bin/smbstatus@EXEEXT@ bin/smbget@EXEEXT@ @@ -2921,7 +2921,7 @@ bin/dbwrap_tool@EXEEXT@: $(DBWRAP_TOOL_OBJ) @LIBTALLOC_TARGET@ @LIBTDB_TARGET@ install-dbwrap_tool:: bin/dbwrap_tool@EXEEXT@ @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $< -install:: installservers installbin @INSTALL_CIFSMOUNT@ @INSTALL_CIFSUPCALL@ installman \ +install:: installservers installbin @INSTALL_CIFSMOUNT@ @INSTALL_CIFSUMOUNT@ @INSTALL_CIFSUPCALL@ installman \ installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ \ @INSTALL_PAM_MODULES@ installlibs installmo @@ -2951,6 +2951,10 @@ installcifsmount:: @CIFSMOUNT_PROGS@ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(ROOTSBINDIR) @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSMOUNT_PROGS@ +installcifsumount:: @CIFSUMOUNT_PROGS@ + @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(ROOTSBINDIR) + @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSUMOUNT_PROGS@ + installcifsupcall:: @CIFSUPCALL_PROGS@ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(SBINDIR) @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) @CIFSUPCALL_PROGS@ @@ -3030,7 +3034,7 @@ showlayout:: @echo " codepagedir: $(CODEPAGEDIR)" -uninstall:: uninstallmo uninstallman uninstallservers uninstallbin @UNINSTALL_CIFSMOUNT@ @UNINSTALL_CIFSUPCALL@ uninstallscripts uninstalldat uninstallswat uninstallmodules uninstalllibs @UNINSTALL_PAM_MODULES@ +uninstall:: uninstallmo uninstallman uninstallservers uninstallbin @UNINSTALL_CIFSMOUNT@ @UNINSTALL_CIFSUMOUNT@ @UNINSTALL_CIFSUPCALL@ uninstallscripts uninstalldat uninstallswat uninstallmodules uninstalllibs @UNINSTALL_PAM_MODULES@ uninstallmo:: @$(SHELL) $(srcdir)/script/uninstallmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir) @@ -3047,6 +3051,9 @@ uninstallbin:: uninstallcifsmount:: @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSMOUNT_PROGS@ +uninstallcifsumount:: + @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSUMOUNT_PROGS@ + uninstallcifsupcall:: @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSUPCALL_PROGS@ diff --git a/source3/configure.in b/source3/configure.in index 82a83a3..7f83bb3 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -96,6 +96,9 @@ AC_SUBST(EXTRA_BIN_PROGS) AC_SUBST(CIFSMOUNT_PROGS) AC_SUBST(INSTALL_CIFSMOUNT) AC_SUBST(UNINSTALL_CIFSMOUNT) +AC_SUBST(CIFSUMOUNT_PROGS) +AC_SUBST(INSTALL_CIFSUMOUNT) +AC_SUBST(UNINSTALL_CIFSUMOUNT) AC_SUBST(CIFSUPCALL_PROGS) AC_SUBST(INSTALL_CIFSUPCALL) AC_SUBST(UNINSTALL_CIFSUPCALL) @@ -3985,9 +3988,9 @@ AC_ARG_WITH(automount, CIFSMOUNT_PROGS="" INSTALL_CIFSMOUNT="" UNINSTALL_CIFSMOUNT="" -AC_MSG_CHECKING(whether to build mount.cifs and umount.cifs) +AC_MSG_CHECKING(whether to build mount.cifs) AC_ARG_WITH(cifsmount, -[AS_HELP_STRING([--with-cifsmount], [Include mount.cifs and umount.cifs (Linux only) support (default=yes)])], +[AS_HELP_STRING([--with-cifsmount], [Include mount.cifs (Linux only) support (default=yes)])], [ case "$withval" in no) AC_MSG_RESULT(no) @@ -3996,8 +3999,8 @@ AC_ARG_WITH(cifsmount, case "$host_os" in *linux*) AC_MSG_RESULT(yes) - AC_DEFINE(WITH_CIFSMOUNT,1,[Whether to build mount.cifs and umount.cifs]) - CIFSMOUNT_PROGS="bin/mount.cifs bin/umount.cifs" + AC_DEFINE(WITH_CIFSMOUNT,1,[Whether to build mount.cifs]) + CIFSMOUNT_PROGS="bin/mount.cifs" INSTALL_CIFSMOUNT="installcifsmount" UNINSTALL_CIFSMOUNT="uninstallcifsmount" ;; @@ -4010,8 +4013,8 @@ AC_ARG_WITH(cifsmount, [ case "$host_os" in *linux*) AC_MSG_RESULT(yes) - AC_DEFINE(WITH_CIFSMOUNT,1,[Whether to build mount.cifs and umount.cifs]) - CIFSMOUNT_PROGS="bin/mount.cifs bin/umount.cifs" + AC_DEFINE(WITH_CIFSMOUNT,1,[Whether to build mount.cifs]) + CIFSMOUNT_PROGS="bin/mount.cifs" INSTALL_CIFSMOUNT="installcifsmount" UNINSTALL_CIFSMOUNT="uninstallcifsmount" ;; @@ -4021,6 +4024,34 @@ AC_ARG_WITH(cifsmount, esac ] ) +CIFSUMOUNT_PROGS="" +INSTALL_CIFSUMOUNT="" +UNINSTALL_CIFSUMOUNT="" +AC_MSG_CHECKING(whether to build umount.cifs) +AC_ARG_WITH(cifsumount, +[AS_HELP_STRING([--with-cifsumount], [Include umount.cifs (Linux only) support (default=no)])], +[ case "$withval" in + yes) + case "$host_os" in + *linux*) + AC_MSG_RESULT(yes) + AC_DEFINE(WITH_CIFSUMOUNT,1,[Whether to build umount.cifs]) + CIFSUMOUNT_PROGS="bin/umount.cifs" + INSTALL_CIFSUMOUNT="installcifsumount" + UNINSTALL_CIFSUMOUNT="uninstallcifsumount" + ;; + *) + AC_MSG_ERROR(not on a linux system!) + ;; + esac + ;; + *) + AC_MSG_RESULT(no) + ;; + esac ], + AC_MSG_RESULT(no) +) + ################################################# # check for cifs.upcall support AC_CHECK_HEADERS([keyutils.h], [HAVE_KEYUTILS_H=1], [HAVE_KEYUTILS_H=0]) -- 1.6.0.6 _______________________________________________ linux-cifs-client mailing list linux-cifs-client@... https://lists.samba.org/mailman/listinfo/linux-cifs-client |
|
|
Re: [PATCH] umount.cifs: don't build it by defaultOn Thu, 2009-06-25 at 08:22 -0400, Jeff Layton wrote:
> Now that the sanity checks for mount.cifs default to matching the > behavior of /bin/mount, then there is virtually no need for umount.cifs. > The only exception is when someone enables the loose setuid behavior in > mount.cifs. > > If an unprivileged user mounts a share that isn't in /etc/fstab, then > /bin/mount won't allow that user to unmount it. In that situation, > umount.cifs will be necessary to allow unmounting the share. Pushed to samba master branch. -- Jeff Layton <jlayton@...> _______________________________________________ linux-cifs-client mailing list linux-cifs-client@... https://lists.samba.org/mailman/listinfo/linux-cifs-client |
| Free embeddable forum powered by Nabble | Forum Help |