qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 5/5] 9p: forbid empty extension string


From: Greg Kurz
Subject: Re: [Qemu-devel] [PATCH v2 5/5] 9p: forbid empty extension string
Date: Tue, 30 Aug 2016 18:46:52 +0200

On Mon, 29 Aug 2016 14:35:07 -0500
Eric Blake <address@hidden> wrote:

> On 08/28/2016 12:34 PM, Greg Kurz wrote:
> 
> >>
> >> For the sake of simplicity, I'd rather have the target names to follow the
> >> same rules as other file names, and return ENOENT directly (the link you
> >> provide states it is a valid option).
> >>
> >> Peter,
> >>
> >> Since you suggested to do explicit error checking on empty file names, do
> >> you have an opinion on the case of symlinks with an empty target ?  
> 
> Failing with ENOENT for both "" and for "a/b" seems reasonable to me (a
> directory entry named "a/b" can never exist, just as "" cannot exist).
> 

But of course the target may still be a path with slashes :)

And since we don't care for / until the link is dereferenced, I'm not so sure
there is any checking to be done on the target name actually.

--
Greg

Attachment: pgpL7VTQeIGFj.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]