Package: nfs-common
Version: 1:1.1.2-6lenny1
Severity: normal
Tags: patch

Hi,

showmount -e fails on an NFS server (CentOS with RPCMOUNTDOPTS="-N 1 -N 2") 
whose mountd offers NFSV3 only and Debian's showmount seems to speak NFSV1
only. In the rpcinfo -p output below, the latter is the CentOS box.

tkor...@exdpr:~/Desktop$ diff rpcinfo_storeob-ha01 rpcinfo_storeob-ha02         
                                                                           
8,21c8,17                                                                       
                                                                           
     100005    1   tcp    600  mountd                                           
                                                                          
     100005    1   udp   1023  mountd                                           
                                                                          
     100005    2   tcp    600  mountd                                           
                                                                          
     100005    2   udp   1023  mountd                                           
                                                                          
     100005    3   tcp    600  mountd                                           
                                                                          
     100005    3   udp   1023  mountd                                           
                                                                          
     100021    1   tcp  56488  nlockmgr                                         
                                                                          
     100021    1   udp  53904  nlockmgr                                         
                                                                          
     100021    3   tcp  56488  nlockmgr                                         
                                                                          
     100021    3   udp  53904  nlockmgr                                         
                                                                          
     100021    4   tcp  56488  nlockmgr                                         
                                                                          
     100021    4   udp  53904  nlockmgr                                         
                                                                          
     100024    1   tcp    604  status                                           
                                                                          
     100024    1   udp    603  status                                           
                                                                          
---                                                                             
                                                                           
                                                                                
                                                                            
     100005    3   tcp    809  mountd                                           
                                                                            
     100005    3   udp    806  mountd                                           
                                                                            
     100021    1   tcp  47446  nlockmgr                                         
                                                                            
     100021    1   udp  36215  nlockmgr
     100021    3   tcp  47446  nlockmgr                                         
                                                                            
     100021    3   udp  36215  nlockmgr                                         
                                                                            
     100021    4   tcp  47446  nlockmgr                                         
                                                                            
     100021    4   udp  36215  nlockmgr                                         
                                                                            
     100024    1   tcp    891  status                                           
                                                                            
     100024    1   udp    888  status

That's the showmount error message:

tkor...@exdpr:~$ showmount -e storeob-ha02
rpc mount export: RPC: Program/version mismatch; low version = 3, high version 
= 3


I think it would be a good idea to make also showmount speak NFSV3.

Here's a patch against the version in Lenny:


diff -Nru nfs-utils-1.1.2-orig/utils/showmount/showmount.c 
nfs-utils-1.1.2/utils/showmount/showmount.c
--- nfs-utils-1.1.2-orig/utils/showmount/showmount.c    2008-03-14 
16:46:29.000000000 +0100
+++ nfs-utils-1.1.2/utils/showmount/showmount.c 2009-11-25 12:39:20.000000000 
+0100
@@ -347,12 +347,12 @@
        msock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
        if (msock != -1) {
                server_addr.sin_port = getport(&server_addr,
-                                        MOUNTPROG, MOUNTVERS, IPPROTO_TCP);
+                                        MOUNTPROG, MOUNTVERS_NFSV3, 
IPPROTO_TCP);
                if (server_addr.sin_port) {
                        ret = connect_nb(msock, &server_addr, 0);
                        if (ret != -1)
                                mclient = clnttcp_create(&server_addr,
-                                               MOUNTPROG, MOUNTVERS, &msock,
+                                               MOUNTPROG, MOUNTVERS_NFSV3, 
&msock,
                                                0, 0);
                        else
                                close(msock);
@@ -362,7 +362,7 @@
 
        if (!mclient) {
                server_addr.sin_port = getport(&server_addr,
-                                        MOUNTPROG, MOUNTVERS, IPPROTO_UDP);
+                                        MOUNTPROG, MOUNTVERS_NFSV3, 
IPPROTO_UDP);
                if (!server_addr.sin_port) {
                        clnt_pcreateerror("portmap getport");
                        exit(1);
@@ -371,7 +371,7 @@
                pertry_timeout.tv_sec = TIMEOUT_UDP;
                pertry_timeout.tv_usec = 0;
                if ((mclient = clntudp_create(&server_addr,
-                   MOUNTPROG, MOUNTVERS, pertry_timeout, &msock)) == NULL) {
+                   MOUNTPROG, MOUNTVERS_NFSV3, pertry_timeout, &msock)) == 
NULL) {
                        clnt_pcreateerror("mount clntudp_create");
                        exit(1);
                }



Regards,
Thomas


-- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-bpo.2-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages nfs-common depends on:
ii  adduser         3.110                    add and remove users and groups
ii  initscripts     2.86.ds1-61              Scripts for initializing and shutt
ii  libc6           2.7-18                   GNU C Library: Shared libraries
ii  libcomerr2      1.41.3-1                 common error description library
ii  libevent1       1.3e-3                   An asynchronous event notification
ii  libgssglue1     0.1-2                    mechanism-switch gssapi library
ii  libkrb53        1.6.dfsg.4~beta1-5lenny1 MIT Kerberos runtime libraries
ii  libnfsidmap2    0.20-1                   An nfs idmapping library
ii  librpcsecgss3   0.18-1                   allows secure rpc communication us
ii  libwrap0        7.6.q-16                 Wietse Venema's TCP wrappers libra
ii  lsb-base        3.2-20                   Linux Standard Base 3.2 init scrip
ii  netbase         4.34                     Basic TCP/IP networking system
ii  portmap         6.0-9                    RPC port mapper
ii  ucf             3.0016                   Update Configuration File: preserv

nfs-common recommends no packages.

nfs-common suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to