bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] chroot specify user/group feature


From: Jim Meyering
Subject: Re: [PATCH] chroot specify user/group feature
Date: Wed, 20 May 2009 17:10:13 +0200

Pádraig Brady wrote:

> Giuseppe Scrivano wrote:
>> diff --git a/src/chroot.c b/src/chroot.c
>> +
>> +#ifndef GID_T_MAX
>> +# define GID_T_MAX TYPE_MAXIMUM (gid_t)
>> +#endif
>
> The above is redundant and already done in system.h

Good catch.

>> +#ifndef MAXGID
>> +# define MAXGID GID_T_MAX
>> +#endif
>
> Why add the new MAXGID name?

I presumed it was in case MAXGID is smaller than GID_T_MAX.

>> +  if (userspec)
>> +    {
>> +      uid_t uid;
>> +      gid_t gid;
>> +      char *user;
>> +      char *group;
>> +      const char *err = parse_user_spec (userspec, &uid, &gid, &user, 
>> &group);
>> +      if (err)
>> +        {
>> +          perror (err);
>> +          exit (1);
>> +        }
>
> Probably should use error(EXIT_FAILURE, ...) instead of perror();

Another good one.
Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]