Re: request: qmail-qfilter to use mkdtemp()
Bruce Guenter <[email protected]> Wed, 25 Oct 2017 17:19:30 -0600
| Newsgroups | gmane.comp.sysutils.bgware |
|---|---|
| Message-ID | <[email protected]> |
--9JSHP372f+2dzJ8X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 24, 2017 at 02:51:10PM -0400, Amitai Schleier wrote: > This works beautifully -- iff I chmod qmail-qfilter's TMPDIR wide open,= =20 > which is obviously terrible. Why is it obviously terrible? qmail-qfilter uses mkstemp to create temporary file names, which is designed to do so securely. In fact, the default for qmail-qfilter is to create its temporary files in /tmp, which is generally world writeable. Now, I should rework it to allow setting the temporary directory with something other than a #define at compile time, but the above remains true. > My request: Bruce, would you be willing to release an updated=20 > qmail-qfilter that makes (and cleans up) a temporary subdirectory at=20 > runtime? I don't see how this would solve your problem. qmail-qfilter would still have to create a temporary filename in some location that must still be world writeable (or at least group writeable to some common group). Only now, if qmail-qfilter crashes, the directory won't automatically be removed on exit. --=20 Bruce Guenter <[email protected]> http://untroubled.org/ --9JSHP372f+2dzJ8X Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEQJAAJIYhxdYHEgzqUVG9ycFNPGcFAlnxHAIACgkQUVG9ycFN PGdqIBAAgcEQKG9eIEyz/v42pbelV9n3+6/UCKJtC8tOE+0oz5cxbQ1NrP79ykgg zor6iNzbrWWy6tdEg2mZTGHEA92q73k7TdNnfqp+jizFgrd6O3kulduNCk2GWEGr D/PL9GStTz5p3BFuYIpvdqApmq7ACqhAwt7dzvp7HM79mGzUVzZ+cxWTYGPpMUrf BHwr/UCf5JIqivNa+qMsRLWjlqMG0orErfLdiiUS4HnuelGm1WOxWZ/MdxjH5XXb jjAku4ldEJp5CC5K9ZBtT6wWf0xc9DluNBX4AlA2iRzKKCFvlePgknHf/t55ABP3 rxxXzmHpql2ib32ogwUUDPLcEA4FVwIbniMLYgc2hX3E4bg+s8esubwp9nV/J5Cw B6nwvLz+kRjetQ8KfKRIkWOkKCoX14S6smqk/FJ9rZ5TnYPr+XN8V/lh+ejIyPeY HUDdH7BHk/Y9GdTgxgSrQQB/M2kQvppsG7SKLz/S6a2bYtIP9Kz31l8sVYX14tmw wJUPghNRf/0CgnQJNI7u+Ff6q5eXMuItLfi/grxCsEII6sukUtmvGJ9chUINy0jd P+Bcn6VP1TKFouHXTW1TIfm2z/D1Dld9Gdpk5gBiBvHzywZ+0//ngLQ5qZC0SGfr kGgLe8K4MBpEEnau1Ch8XK8UhpVGP1WaLJrXcO8cLQiocbSz0Qk= =Oiae -----END PGP SIGNATURE----- --9JSHP372f+2dzJ8X--