diff options
| author | Alejandro Pulver <alepulver@FreeBSD.org> | 2008-02-16 18:05:38 +0000 |
|---|---|---|
| committer | Alejandro Pulver <alepulver@FreeBSD.org> | 2008-02-16 18:05:38 +0000 |
| commit | 6b3f87a53a44256b4798be8583f2e7e044b3b083 (patch) | |
| tree | cf8972f085c92501fea6358bcbeed45845b3493a /sysutils/fusefs-kmod/files/patch-fuse_vfsops.c | |
| parent | This plugin provides many convenient functions (diff) | |
From [1]:
- Update to version 0.3.9-pre1.20080208 (agreed with author).
- Download directly from the Mercurial reposirory (as tarball), to ease
maintainence.
- Remove all local patches as they were integrated.
- Convert setup.sh into setup.sh.in, and use SUB_FILES instead of manual
replacement.
- Use kldload instead of rc.d script in setup.sh.in because the latter gives
an error.
- Remove "sleep 1" from rc.d script as now the FUSE daemon makes umount wait
until disks are synced (synchronous unmount).
- Update pkg-message.
From [2]:
- Pass SRC_BASE to the actual build (previously was only used by the port to
detect if the source was installed, but not passed to the internal Makefile).
PR: ports/120420 [1], ports/118112 [2]
Submitted by: alepulver [1], Yuri Pankov <yuri.pankov@gmail.com> [2]
Approved by: maintainer (timeout) [1], maintainer [2]
Diffstat (limited to 'sysutils/fusefs-kmod/files/patch-fuse_vfsops.c')
| -rw-r--r-- | sysutils/fusefs-kmod/files/patch-fuse_vfsops.c | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/sysutils/fusefs-kmod/files/patch-fuse_vfsops.c b/sysutils/fusefs-kmod/files/patch-fuse_vfsops.c deleted file mode 100644 index 194a910effbc..000000000000 --- a/sysutils/fusefs-kmod/files/patch-fuse_vfsops.c +++ /dev/null @@ -1,108 +0,0 @@ ---- fuse_module/fuse_vfsops.c.orig 2007-06-19 16:35:22.000000000 +0400 -+++ fuse_module/fuse_vfsops.c 2008-01-20 20:39:38.000000000 +0300 -@@ -23,6 +23,18 @@ - #include "fuse_session.h" - #include "fuse_vnode.h" - -+#if USE_PRIVILEGE_API -+#include <sys/priv.h> -+#endif -+ -+/* This will do for privilege types for now */ -+#ifndef PRIV_VFS_FUSE_ALLOWOTHER -+#define PRIV_VFS_FUSE_ALLOWOTHER PRIV_VFS_MOUNT_NONUSER -+#endif -+#ifndef PRIV_VFS_FUSE_MOUNT_NONUSER -+#define PRIV_VFS_FUSE_MOUNT_NONUSER PRIV_VFS_MOUNT_NONUSER -+#endif -+ - static int fuse_init_handler(struct fuse_ticket *tick, struct uio *uio); - static void fuse_send_init(struct fuse_data *data, struct thread *td); - static vfs_hash_cmp_t fuse_vnode_bgdrop_cmp; -@@ -207,10 +219,8 @@ - KASSERT(fuse_useco >= 0, - ("negative fuse usecount despite Giant")); - -- if (mp->mnt_flag & MNT_UPDATE) { -- uprintf("fuse: updating mounts is not supported\n"); -+ if (mp->mnt_flag & MNT_UPDATE) - return (EOPNOTSUPP); -- } - - mp->mnt_flag |= MNT_SYNCHRONOUS; - /* Get the new options passed to mount */ -@@ -293,10 +303,8 @@ - - if (fdata_kick_get(data)) - err = ENOTCONN; -- if (mntopts & FSESS_DAEMON_CAN_SPY && suser(td)) { -- uprintf("only root can use \"allow_other\"\n"); -- err = EPERM; -- } -+ if (mntopts & FSESS_DAEMON_CAN_SPY) -+ err = priv_check(td, PRIV_VFS_FUSE_ALLOWOTHER); - - slock = &data->mhierlock; - /* Note that sx_try_xlock returns 0 on _failure_ */ -@@ -334,10 +342,9 @@ - */ - err = EINVAL; - } else { -- if (suser(td) && -- td->td_ucred->cr_uid != data->daemoncred->cr_uid) -- /* we are not allowed to do the first mount */ -- err = EPERM; -+ if (td->td_ucred->cr_uid != data->daemoncred->cr_uid) -+ /* are we allowed to do the first mount? */ -+ err = priv_check(td, PRIV_VFS_FUSE_MOUNT_NONUSER); - } - - if (err) { -@@ -370,7 +377,11 @@ - - err = getnewvnode("fuse", mp, &fuse_vnops, &rvp); - if (! err) { -+#if __FreeBSD_version > 800009 -+ err = vn_lock(rvp, LK_EXCLUSIVE | LK_RETRY); -+#else - err = vn_lock(rvp, LK_EXCLUSIVE | LK_RETRY, td); -+#endif - #if NEW_VNODES_ADJUSTED_MANUALLY - if (err) - printf("fuse4bsd: leaking vnode %p\n", rvp); -@@ -398,7 +409,11 @@ - free(fvdat, M_FUSEVN); - goto out; - } else -+#if __FreeBSD_version > 800009 -+ VOP_UNLOCK(rvp, 0); -+#else - VOP_UNLOCK(rvp, 0, td); -+#endif - - data->mp = mp; - data->mpri = FM_PRIMARY; -@@ -582,7 +597,11 @@ - - vp = data->rvp; - vref(vp); -+#if __FreeBSD_version > 800009 -+ vn_lock(vp, flags | LK_RETRY); -+#else - vn_lock(vp, flags | LK_RETRY, td); -+#endif - if (vp->v_type == VNON) { - struct vattr va; - -@@ -808,7 +827,11 @@ - } - - #if NEW_VNODES_ADJUSTED_MANUALLY -+#if __FreeBSD_version > 800009 -+ err = vn_lock(*vpp, myflags); -+#else - err = vn_lock(*vpp, myflags, td); -+#endif - if (err) - printf("fuse4bsd: leaking vnode %p\n", *vpp); - else |
