linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruce Fields <bfields@fieldses.org>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Steve Dickson <steved@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] gssd: Remove insane sanity checks of the service name
Date: Mon, 26 Nov 2012 17:37:34 -0500	[thread overview]
Message-ID: <20121126223734.GD18186@fieldses.org> (raw)
In-Reply-To: <1353969081-17842-2-git-send-email-Trond.Myklebust@netapp.com>

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
> 

  reply	other threads:[~2012-11-26 22:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26 22:31 [PATCH 1/2] gssd: Fix bugs in process_krb5_upcall Trond Myklebust
2012-11-26 22:31 ` [PATCH 2/2] gssd: Remove insane sanity checks of the service name Trond Myklebust
2012-11-26 22:37   ` Bruce Fields [this message]
2012-11-28 19:53   ` Steve Dickson
2012-11-27 16:05 ` [PATCH 1/2] gssd: Fix bugs in process_krb5_upcall Myklebust, Trond
2012-11-27 16:43   ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121126223734.GD18186@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).