xfs
[Top] [All Lists]

Re: [PATCH] xfsprogs: xfs_quota allow user or group names beginning with

To: rjohnston@xxxxxxx
Subject: Re: [PATCH] xfsprogs: xfs_quota allow user or group names beginning with digits
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 22 Apr 2013 12:45:01 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20130417183323.465181485@xxxxxxx>
References: <20130417183323.465181485@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Apr 17, 2013 at 01:32:53PM -0500, rjohnston@xxxxxxx wrote:
> xfs_quota does not properly parse users or groups that begin with a number.
> Only call atoi when user or group consists of digits only.
> 
> Signed-off-by: Rich Johnston <rjohnston@xxxxxxx>
> 
> ---
>  include/input.h |    1 +
>  libxcmd/input.c |   12 ++++++++++++
>  quota/quota.c   |    4 ++--
>  quota/quota.h   |    1 +
>  4 files changed, 16 insertions(+), 2 deletions(-)
> 
> Index: b/include/input.h
> ===================================================================
> --- a/include/input.h
> +++ b/include/input.h
> @@ -46,6 +46,7 @@ extern void timestr(struct timeval *tv,
>  extern uid_t uid_from_string(char *user);
>  extern gid_t gid_from_string(char *group);
>  extern prid_t        prid_from_string(char *project);
> +extern boolean_t isdigits_only(const char *str);

bool is the correct type, not boolean_t. My CRC patchset makes
userspace fall in line with the removal of boolean_t from the kernel
code, so we should probably make this correct from the start. ;)

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>