On Wed, Mar 24, 2010 at 8:59 PM, Lennart Poettering
<[email protected]> wrote:
> Signed-off-by: Lennart Poettering <[email protected]>

looks good.

Acked-by: Dhaval Giani <[email protected]>

And I think we have fixed the basename() part with a patch based on
this patchset.

> ---
>  src/api.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/src/api.c b/src/api.c
> index 365ab21..cb708d7 100644
> --- a/src/api.c
> +++ b/src/api.c
> @@ -498,6 +498,9 @@ static int cgroup_parse_rules(bool cache, uid_t muid,
>                                        matched = false;
>                                        continue;
>                                }
> +
> +                                /* FIXME: basename() modifies the string and 
> really shouldn't! */
> +
>                                if (strcmp(mprocname, procname) &&
>                                        strcmp(basename(mprocname), procname)) 
> {
>                                        uid = CGRULE_INVALID;
> @@ -827,6 +830,9 @@ static char *cg_build_path_locked(const char *name, char 
> *path, const char *type
>                        if (name) {
>                                char *tmp;
>                                tmp = strdup(path);
> +
> +                                /* FIXME: missing OOM check here! */
> +
>                                sprintf(path, "%s%s/", tmp, name);
>                                free(tmp);
>                        }
> @@ -2179,6 +2185,9 @@ static struct cgroup_rule 
> *cgroup_find_matching_rule(uid_t uid,
>                        break;
>                if (!strcmp(ret->procname, procname))
>                        break;
> +
> +                /* FIXME: basename() modifies the string and really 
> shouldn't! */
> +
>                if (!strcmp(ret->procname, basename(procname)))
>                        /* Check a rule of basename. */
>                        break;
> --
> 1.7.0.1
>
>
>
> Lennart
>
> --
> Lennart Poettering                        Red Hat, Inc.
> lennart [at] poettering [dot] net
> http://0pointer.net/lennart/           GnuPG 0x1A015CC4
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Libcg-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libcg-devel
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to