Code review comment for lp:~jtv/maas/bug-1042865

Revision history for this message
Scott Moser (smoser) wrote :

Yeah.
This patch is wrong.
You should not globally change umask, which changes programs invoked by this program also.

Additionally, your change to umask is not even necessary as
 a.) mktemp is going to still do the right thing and make temporary directories with secure permissions
     $ sh -c 'umask a+r; d=$(mktemp -d); ls -ld $d; rmdir $d;'
     drwx------ 2 smoser smoser 4096 Aug 31 10:00 /tmp/tmp.Ez8zyx2rh9

 b.) you're doing a 'chmod -R' there anyway to open up permissions.

« Back to merge proposal