Date: Sun, 25 Oct 2020 15:11:31 +0100 From: Oliver Pinter <oliver.pntr@gmail.com> To: Edward Tomasz Napierala <trasz@freebsd.org> Cc: "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: r367038 - head/sbin/mount_nullfs Message-ID: <CAPjTQNEq2ukvkNoF6bsymTai52XV1tbu3TxW4rrN4n5hASMFqQ@mail.gmail.com> In-Reply-To: <202010251409.09PE91aS001781@repo.freebsd.org> References: <202010251409.09PE91aS001781@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday, October 25, 2020, Edward Tomasz Napierala <trasz@freebsd.org> wrote: > Author: trasz > Date: Sun Oct 25 14:09:00 2020 > New Revision: 367038 > URL: https://svnweb.freebsd.org/changeset/base/367038 > > Log: > Remove the check that prevents creating "loops" from mount_nullfs(8). > > The simple question is: why? > Reviewed by: kib > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D26921 > > Modified: > head/sbin/mount_nullfs/mount_nullfs.c > > Modified: head/sbin/mount_nullfs/mount_nullfs.c > ============================================================ > ================== > --- head/sbin/mount_nullfs/mount_nullfs.c Sun Oct 25 10:08:46 2020 > (r367037) > +++ head/sbin/mount_nullfs/mount_nullfs.c Sun Oct 25 14:09:00 2020 > (r367038) > @@ -59,7 +59,6 @@ static const char rcsid[] = > > #include "mntopts.h" > > -int subdir(const char *, const char *); > static void usage(void) __dead2; > > int > @@ -104,10 +103,6 @@ main(int argc, char *argv[]) > if (checkpath(argv[1], source) != 0) > err(EX_USAGE, "%s", source); > > - if (subdir(target, source) || subdir(source, target)) > - errx(EX_USAGE, "%s (%s) and %s are not distinct paths", > - argv[0], target, argv[1]); > - > build_iovec(&iov, &iovlen, "fstype", nullfs, (size_t)-1); > build_iovec(&iov, &iovlen, "fspath", source, (size_t)-1); > build_iovec(&iov, &iovlen, "target", target, (size_t)-1); > @@ -119,21 +114,6 @@ main(int argc, char *argv[]) > err(1, "%s", source); > } > exit(0); > -} > - > -int > -subdir(const char *p, const char *dir) > -{ > - int l; > - > - l = strlen(dir); > - if (l <= 1) > - return (1); > - > - if ((strncmp(p, dir, l) == 0) && (p[l] == '/' || p[l] == '\0')) > - return (1); > - > - return (0); > } > > static void > _______________________________________________ > 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?CAPjTQNEq2ukvkNoF6bsymTai52XV1tbu3TxW4rrN4n5hASMFqQ>