public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Rich Johnston <rjohnston@sgi.com>
To: sekharan@us.ibm.com
Cc: xfs@oss.sgi.com
Subject: Re: [V2] xfsprogs: xfs_quota allow user or group names beginning with digits
Date: Mon, 22 Apr 2013 11:39:13 -0500	[thread overview]
Message-ID: <517567B1.60704@sgi.com> (raw)
In-Reply-To: <1366647526.3762.32396.camel@chandra-dt.ibm.com>

On 04/22/2013 11:18 AM, Chandra Seetharaman wrote:
>
> Is there any specific reason why quota_proj_type() is not changed ?
>
Yes project quota's were being punished. ;)
Good catch Chandra, I will submit a V3.

3 times seems to be the charm on patches. :D

Thanks
--Rich

> On Mon, 2013-04-22 at 08:31 -0500, rjohnston@sgi.com wrote:

>> Index: xfsprogs/quota/quota.c
>> ===================================================================
>> --- xfsprogs.orig/quota/quota.c	2013-03-22 14:22:09.000000000 -0500
>> +++ xfsprogs/quota/quota.c	2013-04-22 07:20:52.000000000 -0500
>> @@ -224,7 +224,7 @@
>>   	uid_t		id;
>>
>>   	if (name) {
>> -		if (isdigit(name[0])) {
>> +		if (isdigits_only(name)) {
>>   			id = atoi(name);
>>   			name = getusername(id, flags & NO_LOOKUP_FLAG);
>>   		} else if ((u = getpwnam(name))) {
>> @@ -273,7 +273,7 @@
>>   	int		i, ngroups, dofree = 0;
>>
>>   	if (name) {
>> -		if (isdigit(name[0])) {
>> +		if (isdigits_only(name)) {
>>   			gid = atoi(name);
>>   			name = getgroupname(gid, flags & NO_LOOKUP_FLAG);
>>   		} else {
>> Index: xfsprogs/quota/quota.h
>> ===================================================================
>> --- xfsprogs.orig/quota/quota.h	2013-03-22 14:22:09.000000000 -0500
>> +++ xfsprogs/quota/quota.h	2013-04-22 08:12:26.000000000 -0500
>> @@ -19,6 +19,7 @@
>>   #include <xfs/xqm.h>
>>   #include <xfs/path.h>
>>   #include <xfs/project.h>
>> +#include <stdbool.h>
>>
>>   /*
>>    * Different forms of XFS quota
>> @@ -80,4 +81,5 @@
>>   extern char *uid_to_name(__uint32_t __uid);
>>   extern char *gid_to_name(__uint32_t __gid);
>>   extern char *prid_to_name(__uint32_t __prid);
>> +extern bool isdigits_only(const char *);
>>
>>
>>
>> _______________________________________________
>> xfs mailing list
>> xfs@oss.sgi.com
>> http://oss.sgi.com/mailman/listinfo/xfs
>>
>
>


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2013-04-22 16:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 13:31 [V2] xfsprogs: xfs_quota allow user or group names beginning with digits rjohnston
2013-04-22 16:18 ` Chandra Seetharaman
2013-04-22 16:39   ` Rich Johnston [this message]

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=517567B1.60704@sgi.com \
    --to=rjohnston@sgi.com \
    --cc=sekharan@us.ibm.com \
    --cc=xfs@oss.sgi.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