[PATCH v2 09/10] sandbox/sandbox: clean up the runuserdir
Stephen Smalley <[email protected]>
| Newsgroups | org.kernel.vger.selinux |
|---|---|
| Message-ID | <[email protected]> |
sandbox was already cleaning up any residual homedir and tmpdir but was never updated to likewise cleanup the runuserdir. Signed-off-by: Stephen Smalley <[email protected]> --- sandbox/sandbox | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sandbox/sandbox b/sandbox/sandbox index 8c15d659..d909fc44 100644 --- a/sandbox/sandbox +++ b/sandbox/sandbox @@ -532,6 +532,10 @@ sandbox [-h] [-l level ] [-[X|M] [-H homedir] [-T tempdir]] [-I includefile ] [- if self.__options.shred: self.shred(self.__tmpdir) shutil.rmtree(self.__tmpdir) + if self.__runuserdir and not self.__options.runuserdir: + if self.__options.shred: + self.shred(self.__runuserdir) + shutil.rmtree(self.__runuserdir) def shred(self, path): for root, dirs, files in os.walk(path): -- 2.55.0