* Dhaval Giani <[EMAIL PROTECTED]> [2008-11-30 10:44:12]:

> On Sat, Nov 29, 2008 at 1:44 PM, SanjayKumar J <[EMAIL PROTECTED]> wrote:
> > [ 2151451 ] cgconfigparser has permission bug
> >
> > The Patch  checks for admin permission is equal to root if not goes to
> > error message part.
> >
> > 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 (error || pw->pw_uid != 0) {
> 
> Hmm. this does not seem advisable. Suppose we want to give admin
> rights to some other user? I am not sure if we should proceed this
> way.

Please see cgroup_config_group_task_perm(), the correct way to it, is
to look for pw_buffer == NULL, please redo that patch to use that
logic.

-- 
        Balbir

-------------------------------------------------------------------------
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