Bug#608459: mount(nfs): no hosts available

2012-01-26 Thread Fredrik Tolf

For what it's worth, here's a patch which fixes the problem:

diff -ur autofs5-5.0.4-old/lib/rpc_subs.c autofs5-5.0.4/lib/rpc_subs.c
--- autofs5-5.0.4-old/lib/rpc_subs.c2010-12-31 04:59:32.0 +0100
+++ autofs5-5.0.4/lib/rpc_subs.c2010-12-31 05:00:06.0 +0100
@@ -274,7 +274,7 @@
if (*fd  0)
return NULL;

-   if (connect_nb(*fd, laddr, slen, info-timeout)  0) {
+   if (bind(*fd, laddr, slen)  0) {
close(*fd);
return NULL;
}



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#608459: mount(nfs): no hosts available

2010-12-30 Thread Fredrik Tolf
Package: autofs5
Version: 5.0.4-3.2+dolda1
Severity: important
Tags: upstream

When trying to use a NFSv4 export with automount, it gives me the following
error when I try to access the export:

attempting to mount entry /net/home
mount(nfs): no hosts available

My configuration is quite simple. /etc/auto.master:
/netfile:/etc/auto.net
And /etc/auto.net:
home-fstype=nfs4,sec=krb5i  nerv.dolda2000.com:/home

The mount works fine when I just try to mount it normally, running
mount -t nfs4 -o sec=krb5 nerv.dolda2000.com:/home /mnt

Having spent some time debugging automount, I actually don't see
how NFSv4 (over TCP, at least) could work for anyone at all, ever, with
this version of automount. In lib/rpc_subs.c, the rpc_do_create_client
(which is called as part of testing the server's availability) tries to
connect to 0.0.0.0 -- instead of binding to it! -- and, obviously, fails,
causing the server availability test to fail. See line 277, which calls
connect_nb on the laddr sockaddr, which (as seen in the preceding test
for UDP servers a few lines above) is meant for binding.


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (400, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages autofs5 depends on:
ii  libc62.11.2-7Embedded GNU C Library: Shared lib
ii  ucf  3.0025+nmu1 Update Configuration File: preserv

Versions of packages autofs5 recommends:
ii  module-init-tools 3.12-1 tools for managing Linux kernel mo
ii  nfs-common1:1.2.2-4  NFS support files common to client

autofs5 suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org