All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Steve Dickson <steved@redhat.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/1] idmapd: logging of Local-Realms only lists the last realm
Date: Mon, 19 Mar 2012 09:12:12 -0400	[thread overview]
Message-ID: <20120319131212.GA21672@fieldses.org> (raw)
In-Reply-To: <1332160616-4522-1-git-send-email-steved@redhat.com>

On Mon, Mar 19, 2012 at 08:36:56AM -0400, Steve Dickson wrote:
> From: Juno Krahn <Juno.Krahn@gmail.com>
> 
> The list of local realms can be logged with a massage like the following:
>    rpc.idmapd: libnfsidmap: Realms list: 'EXAMPLE2.COM'
> Instead of printing a list of realms, only the last realm in the list is shown.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=804152

Makes sense.  Could we also move this whole thing into a separate
function?:

	if (idmap_verbosity >= 1)
		log_local_realms(local_realms);

It's all just debugging code, no sense cluttering up the main
function....--b.

> 
> Signed-off-by: Steve Dickson <steved@redhat.com>
> ---
>  libnfsidmap.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/libnfsidmap.c b/libnfsidmap.c
> index 57bb6c3..641d766 100644
> --- a/libnfsidmap.c
> +++ b/libnfsidmap.c
> @@ -285,8 +285,9 @@ int nfs4_init_name_mapping(char *conffile)
>  			}
>  			buf = malloc(siz);
>  			if (buf) {
> +				*buf = 0;
>  				TAILQ_FOREACH(r, &local_realms->fields, link) {
> -					sprintf(buf, "'%s' ", r->field);
> +					sprintf(buf+strlen(buf), "'%s' ", r->field);
>  				}
>  				IDMAP_LOG(1, ("libnfsidmap: Realms list: %s", buf));
>  				free(buf);
> -- 
> 1.7.7.5
> 
> --
> 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

  reply	other threads:[~2012-03-19 13:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 12:36 [PATCH 1/1] idmapd: logging of Local-Realms only lists the last realm Steve Dickson
2012-03-19 13:12 ` J. Bruce Fields [this message]
2012-03-19 14:05 ` Chuck Lever
2012-03-19 17:36   ` Steve Dickson
2012-03-19 17:43     ` Chuck Lever
2012-03-19 19:20       ` Steve Dickson
2012-03-19 19:33       ` J. Bruce Fields
2012-03-19 19:45 ` 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=20120319131212.GA21672@fieldses.org \
    --to=bfields@fieldses.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.