|Summary:||PkgBase: runtime package removes sticky bit from /tmp|
|Product:||Base System||Reporter:||Kyle Evans <kevans>|
|Component:||misc||Assignee:||Glen Barber <gjb>|
|Severity:||Affects Only Me||Keywords:||patch|
Description Kyle Evans 2017-03-06 06:07:47 UTC
Created attachment 180554 [details] git(1) produced diff to set permissions on /tmp after install of -runtime Hi, In deploying pkgbase on a lot of the machines I manage, I find that installing the runtime pkg resets permissions on my /tmp and removes the sticky bit. This is pretty unfriendly, unfortunately, for programs not run as root that create temp files. This is reproducible just by installing the -runtime pkg on a machine with /tmp at 1777 like in a standard install. On one hand, pkg(8) probably shouldn't be overwriting permissions on a directory that it didn't create. On the other hand, if /tmp doesn't exist (say, installing into a new jail environment or something to that effect) then the runtime pkg should probably be setting sensible permissions since it's not a directory that had previously existed. I'm attaching a patch to set sensible permissions (1777) on /tmp in accordance with bsdconfig behavior to address the latter part of my previous paragraph, which would alleviate this problem.
Comment 1 commit-hook 2017-03-08 18:52:49 UTC
A commit references this bug: Author: gjb Date: Wed Mar 8 18:52:40 UTC 2017 New revision: 314916 URL: https://svnweb.freebsd.org/changeset/base/314916 Log: Fix permissions on /tmp when installing the runtime package. Reported by: many Patch by: Kyle Evans PR: 217574 MFC after: 3 days Sponsored by: The FreeBSD Foundation Changes: head/release/packages/runtime.ucl
Comment 2 Glen Barber 2017-03-08 18:53:29 UTC
Committed, thank you for the patch.
Comment 3 commit-hook 2017-03-11 02:13:31 UTC
A commit references this bug: Author: gjb Date: Sat Mar 11 02:12:39 UTC 2017 New revision: 315042 URL: https://svnweb.freebsd.org/changeset/base/315042 Log: MFC r314916: Fix permissions on /tmp when installing the runtime package. PR: 217574 Sponsored by: The FreeBSD Foundation Changes: _U stable/11/ stable/11/release/packages/runtime.ucl