]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
umount.nfs: Use a privileged port when sending UMNT requests
authorChuck Lever <chuck.lever@oracle.com>
Sat, 18 Apr 2009 13:44:56 +0000 (09:44 -0400)
committerSteve Dickson <steved@redhat.com>
Sat, 18 Apr 2009 13:44:56 +0000 (09:44 -0400)
Turns out we do actually need to use a privileged port for UMNT.  The
Linux rpc.mountd complains if an ephemeral source port is used:

  Apr 17 15:52:19 ingres mountd[2061]: refused unmount request from
    192.168.0.59 for /export (/export): illegal port 60932

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/network.c

index bcd0c0fc315bbc0546b3093db75d6b1e5e5b1039..234e7f3e344f11b1e61106483cfb5c4991eb12e3 100644 (file)
@@ -869,7 +869,7 @@ int nfs_advise_umount(const struct sockaddr *sap, const socklen_t salen,
        memcpy(saddr, sap, salen);
        nfs_set_port(saddr, mnt_pmap.pm_port);
 
-       client = nfs_get_rpcclient(saddr, salen, mnt_pmap.pm_prot,
+       client = nfs_get_priv_rpcclient(saddr, salen, mnt_pmap.pm_prot,
                                        mnt_pmap.pm_prog, mnt_pmap.pm_vers,
                                        &timeout);
        if (client == NULL)