* Jan Safranek <[email protected]> [2010-09-01 14:38:38]:
> Rewrite cg_mkdir_p so it does not change current working directory.
>
> Old sequence of operations when creating e.g. /cgroup/cpu
> $OLDCWD=$PWD
> cd /
> mkdir cgroup
> cd cgroup
> mkdir cpu
> cd $OLDCWD
>
> New sequence is:
> mkdir /cgroup
> mkdir /cgroup/cpu
>
> Some tools, namely those used in /etc/init.d/cgconfig, might be executed with
> security constrained context, which does not allow them to access certain
> directories (like /var/log/audit). And when e.g. cgconfigparser is executed in
> /var/log/audit as current working directory, chdir("/var/log/audit") in
> cg_mkdir_p() fails. As consequence, "/etc/init.d/cgconfig start" randomly
> fails
> or succeeds, depending on current working directory and current SELinux
> policy.
>
> Signed-off-by: Jan Safranek <[email protected]>
Good catch! Thanks!
--
Three Cheers,
Balbir
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel