Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Nov 2017 21:48:55 +0000
From:      Conrad Meyer <cem@freebsd.org>
To:        Oliver Pinter <oliver.pinter@hardenedbsd.org>
Cc:        Conrad Meyer <cem@freebsd.org>,  "src-committers@freebsd.org" <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r325957 - in head: sys/kern tests/sys/vfs
Message-ID:  <CAG6CVpUFw-67jsQM5=c1_eN6mngye7D9gzLWZb0zNqb50iaMQA@mail.gmail.com>
In-Reply-To: <CAPQ4ffuwEgyvxxXdt0dfMpnwi1a7JqysyuEHRbf4N4%2BUMvqqvg@mail.gmail.com>
References:  <201711171925.vAHJPeuN074946@repo.freebsd.org> <CAPQ4ffuwEgyvxxXdt0dfMpnwi1a7JqysyuEHRbf4N4%2BUMvqqvg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Yes.


On Fri, Nov 17, 2017 at 12:30 PM Oliver Pinter <
oliver.pinter@hardenedbsd.org> wrote:

>
>
> On Friday, November 17, 2017, Conrad Meyer <cem@freebsd.org> wrote:
>
>> Author: cem
>> Date: Fri Nov 17 19:25:39 2017
>> New Revision: 325957
>> URL: https://svnweb.freebsd.org/changeset/base/325957
>>
>> Log:
>>   vfs_lookup: Allow PATH_MAX-1 symlinks
>>
>>   Previously, symlinks in FreeBSD were artificially limited to PATH_MAX-=
2.
>>
>>   Add a short test case to verify the change.
>>
>>   Submitted by: Gaurav Gangalwar <ggangalwar AT isilon.com>
>>   Reviewed by:  kib
>>   Sponsored by: Dell EMC Isilon
>>   Differential Revision:        https://reviews.freebsd.org/D12589
>>
>> Added:
>>   head/tests/sys/vfs/lookup_test.sh   (contents, props changed)
>> Modified:
>>   head/sys/kern/vfs_lookup.c
>>   head/tests/sys/vfs/Makefile
>>
>> Modified: head/sys/kern/vfs_lookup.c
>>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- head/sys/kern/vfs_lookup.c  Fri Nov 17 19:10:10 2017        (r325956=
)
>> +++ head/sys/kern/vfs_lookup.c  Fri Nov 17 19:25:39 2017        (r325957=
)
>> @@ -499,7 +499,7 @@ namei(struct nameidata *ndp)
>>                         error =3D ENOENT;
>>                         break;
>>                 }
>> -               if (linklen + ndp->ni_pathlen >=3D MAXPATHLEN) {
>> +               if (linklen + ndp->ni_pathlen > MAXPATHLEN) {
>>                         if (ndp->ni_pathlen > 1)
>>                                 uma_zfree(namei_zone, cp);
>>                         error =3D ENAMETOOLONG;
>>
>> Modified: head/tests/sys/vfs/Makefile
>>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- head/tests/sys/vfs/Makefile Fri Nov 17 19:10:10 2017        (r325956=
)
>> +++ head/tests/sys/vfs/Makefile Fri Nov 17 19:25:39 2017        (r325957=
)
>> @@ -7,6 +7,8 @@ TESTSDIR=3D               ${TESTSBASE}/sys/vfs
>>  ATF_TESTS_C+=3D  lookup_cap_dotdot
>>  CFLAGS.lookup_cap_dotdot.c+=3D   -I${SRCTOP}/tests
>>
>> +#ATF_TESTS_SH+=3D        lookup_test
>
>
> This commented out line is intended?
>
>
>> +
>>  TAP_TESTS_SH+=3D trailing_slash
>>
>>  .include <bsd.test.mk>
>>
>> Added: head/tests/sys/vfs/lookup_test.sh
>>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
>> +++ head/tests/sys/vfs/lookup_test.sh   Fri Nov 17 19:25:39 2017
>> (r325957)
>> @@ -0,0 +1,17 @@
>> +# $FreeBSD$
>> +
>> +long_symlink_head()
>> +{
>> +       atf_set "descr" "Test for 1023 (PATH_MAX-1) symlink support"
>> +}
>> +long_symlink_body()
>> +{
>> +       atf_check -s exit:0 ln -s
>> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
>>  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa sym_long
>> +       # was: "stat: sym_long: stat: File name too long"; exit 1
>> +       atf_check -s exit:0 -o ignore stat -L sym_long
>> +}
>> +
>> +atf_init_test_cases()
>> +{
>> +       atf_add_test_case long_symlink
>> +}
>>
> _______________________________________________
>> svn-src-head@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/svn-src-head
>> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"
>>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpUFw-67jsQM5=c1_eN6mngye7D9gzLWZb0zNqb50iaMQA>