]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
gssd: Remove insane sanity checks of the service name
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 28 Nov 2012 19:25:33 +0000 (14:25 -0500)
committerSteve Dickson <steved@redhat.com>
Wed, 28 Nov 2012 19:48:01 +0000 (14:48 -0500)
Either we trust the info file, or we don't. The current
'checks' only work for the combination 'nfs', '100003' and
a version number between 2 and 4.
The problem is that the callback channel also wants to use
'nfs' in combination with a different program number and
version number.

This patch throws the bogus checks out altogether and lets the
kernel use whatever combination it wants....

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/gssd/gssd_proc.c

index ec251fa0b6069c8bcb42dafdcef89f73afd8e9d2..aa5bbb9d4c8b25bed6f170eddb7939a1af574b16 100644 (file)
@@ -250,21 +250,10 @@ read_service_info(char *info_file_name, char **servicename, char **servername,
        if ((p = strstr(buf, "port")) != NULL)
                sscanf(p, "port: %127s\n", port);
 
        if ((p = strstr(buf, "port")) != NULL)
                sscanf(p, "port: %127s\n", port);
 
-       /* check service, program, and version */
-       if (memcmp(service, "nfs", 3) != 0)
-               return -1;
+       /* get program, and version numbers */
        *prog = atoi(program + 1); /* skip open paren */
        *vers = atoi(version);
 
        *prog = atoi(program + 1); /* skip open paren */
        *vers = atoi(version);
 
-       if (strlen(service) == 3 ) {
-               if ((*prog != 100003) || ((*vers != 2) && (*vers != 3) &&
-                   (*vers != 4)))
-                       goto fail;
-       } else if (memcmp(service, "nfs4_cb", 7) == 0) {
-               if (*vers != 1)
-                       goto fail;
-       }
-
        if (!addrstr_to_sockaddr(addr, address, port))
                goto fail;
 
        if (!addrstr_to_sockaddr(addr, address, port))
                goto fail;