]> git.proxmox.com Git - mirror_lxcfs.git/commit - pam/pam_cgfs.c
pam: fix race in cgroup creation
authorSerge Hallyn <serge@hallyn.com>
Sun, 21 Aug 2016 18:26:42 +0000 (13:26 -0500)
committerSerge Hallyn <serge@hallyn.com>
Sun, 21 Aug 2016 18:26:42 +0000 (13:26 -0500)
commit56ee748c3fd89752a6262471eb49d3b670bb3c09
tree93b302e94836e7df2773caa5d04f518b147811e7
parentec2b5e7c6297a82914f59d7b49714beb5f8afeef
pam: fix race in cgroup creation

If we find that a cgroup already exists, we should

1. remove all the cgroups which we've created so far
2. set existed to true
3. return failure

The caller should then detect that existed == true,
and re-try with the next index.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
pam/pam_cgfs.c