Re: [OE-core] [PATCH] patch.bbclass: increase security

2012-09-14 Thread Constantin Musca
On 09/14/2012 05:18 PM, Enrico Scholz wrote: Constantin Musca writes: +process_tmpdir = tempfile.mkdtemp(prefix=str(os.getpid())) fwiw, prefix is usually something which identifies the origin of the tempfile. getpid() does not make much sense here; it might be better to use something li

Re: [OE-core] [PATCH] patch.bbclass: increase security

2012-09-14 Thread Enrico Scholz
Constantin Musca writes: > +process_tmpdir = tempfile.mkdtemp(prefix=str(os.getpid())) fwiw, prefix is usually something which identifies the origin of the tempfile. getpid() does not make much sense here; it might be better to use something like 'bitbake-patch' or so. > if os.path.e

[OE-core] [PATCH] patch.bbclass: increase security

2012-09-14 Thread Constantin Musca
- Use mkdtemp for generating temp dir names - Use bb.utils.remove for removing temp dirs - Add comment for explaining the "patch" workaround Signed-off-by: Constantin Musca --- meta/classes/patch.bbclass | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/meta