From: Steve Dickson <SteveD@redhat.com>
To: "J. Bruce Fields" <bfields@redhat.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCHv2 1/3] gssd: fix strncmp bug causing client removals
Date: Tue, 24 Sep 2013 15:17:20 -0400 [thread overview]
Message-ID: <5241E540.7030102@RedHat.com> (raw)
In-Reply-To: <1379624632-31476-1-git-send-email-bfields@redhat.com>
On 19/09/13 17:03, J. Bruce Fields wrote:
> From: "J. Bruce Fields" <bfields@redhat.com>
>
> Both dirname and pdir are null-terminated strings, so there's no reason
> I can see for the strncmp.
>
> And this gives the wrong result when comparing the "nfsd" and "nfsd4_cb"
> directories! The results were callback clients being removed
> immediately after creation, when lack of a client with the corresponding
> name under "nfsd" lead gssd to believe it had disappeared from
> "nfsd4_cb".
>
> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Committed...
steved.
> ---
> utils/gssd/gssd_proc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
> index 2d3dbec..0383883 100644
> --- a/utils/gssd/gssd_proc.c
> +++ b/utils/gssd/gssd_proc.c
> @@ -525,7 +525,7 @@ update_old_clients(struct dirent **namelist, int size, char *pdir)
> /* only compare entries in the global list that are from the
> * same pipefs parent directory as "pdir"
> */
> - if (strncmp(clp->dirname, pdir, strlen(pdir)) != 0) continue;
> + if (strcmp(clp->dirname, pdir) != 0) continue;
>
> stillhere = 0;
> for (i=0; i < size; i++) {
>
next prev parent reply other threads:[~2013-09-24 19:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 20:57 nfs-utils patches for nfsv4.0 callbacks J. Bruce Fields
2013-09-19 20:57 ` [PATCH 1/3] gssd: fix strncmp bug causing client removals J. Bruce Fields
2013-09-19 21:00 ` J. Bruce Fields
2013-09-19 21:03 ` [PATCHv2 " J. Bruce Fields
2013-09-19 21:03 ` [PATCHv2 2/3] gssd: don't use tgtname to find our keytab J. Bruce Fields
2013-09-24 19:17 ` Steve Dickson
2013-09-19 21:03 ` [PATCHv2 3/3] gssd: let tgtname override clp->servicename J. Bruce Fields
2013-09-24 19:17 ` Steve Dickson
2013-09-24 19:17 ` Steve Dickson [this message]
2013-09-19 20:57 ` [PATCH 2/3] gssd: don't use tgtname to find our keytab J. Bruce Fields
2013-09-19 20:57 ` [PATCH 3/3] gssd: let tgtname override clp->servicename J. Bruce Fields
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=5241E540.7030102@RedHat.com \
--to=steved@redhat.com \
--cc=bfields@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/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).