On Sun, Nov 30, 2008 at 7:08 PM, Balbir Singh <[EMAIL PROTECTED]>wrote:

> * SanjayKumar J <[EMAIL PROTECTED]> [2008-11-30 18:52:19]:
>
> > Consistent Error checking  for group_admin_perm
> >
> > Signed-off-by: SanjayKumar J <[EMAIL PROTECTED]>
> >
> > Index: config.c
> > ===================================================================
> > --- config.c  (revision 225)
> > +++ config.c  (working copy)
> > @@ -237,7 +237,7 @@
> >
> >                       error = getpwnam_r(value, pw, buffer,
> CGROUP_BUFFER_LEN,
> >
> &pw_buffer);
> > -                     if (error) {
> > +                     if (pw_buffer == NULL) {
> >                               free(pw);
> >                               goto admin_error;
> >                       }
> > @@ -258,7 +258,7 @@
> >                       error = getgrnam_r(value, group, buffer,
> >                                       CGROUP_BUFFER_LEN, &group_buffer);
> >
> > -                     if (error) {
> > +                     if (group_buffer == NULL) {
> >                               free(group);
> >                               goto admin_error;
>
>
> Looks good to me
>
> Acked-by: Balbir Singh <[EMAIL PROTECTED]>
>
> Sanjay, if you did any testing, could you please mention that as well.
>
> --
>         Balbir
>

 I tested with invalid user/group names and it gave the error correctly .
With valid user/group works fine.



-- 
Sanjay Kumar J
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to