Date: Wed, 27 Mar 2019 16:19:03 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r345580 - projects/fuse2/sys/fs/fuse Message-ID: <201903271619.x2RGJ3cU070791@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Wed Mar 27 16:19:02 2019 New Revision: 345580 URL: https://svnweb.freebsd.org/changeset/base/345580 Log: fusefs: delete dead code in fuse_vnop_setattr The dead code in question was a broken and incomplete attempt to support the default_permissions mount option during VOP_SETATTR. There wasn't anything there worth saving; I'll have to rewrite it later. Reported by: Coverity Coverity CID: 1008668 Sponsored by: The FreeBSD Foundation Modified: projects/fuse2/sys/fs/fuse/fuse_internal.c projects/fuse2/sys/fs/fuse/fuse_internal.h projects/fuse2/sys/fs/fuse/fuse_vnops.c Modified: projects/fuse2/sys/fs/fuse/fuse_internal.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_internal.c Wed Mar 27 15:17:29 2019 (r345579) +++ projects/fuse2/sys/fs/fuse/fuse_internal.c Wed Mar 27 16:19:02 2019 (r345580) @@ -106,8 +106,7 @@ static int isbzero(void *buf, size_t len); #endif -/* access */ - +/* Synchronously send a FUSE_ACCESS operation */ int fuse_internal_access(struct vnode *vp, mode_t mode, Modified: projects/fuse2/sys/fs/fuse/fuse_internal.h ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_internal.h Wed Mar 27 15:17:29 2019 (r345579) +++ projects/fuse2/sys/fs/fuse/fuse_internal.h Wed Mar 27 16:19:02 2019 (r345580) @@ -156,7 +156,12 @@ fuse_iosize(struct vnode *vp) #define FACCESS_VA_VALID 0x01 #define FACCESS_DO_ACCESS 0x02 +/* + * Caller must be the directory's owner, or the superuser, or the sticky bit + * must not be set + */ #define FACCESS_STICKY 0x04 +/* Caller requires access to change file's owner */ #define FACCESS_CHOWN 0x08 #define FACCESS_NOCHECKSPY 0x10 #define FACCESS_SETGID 0x12 Modified: projects/fuse2/sys/fs/fuse/fuse_vnops.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_vnops.c Wed Mar 27 15:17:29 2019 (r345579) +++ projects/fuse2/sys/fs/fuse/fuse_vnops.c Wed Mar 27 16:19:02 2019 (r345580) @@ -1582,7 +1582,6 @@ fuse_vnop_setattr(struct vop_setattr_args *ap) struct vattr *vap = ap->a_vap; struct ucred *cred = ap->a_cred; struct thread *td = curthread; - struct fuse_dispatcher fdi; struct fuse_setattr_in *fsai; struct fuse_access_param facp; @@ -1658,19 +1657,7 @@ fuse_vnop_setattr(struct vop_setattr_args *ap) err = EROFS; goto out; } - if (fsai->valid & ~FATTR_SIZE) { - /*err = fuse_internal_access(vp, VADMIN, context, &facp); */ - /*XXX */ - err = 0; - } - facp.facc_flags &= ~FACCESS_XQUERIES; - if (err && !(fsai->valid & ~(FATTR_ATIME | FATTR_MTIME)) && - vap->va_vaflags & VA_UTIMES_NULL) { - err = fuse_internal_access(vp, VWRITE, &facp, td, cred); - } - if (err) - goto out; if ((err = fdisp_wait_answ(&fdi))) goto out; vtyp = IFTOVT(((struct fuse_attr_out *)fdi.answ)->attr.mode);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903271619.x2RGJ3cU070791>