Summary: | chroot should clear TMPDIR environment variable | ||
---|---|---|---|
Product: | Sisyphus | Reporter: | Michael Shigorin <mike> |
Component: | coreutils | Assignee: | placeholder <placeholder> |
Status: | CLOSED FIXED | QA Contact: | qa-sisyphus |
Severity: | normal | ||
Priority: | P2 | CC: | glebfm, ldv, placeholder |
Version: | unstable | ||
Hardware: | all | ||
OS: | Linux | ||
See Also: | https://bugzilla.altlinux.org/show_bug.cgi?id=40041 |
Description
Michael Shigorin
2008-06-14 17:58:06 MSD
(In reply to comment #0) > While performing rescue jobs in a chroot (changing rootfs type): This is not a regular operation, right? > # mkinitrd --help > /sbin/mkinitrd: line 1557: cannot create temp file for here document: No such file or directory > > # set | grep T.*MP > TMP=/tmp/.private/root > TMPDIR=/tmp/.private/root > # ls /tmp/.private/root > ls: cannot access /tmp/.private/root: No such file or directory > > Indeed. There are many ways to fool yourself. Try "env TMPDIR= chroot" next time. (In reply to comment #1) > > While performing rescue jobs in a chroot (changing rootfs type): > This is not a regular operation, right? It is one of operations when: - the stress is usually above usual; - weird diagnostics don't really help. > > # mkinitrd --help > > /sbin/mkinitrd: line 1557: cannot create temp file for here document: No such file or directory > > ls: cannot access /tmp/.private/root: No such file or directory > There are many ways to fool yourself. > Try "env TMPDIR= chroot" next time. I'll sure forget it 'till next time. Rather wanted to draw your attention to the fact that corner cases like this do matter; is it unreasonable to request that directory existence[/writability] check be performed before setting TMP/TMPDIR? Lets handle this issue in chroot(1). Thanks in advance! 6.11-alt1-2-gc4aa447 Your advance has arrived :-) |