----- Original Message ----- > From: "Peter Schiffer" <[email protected]> > To: [email protected] > Sent: Tuesday, October 8, 2013 7:17:41 PM > Subject: [Libcg-devel] [PATCH 1/2] Templates letter case is switched > > Man page cgrules.conf(5) says: > %u username, uid if name resolving fails > %U uid > %g group name, gid if name resolving fails > %G gid > %p process name, pid if name not available > %P pid > > However, in cgroup_change_cgroup_flags() function, the letter case is > switched. > This patch fixes the problem. > > Signed-off-by: Peter Schiffer <[email protected]> Acked-by: Ivana Hutarova Varekova <[email protected]> > --- > src/api.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/src/api.c b/src/api.c > index d0eb10a..0e4601b 100644 > --- a/src/api.c > +++ b/src/api.c > @@ -2931,11 +2931,11 @@ int cgroup_change_cgroup_flags(uid_t uid, gid_t gid, > available = FILENAME_MAX - j - 2; > /* Substitution */ > switch(tmp->destination[++i]) { > - case 'u': > + case 'U': > written = snprintf(newdest+j, available, > "%d", uid); > break; > - case 'U': > + case 'u': > user_info = getpwuid(uid); > if(user_info) { > written = snprintf(newdest + j, > @@ -2946,11 +2946,11 @@ int cgroup_change_cgroup_flags(uid_t uid, gid_t gid, > available, "%d", uid); > } > break; > - case 'g': > + case 'G': > written = snprintf(newdest + j, > available, "%d", gid); > break; > - case 'G': > + case 'g': > group_info = getgrgid(gid); > if(group_info) { > written = snprintf(newdest + j, > @@ -2961,11 +2961,11 @@ int cgroup_change_cgroup_flags(uid_t uid, gid_t gid, > available, "%d", gid); > } > break; > - case 'p': > + case 'P': > written = snprintf(newdest + j, > available, "%d", pid); > break; > - case 'P': > + case 'p': > if(procname) { > written = snprintf(newdest + j, > available, "%s", > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk > _______________________________________________ > Libcg-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/libcg-devel >
------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
