On Tue, 30 Aug 2016 13:06:31 -0500
Eric Blake <ebl...@redhat.com> wrote:

> On 08/30/2016 12:13 PM, Greg Kurz wrote:
> > According to the 9P spec http://man.cat-v.org/plan_9/5/open about the
> > create request:
> > 
> > The names . and .. are special; it is illegal to create files with these
> > names.
> > 
> > This patch causes the create and lcreate requests to fail with EINVAL if
> > the file name is either "." or "..".
> > 
> > Even if it isn't explicitly written in the spec, this patch extends the
> > checking to all requests that may cause a directory entry to be created:
> > 
> >     - mknod
> >     - rename
> >     - renameat
> >     - mkdir
> >     - link
> >     - symlink
> > 
> > The unlinkat request also gets patched for consistency (even if
> > rmdir("foo/..") is expected to fail according to POSIX.1-2001).
> > 
> > The various error values come from the linux manual pages.
> > 
> > Suggested-by: Peter Maydell <peter.mayd...@linaro.org>
> > Signed-off-by: Greg Kurz <gr...@kaod.org>
> > 
> > v3: - rename and renameat now return EISDIR instead of EBUSY  
> 
> The v3 comment could occur after the '---' separator.
> 

Yes of course. Sorry for the other patches as well :)

> > ---
> >  hw/9pfs/9p.c |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 51 insertions(+)  
> 
> Maintainer can touch that up, then add
> Reviewed-by: Eric Blake <ebl...@redhat.com>
> 

Attachment: pgpVP1uyqMhju.pgp
Description: OpenPGP digital signature

Reply via email to