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
This commit is contained in:
parent
3885d4091d
commit
019dca0199
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/fuse2/; revision=345580
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user