Re: svn commit: r324054 - head/sys/kern
On 5 October 2017 at 18:41, Guy Yurwrote: > On 5 October 2017 at 18:10, Emmanuel Vadot wrote: >> On Thu, 5 Oct 2017 17:17:48 +0300 >> Guy Yur wrote: >> >>> On 27 September 2017 at 12:39, Emmanuel Vadot wrote: >>> > Author: manu >>> > Date: Wed Sep 27 09:39:16 2017 >>> > New Revision: 324054 >>> > URL: https://svnweb.freebsd.org/changeset/base/324054 >>> > >>> > Log: >>> > vfs_export: Simplify vfs_export_lookup >>> > >>> > If the filesystem is not exported directly return NULL. >>> > If no address is given and filesystem is exported using some default >>> > one return it directly, if it doesn't have a default one directly >>> > return NULL. >>> > >>> > Reviewed by: kib, bapt >>> > MFC after:1 week >>> > Sponsored by: Gandi.net >>> > Differential Revision:https://reviews.freebsd.org/D12505 >>> > >>> > Modified: >>> > head/sys/kern/vfs_export.c >>> > >>> > ... >>> > ___ >>> > 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-unsubscr...@freebsd.org" >>> >>> Hi, >>> >>> After this commit I can't mount from a host with the following exports: >>> >>> # cat /etc/exports >>> /export -ro >>> /export/obj -maproot=root >>> V4: /export >>> >>> # cat /etc/fstab >>> ... >>> /usr/obj /export/obj nullfs rw 0 0 >>> >>> # mount -t nfs -oro,nfsv4 vm4:/obj /mnt >>> mount_nfs: nmount: /mnt: Permission denied >>> >>> >>> Adding debug prints: >>> nam = 0xf80002c10700 >>> saddr->sa_family = 28 >>> rnh = 0 >>> >>> Before the commit, rnh == NULL would continue to MNT_DEFEXPORTED check. >>> >>> >>> Thanks, >>> Guy >> >> Hello, >> >> Could you see if >> https://people.freebsd.org/~manu/0001-vfs_export_lookup-Fix-r324054.patch >> fixes it ? >> >> I won't have time to test or commit today but will tomorow. >> Thanks, >> >> -- >> Emmanuel Vadot > > Hi, > > I am getting "Error 503 Backend fetch failed" trying to access the patch. > Do you have another location I can download it from? > > Thanks, > Guy Hi, Steven sent me the patch and it is working for me. Thanks, Guy ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r324054 - head/sys/kern
On 5 October 2017 at 18:10, Emmanuel Vadotwrote: > On Thu, 5 Oct 2017 17:17:48 +0300 > Guy Yur wrote: > >> On 27 September 2017 at 12:39, Emmanuel Vadot wrote: >> > Author: manu >> > Date: Wed Sep 27 09:39:16 2017 >> > New Revision: 324054 >> > URL: https://svnweb.freebsd.org/changeset/base/324054 >> > >> > Log: >> > vfs_export: Simplify vfs_export_lookup >> > >> > If the filesystem is not exported directly return NULL. >> > If no address is given and filesystem is exported using some default >> > one return it directly, if it doesn't have a default one directly >> > return NULL. >> > >> > Reviewed by: kib, bapt >> > MFC after:1 week >> > Sponsored by: Gandi.net >> > Differential Revision:https://reviews.freebsd.org/D12505 >> > >> > Modified: >> > head/sys/kern/vfs_export.c >> > >> > ... >> > ___ >> > 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-unsubscr...@freebsd.org" >> >> Hi, >> >> After this commit I can't mount from a host with the following exports: >> >> # cat /etc/exports >> /export -ro >> /export/obj -maproot=root >> V4: /export >> >> # cat /etc/fstab >> ... >> /usr/obj /export/obj nullfs rw 0 0 >> >> # mount -t nfs -oro,nfsv4 vm4:/obj /mnt >> mount_nfs: nmount: /mnt: Permission denied >> >> >> Adding debug prints: >> nam = 0xf80002c10700 >> saddr->sa_family = 28 >> rnh = 0 >> >> Before the commit, rnh == NULL would continue to MNT_DEFEXPORTED check. >> >> >> Thanks, >> Guy > > Hello, > > Could you see if > https://people.freebsd.org/~manu/0001-vfs_export_lookup-Fix-r324054.patch > fixes it ? > > I won't have time to test or commit today but will tomorow. > Thanks, > > -- > Emmanuel Vadot Hi, I am getting "Error 503 Backend fetch failed" trying to access the patch. Do you have another location I can download it from? Thanks, Guy ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r324054 - head/sys/kern
On Thu, 5 Oct 2017 17:17:48 +0300 Guy Yurwrote: > On 27 September 2017 at 12:39, Emmanuel Vadot wrote: > > Author: manu > > Date: Wed Sep 27 09:39:16 2017 > > New Revision: 324054 > > URL: https://svnweb.freebsd.org/changeset/base/324054 > > > > Log: > > vfs_export: Simplify vfs_export_lookup > > > > If the filesystem is not exported directly return NULL. > > If no address is given and filesystem is exported using some default > > one return it directly, if it doesn't have a default one directly > > return NULL. > > > > Reviewed by: kib, bapt > > MFC after:1 week > > Sponsored by: Gandi.net > > Differential Revision:https://reviews.freebsd.org/D12505 > > > > Modified: > > head/sys/kern/vfs_export.c > > > > ... > > ___ > > 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-unsubscr...@freebsd.org" > > Hi, > > After this commit I can't mount from a host with the following exports: > > # cat /etc/exports > /export -ro > /export/obj -maproot=root > V4: /export > > # cat /etc/fstab > ... > /usr/obj /export/obj nullfs rw 0 0 > > # mount -t nfs -oro,nfsv4 vm4:/obj /mnt > mount_nfs: nmount: /mnt: Permission denied > > > Adding debug prints: > nam = 0xf80002c10700 > saddr->sa_family = 28 > rnh = 0 > > Before the commit, rnh == NULL would continue to MNT_DEFEXPORTED check. > > > Thanks, > Guy Hello, Could you see if https://people.freebsd.org/~manu/0001-vfs_export_lookup-Fix-r324054.patch fixes it ? I won't have time to test or commit today but will tomorow. Thanks, -- Emmanuel Vadot ___ 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-unsubscr...@freebsd.org"
Re: svn commit: r324054 - head/sys/kern
On 27 September 2017 at 12:39, Emmanuel Vadotwrote: > Author: manu > Date: Wed Sep 27 09:39:16 2017 > New Revision: 324054 > URL: https://svnweb.freebsd.org/changeset/base/324054 > > Log: > vfs_export: Simplify vfs_export_lookup > > If the filesystem is not exported directly return NULL. > If no address is given and filesystem is exported using some default > one return it directly, if it doesn't have a default one directly > return NULL. > > Reviewed by: kib, bapt > MFC after:1 week > Sponsored by: Gandi.net > Differential Revision:https://reviews.freebsd.org/D12505 > > Modified: > head/sys/kern/vfs_export.c > > ... > ___ > 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-unsubscr...@freebsd.org" Hi, After this commit I can't mount from a host with the following exports: # cat /etc/exports /export -ro /export/obj -maproot=root V4: /export # cat /etc/fstab ... /usr/obj /export/obj nullfs rw 0 0 # mount -t nfs -oro,nfsv4 vm4:/obj /mnt mount_nfs: nmount: /mnt: Permission denied Adding debug prints: nam = 0xf80002c10700 saddr->sa_family = 28 rnh = 0 Before the commit, rnh == NULL would continue to MNT_DEFEXPORTED check. Thanks, Guy ___ 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-unsubscr...@freebsd.org"
svn commit: r324054 - head/sys/kern
Author: manu Date: Wed Sep 27 09:39:16 2017 New Revision: 324054 URL: https://svnweb.freebsd.org/changeset/base/324054 Log: vfs_export: Simplify vfs_export_lookup If the filesystem is not exported directly return NULL. If no address is given and filesystem is exported using some default one return it directly, if it doesn't have a default one directly return NULL. Reviewed by: kib, bapt MFC after:1 week Sponsored by: Gandi.net Differential Revision:https://reviews.freebsd.org/D12505 Modified: head/sys/kern/vfs_export.c Modified: head/sys/kern/vfs_export.c == --- head/sys/kern/vfs_export.c Wed Sep 27 06:33:55 2017(r324053) +++ head/sys/kern/vfs_export.c Wed Sep 27 09:39:16 2017(r324054) @@ -448,44 +448,46 @@ static struct netcred * vfs_export_lookup(struct mount *mp, struct sockaddr *nam) { struct netexport *nep; - struct netcred *np; + struct netcred *np = NULL; struct radix_node_head *rnh; struct sockaddr *saddr; nep = mp->mnt_export; if (nep == NULL) return (NULL); - np = NULL; - if (mp->mnt_flag & MNT_EXPORTED) { - /* -* Lookup in the export list first. -*/ - if (nam != NULL) { - saddr = nam; - rnh = NULL; - switch (saddr->sa_family) { - case AF_INET: - rnh = nep->ne4; - break; - case AF_INET6: - rnh = nep->ne6; - break; - } - if (rnh != NULL) { - RADIX_NODE_HEAD_RLOCK(rnh); - np = (struct netcred *) - (*rnh->rnh_matchaddr)(saddr, >rh); - RADIX_NODE_HEAD_RUNLOCK(rnh); - if (np && np->netc_rnodes->rn_flags & RNF_ROOT) - np = NULL; - } - } - /* -* If no address match, use the default if it exists. -*/ - if (np == NULL && mp->mnt_flag & MNT_DEFEXPORTED) - np = >ne_defexported; + if ((mp->mnt_flag & MNT_EXPORTED) == 0) + return (NULL); + + /* +* If no address is provided, use the default if it exists. +*/ + if (nam == NULL) { + if ((mp->mnt_flag & MNT_DEFEXPORTED) != 0) + return (>ne_defexported); + return (NULL); } + + /* +* Lookup in the export list +*/ + saddr = nam; + rnh = NULL; + switch (saddr->sa_family) { + case AF_INET: + rnh = nep->ne4; + break; + case AF_INET6: + rnh = nep->ne6; + break; + } + if (rnh != NULL) { + RADIX_NODE_HEAD_RLOCK(rnh); + np = (struct netcred *) (*rnh->rnh_matchaddr)(saddr, >rh); + RADIX_NODE_HEAD_RUNLOCK(rnh); + if (np != NULL && (np->netc_rnodes->rn_flags & RNF_ROOT) != 0) + return (NULL); + } + return (np); } ___ 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-unsubscr...@freebsd.org"