Message ID | 1353969081-17842-2-git-send-email-Trond.Myklebust@netapp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Nov 26, 2012 at 05:31:21PM -0500, Trond Myklebust wrote: > 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> ACK to both.--b. > --- > utils/gssd/gssd_proc.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c > index b79e872..8c00201 100644 > --- a/utils/gssd/gssd_proc.c > +++ b/utils/gssd/gssd_proc.c > @@ -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); > > - /* 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); > > - 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; > > -- > 1.7.11.7 > -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 26/11/12 17:31, Trond Myklebust wrote: > 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> Committed... steved. > --- > utils/gssd/gssd_proc.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c > index b79e872..8c00201 100644 > --- a/utils/gssd/gssd_proc.c > +++ b/utils/gssd/gssd_proc.c > @@ -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); > > - /* 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); > > - 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; > > -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c index b79e872..8c00201 100644 --- a/utils/gssd/gssd_proc.c +++ b/utils/gssd/gssd_proc.c @@ -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); - /* 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); - 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;
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> --- utils/gssd/gssd_proc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)