On Mon, 15 Feb 2016, Vadim Zhukov wrote:
> > @@ -613,6 +614,17 @@ chk_path(char *name, uid_t st_uid, gid_t
> 
> Hello, Philip.
> 
> I think we should change "if" to "while" in this function, too...
> After that, okay zhuk@.
...
>       /*
>        * watch out for paths with nodes stored directly in / (e.g. /bozo)
>        */
> -     if (*spt == '/')
> +     while (*spt == '/')
>               ++spt;

Yeah, changing that suppresses a pointless lstat() of "//" when there are 
multiple leading slashes.  Nice catch.


Philip

Reply via email to