Commit eba840c
committed
Linux sandbox: Use /build instead of /tmp as $TMPDIR
There is a security issue when a build accidentally stores its $TMPDIR
in some critical place, such as an RPATH. If
TMPDIR=/tmp/nix-build-..., then any user on the system can recreate
that directory and inject libraries into the RPATH of programs
executed by other users. Since /build probably doesn't exist (or isn't
world-writable), this mitigates the issue.1 parent 2da6a42 commit eba840c
1 file changed
+15
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1661 | 1661 | | |
1662 | 1662 | | |
1663 | 1663 | | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
1664 | 1667 | | |
1665 | 1668 | | |
1666 | 1669 | | |
| |||
1721 | 1724 | | |
1722 | 1725 | | |
1723 | 1726 | | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
1724 | 1731 | | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
1725 | 1735 | | |
1726 | 1736 | | |
1727 | 1737 | | |
| |||
1829 | 1839 | | |
1830 | 1840 | | |
1831 | 1841 | | |
1832 | | - | |
1833 | | - | |
1834 | | - | |
1835 | | - | |
1836 | | - | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
1837 | 1847 | | |
1838 | 1848 | | |
1839 | 1849 | | |
| |||
0 commit comments