All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] nfsidmap: make sure given arguments are valid
Date: Mon, 04 May 2015 07:37:34 -0400	[thread overview]
Message-ID: <554759FE.4030902@RedHat.com> (raw)
In-Reply-To: <1430417344-25020-2-git-send-email-steved@redhat.com>



On 04/30/2015 02:09 PM, Steve Dickson wrote:
> Detect when a given argument is invalid. Log
> the error and exit gracefully
> 
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed...

steved.

> ---
>  utils/nfsidmap/nfsidmap.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c
> index 5d62078..1f5ba67 100644
> --- a/utils/nfsidmap/nfsidmap.c
> +++ b/utils/nfsidmap/nfsidmap.c
> @@ -323,7 +323,10 @@ int main(int argc, char **argv)
>  	}
>  	type = strtok(arg, ":");
>  	value = strtok(NULL, ":");
> -
> +    if (value == NULL) {
> +		xlog_err("Error: Null uid/gid value.");
> +		return 1;
> +	}
>  	if (verbose) {
>  		xlog_warn("key: 0x%lx type: %s value: %s timeout %ld",
>  			key, type, value, timeout);
> 

  reply	other threads:[~2015-05-04 11:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 18:09 [PATCH] Handle NULL names better Steve Dickson
2015-04-30 18:09 ` [PATCH] nfsidmap: make sure given arguments are valid Steve Dickson
2015-05-04 11:37   ` Steve Dickson [this message]
2015-05-04 11:35 ` [PATCH] Handle NULL names better 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=554759FE.4030902@RedHat.com \
    --to=steved@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 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.