Olaf Kirch wrote:
>
> Some portmaps may actually allow calls to the NFS NULL procedure, but
> many don't.
The ones based on modern ONC code, like Solaris and IRIX, explicitly
allow NULL calls before doing their fancy checks based on program numbers.
I'd be interested to hear of actual counterexamples.
> I wrote a tool for enumerating NFS servers a long time back, and found
> the only way to go about it is to enumerate all hosts first, then do a
> pmap_getport(100005), and then call each mountd i turn.
Sure, a two stage approach will work: broadcast RPC to find hosts
running portmappers, then try showmount -e on each.
Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
On Thu, Apr 08, 2004 at 05:07:25PM +1000, Greg Banks wrote:
> The ones based on modern ONC code, like Solaris and IRIX, explicitly
> allow NULL calls before doing their fancy checks based on program numbers.
> I'd be interested to hear of actual counterexamples.
Wietse Venema's portmapper which I think all Linux distributors
use has this:
if (prog == PMAPPROG || prog == NFSPROG || prog == YPXPROG ||
(prog == MOUNTPROG && aproc == MOUNTPROC_MNT) ||
(prog == YPPROG && aproc != YPPROC_DOMAIN_NONACK)) {
log_no_forward(addr, proc, prog);
return (FALSE);
}
so you're right, calling the MOUNT NULL procedure via PMAP_CALL
should work. You could even broadcast a DUMP call...
Calling NFS NULL will not work, though.
Olaf
--
Olaf Kirch | The Hardware Gods hate me.
[email protected] |
---------------+
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
On Thu, Apr 08, 2004 at 10:55:57AM +0200, Olaf Kirch wrote:
> [...]calling the MOUNT NULL procedure via PMAP_CALL
> should work.
Righto.
> You could even broadcast a DUMP call...
Except that the reply might blow the libc 8800 byte limit for
UDP RPC replies (I've seen this happen).
> Calling NFS NULL will not work, though.
Indeed.
So it seems an approach that would work is to a broadcast
RPC call to MOUNT NULL followed by showmount -e to each
of the repliers. Something like...
/usr/sbin/rpcinfo -b mountd 1 | while read IPADDR NAME ; do
showmount -e --no-headers $NAME | ...
done
Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs