* [NFS] bug in nfs-utils support/misc/tcpwrapper.c
@ 2008-05-02 23:49 Sten Spans
[not found] ` <alpine.DEB.0.99999.0805030130590.9075-bOEg3dqIyRvlQVwb/tpZ4uvFKoSm8Hlx@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Sten Spans @ 2008-05-02 23:49 UTC (permalink / raw)
To: nfs
I've been trying to get /etc/netgroup support going on
a machine serving nfs mounts to hosts located in various
.nl netblocks. Managing hosts this way greatly simplifies
hosts.allow and exports management, easily worth any slowdowns
during mounting.
I did notice a small problem in the tcpwrapper support:
(resulting in errors from mountd)
127 /* Check the official name first. */
128 if (hosts_ctl(daemon, "", hp->h_name, ""))
129 return 1;
this supplies the resolved hostname in the address field of hosts_ctl
which doesn't work. Changing it to:
if (hosts_ctl(daemon, hp->h_name, "", ""))
does work as expected. The h_aliases check on line 133 probably needs
the same change to work as expected.
--
Sten Spans
"There is a crack in everything, that's how the light gets in."
Leonard Cohen - Anthem
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that nfs@lists.sourceforge.net is being discontinued.
Please subscribe to linux-nfs@vger.kernel.org instead.
http://vger.kernel.org/vger-lists.html#linux-nfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [NFS] bug in nfs-utils support/misc/tcpwrapper.c
[not found] ` <alpine.DEB.0.99999.0805030130590.9075-bOEg3dqIyRvlQVwb/tpZ4uvFKoSm8Hlx@public.gmane.org>
@ 2008-05-05 15:11 ` J. Bruce Fields
2008-05-05 15:26 ` Sten Spans
0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2008-05-05 15:11 UTC (permalink / raw)
To: Sten Spans; +Cc: nfs, steved
On Sat, May 03, 2008 at 01:49:20AM +0200, Sten Spans wrote:
>
> I've been trying to get /etc/netgroup support going on
> a machine serving nfs mounts to hosts located in various
> .nl netblocks. Managing hosts this way greatly simplifies
> hosts.allow and exports management, easily worth any slowdowns
> during mounting.
>
> I did notice a small problem in the tcpwrapper support:
> (resulting in errors from mountd)
>
> 127 /* Check the official name first. */
> 128 if (hosts_ctl(daemon, "", hp->h_name, ""))
> 129 return 1;
>
> this supplies the resolved hostname in the address field of hosts_ctl
> which doesn't work. Changing it to:
>
> if (hosts_ctl(daemon, hp->h_name, "", ""))
>
> does work as expected. The h_aliases check on line 133 probably needs
> the same change to work as expected.
Yep; looks like a clear bugfix. (If you have a moment to generate a
patch (with diff -u) showing both changes, that would probably help
Steve.)--b.
>
> --
> Sten Spans
>
> "There is a crack in everything, that's how the light gets in."
> Leonard Cohen - Anthem
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> NFS maillist - NFS@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nfs
> _______________________________________________
> Please note that nfs@lists.sourceforge.net is being discontinued.
> Please subscribe to linux-nfs@vger.kernel.org instead.
> http://vger.kernel.org/vger-lists.html#linux-nfs
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that nfs@lists.sourceforge.net is being discontinued.
Please subscribe to linux-nfs@vger.kernel.org instead.
http://vger.kernel.org/vger-lists.html#linux-nfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [NFS] bug in nfs-utils support/misc/tcpwrapper.c
2008-05-05 15:11 ` J. Bruce Fields
@ 2008-05-05 15:26 ` Sten Spans
0 siblings, 0 replies; 3+ messages in thread
From: Sten Spans @ 2008-05-05 15:26 UTC (permalink / raw)
To: J. Bruce Fields; +Cc: nfs, steved
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1655 bytes --]
On Mon, 5 May 2008, J. Bruce Fields wrote:
> On Sat, May 03, 2008 at 01:49:20AM +0200, Sten Spans wrote:
>>
>> I've been trying to get /etc/netgroup support going on
>> a machine serving nfs mounts to hosts located in various
>> .nl netblocks. Managing hosts this way greatly simplifies
>> hosts.allow and exports management, easily worth any slowdowns
>> during mounting.
>>
>> I did notice a small problem in the tcpwrapper support:
>> (resulting in errors from mountd)
>>
>> 127 /* Check the official name first. */
>> 128 if (hosts_ctl(daemon, "", hp->h_name, ""))
>> 129 return 1;
>>
>> this supplies the resolved hostname in the address field of hosts_ctl
>> which doesn't work. Changing it to:
>>
>> if (hosts_ctl(daemon, hp->h_name, "", ""))
>>
>> does work as expected. The h_aliases check on line 133 probably needs
>> the same change to work as expected.
>
> Yep; looks like a clear bugfix. (If you have a moment to generate a
> patch (with diff -u) showing both changes, that would probably help
Here ya go (attached as well)
--- support/misc/tcpwrapper.c.orig 2008-05-05 17:22:41.887757664 +0200
+++ support/misc/tcpwrapper.c 2008-05-05 17:24:08.857111820 +0200
@@ -125,12 +125,12 @@
return 0;
/* Check the official name first. */
- if (hosts_ctl(daemon, "", hp->h_name, ""))
+ if (hosts_ctl(daemon, hp->h_name, "", ""))
return 1;
/* Check aliases. */
for (sp = hp->h_aliases; *sp ; sp++) {
- if (hosts_ctl(daemon, "", *sp, ""))
+ if (hosts_ctl(daemon, *sp, "", ""))
return 1;
}
--
Sten Spans
"There is a crack in everything, that's how the light gets in."
Leonard Cohen - Anthem
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: TEXT/x-diff; name=nfs-utils.diff, Size: 510 bytes --]
--- support/misc/tcpwrapper.c.orig 2008-05-05 17:22:41.887757664 +0200
+++ support/misc/tcpwrapper.c 2008-05-05 17:24:08.857111820 +0200
@@ -125,12 +125,12 @@
return 0;
/* Check the official name first. */
- if (hosts_ctl(daemon, "", hp->h_name, ""))
+ if (hosts_ctl(daemon, hp->h_name, "", ""))
return 1;
/* Check aliases. */
for (sp = hp->h_aliases; *sp ; sp++) {
- if (hosts_ctl(daemon, "", *sp, ""))
+ if (hosts_ctl(daemon, *sp, "", ""))
return 1;
}
[-- Attachment #3: Type: text/plain, Size: 320 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
[-- Attachment #4: Type: text/plain, Size: 362 bytes --]
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that nfs@lists.sourceforge.net is being discontinued.
Please subscribe to linux-nfs@vger.kernel.org instead.
http://vger.kernel.org/vger-lists.html#linux-nfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-05 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-02 23:49 [NFS] bug in nfs-utils support/misc/tcpwrapper.c Sten Spans
[not found] ` <alpine.DEB.0.99999.0805030130590.9075-bOEg3dqIyRvlQVwb/tpZ4uvFKoSm8Hlx@public.gmane.org>
2008-05-05 15:11 ` J. Bruce Fields
2008-05-05 15:26 ` Sten Spans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox