Date: Sat, 11 Feb 2023 08:28:34 -0700 From: Alan Somers <asomers@freebsd.org> To: Fedor Uporov <fsu@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: cbac1f346495 - main - Fix pjfstest issue tests/rename/09.t Message-ID: <CAOtMX2iUDxD6fw3FAJFC1T_7KuH9TMcw3WWkWfSJ5idpx%2BP6vw@mail.gmail.com> In-Reply-To: <202302110704.31B74Bvm047614@gitrepo.freebsd.org> References: <202302110704.31B74Bvm047614@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 11, 2023 at 12:04 AM Fedor Uporov <fsu@freebsd.org> wrote: > > The branch main has been updated by fsu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=cbac1f3464956185cf95955344b6009e2cc3ae40 > > commit cbac1f3464956185cf95955344b6009e2cc3ae40 > Author: Fedor Uporov <fsu@FreeBSD.org> > AuthorDate: 2023-02-02 10:13:02 +0000 > Commit: Fedor Uporov <fsu@FreeBSD.org> > CommitDate: 2023-02-11 07:01:16 +0000 > > Fix pjfstest issue tests/rename/09.t > > Fix rename when renamed directory not owned by user, > but when user owns the sticky parent directory. > > Reviewed by: kib > MFC after: 2 week > Differential revision: https://reviews.freebsd.org/D38245 > --- > sys/fs/tmpfs/tmpfs_vnops.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c > index 55f0beebc848..28de8c989487 100644 > --- a/sys/fs/tmpfs/tmpfs_vnops.c > +++ b/sys/fs/tmpfs/tmpfs_vnops.c > @@ -1129,6 +1129,13 @@ tmpfs_rename(struct vop_rename_args *v) > if (de->td_node->tn_type == VDIR) { > struct tmpfs_node *n; > > + error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, curthread); > + if (error) { > + if (newname != NULL) > + free(newname, M_TMPFSNAME); > + goto out_locked; > + } > + > /* > * Ensure the target directory is not a child of the > * directory being moved. Otherwise, we'd end up Nice. I'm glad to see that people are getting good use out of pjdfstest.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2iUDxD6fw3FAJFC1T_7KuH9TMcw3WWkWfSJ5idpx%2BP6vw>