Skip to content

Commit

Permalink
Fix mount helper
Browse files Browse the repository at this point in the history
Several issues related to strange mount/umount behavior were reported
and this commit should address most of them.  The original idea was
to put in place a zfs mount helper (mount.zfs).  This helper is used
to enforce 'legacy' mount behavior, and perform any extra mount argument
processing (selinux, zfsutil, etc).  This helper wasn't ready for the
0.6.0-rc1 release but with this change it's functional but needs to
extensively tested.

This change addresses the following open issues.
Closes #101
Closes #107
Closes #113
Closes #115
Closes #119
  • Loading branch information
behlendorf committed Mar 7, 2011
1 parent 15805c7 commit 6adf458
Show file tree
Hide file tree
Showing 11 changed files with 1,224 additions and 448 deletions.
3 changes: 2 additions & 1 deletion cmd/Makefile.am
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
SUBDIRS = zfs zpool zpool_id zpool_layout zdb zinject ztest zpios zvol_id
SUBDIRS = zfs zpool zdb zinject ztest zpios mount_zfs
SUBDIRS += zpool_layout zvol_id zpool_id
3 changes: 2 additions & 1 deletion cmd/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = zfs zpool zpool_id zpool_layout zdb zinject ztest zpios zvol_id
SUBDIRS = zfs zpool zdb zinject ztest zpios mount_zfs zpool_layout \
zvol_id zpool_id
all: all-recursive

.SUFFIXES:
Expand Down
28 changes: 28 additions & 0 deletions cmd/mount_zfs/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
include $(top_srcdir)/config/Rules.am

DEFAULT_INCLUDES += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libspl/include

#
# Ignore the prefix for the mount helper. It must be installed in /sbin/
# because this path is hardcoded in the mount(8) for security reasons.
#
sbindir=/sbin
sbin_PROGRAMS = mount.zfs

mount_zfs_SOURCES = \
$(top_srcdir)/cmd/mount_zfs/mount_zfs.c

mount_zfs_LDADD = \
$(top_builddir)/lib/libspl/libspl.la \
$(top_builddir)/lib/libavl/libavl.la \
$(top_builddir)/lib/libefi/libefi.la \
$(top_builddir)/lib/libnvpair/libnvpair.la \
$(top_builddir)/lib/libunicode/libunicode.la \
$(top_builddir)/lib/libuutil/libuutil.la \
$(top_builddir)/lib/libzpool/libzpool.la \
$(top_builddir)/lib/libzfs/libzfs.la

mount_zfs_LDFLAGS = \
-pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID)
Loading

0 comments on commit 6adf458

Please sign in to comment.