lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHQdGtT0WhB38XYToS8ceiepW2v_stKZcVYsktBG26iBS4KHAg@mail.gmail.com>
Date:	Mon, 25 Aug 2014 17:17:30 -0400
From:	Trond Myklebust <trond.myklebust@...marydata.com>
To:	Ben Hutchings <ben@...adent.org.uk>
Cc:	Xiong Zhou <xzhou@...hat.com>,
	Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
	Linux Kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] nfs: remove redundant slash from nfs_path

On Mon, Aug 25, 2014 at 5:07 PM, Ben Hutchings <ben@...adent.org.uk> wrote:
> On Mon, 2014-08-25 at 01:51 -0400, Xiong Zhou wrote:
>> When export root dir(/) via nfs, and mount a particular dir under root, eg
>> /nfsexport, there will be defect double slash output in /proc/mounts, like
>> localhost://nfsexport. While this patch change it to localhost:/nfsexport.
>>
>> Signed-off-by: Xiong Zhou <xzhou@...hat.com>
>> ---
>>  fs/nfs/namespace.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
>> index b5a0afc..24f954e 100644
>> --- a/fs/nfs/namespace.c
>> +++ b/fs/nfs/namespace.c
>> @@ -98,7 +98,7 @@ rename_retry:
>>               return end;
>>       }
>>       namelen = strlen(base);
>> -     if (flags & NFS_PATH_CANONICAL) {
>> +     if ((flags & NFS_PATH_CANONICAL) || *end == '/') {
>>               /* Strip off excess slashes in base string */
>>               while (namelen > 0 && base[namelen - 1] == '/')
>>                       namelen--;
>
> I think this makes sense, though I'm not sure I completely understand
> this function. :-/
>

It breaks the function's guarantee concerning NFS_PATH_CANONICAL; that
"if unset, the original name is returned verbatim".

-- 
Trond Myklebust

Linux NFS client maintainer, PrimaryData

trond.myklebust@...marydata.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ