[MERGE] OSX's mkdtemp assigns wrong group by default
John Arbash Meinel
john at arbash-meinel.com
Sun Aug 31 19:22:08 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
...
> john> dir = mkdtemp()
> john> if sys.platform == 'darwin':
> john> # OS X creates temp dirs with the 'wheel' group, which users are not likely
> john> # to be in, and this prevents us from setting the sgid bit
> john> os.chown(dir, os.getuid(), os.getgid())
>
> Conditional logic in tests ? >-/
>
> john> I would certainly be more comfortable modifying the one
> john> test that needs group, rather than everytime someone
> john> creates a temp dir.
>
> But then we risk writing tests suffering from the same problem.
And then we fix specific tests that need it, but I honestly think that
actively chowning mkdtemp would lead to security holes which is worse than
having a test have a bit of platform specific logic.
If we have other tests crop up, then we can revisit it. But a single test
needing this does not necessitate doing it everywhere.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIuuFQJdeBCYSNAAMRAkulAJ9P0mHcbh62tM35hm+csGTvVo7hgwCfZeeu
RRtnEMu+CLIlUBAqr+7XYcM=
=QGYG
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list