<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>16024</bug_id>
          
          <creation_ts>2008-06-14 17:58:06 +0400</creation_ts>
          <short_desc>chroot should clear TMPDIR environment variable</short_desc>
          <delta_ts>2021-05-13 12:24:28 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>coreutils</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.altlinux.org/show_bug.cgi?id=40041</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Shigorin">mike</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72352</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2008-06-14 17:58:06 +0400</bug_when>
    <thetext>While performing rescue jobs in a chroot (changing rootfs type):

# 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72354</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2008-06-14 18:07:42 +0400</bug_when>
    <thetext>(In reply to comment #0)
&gt; While performing rescue jobs in a chroot (changing rootfs type):

This is not a regular operation, right?

&gt; # mkinitrd --help
&gt; /sbin/mkinitrd: line 1557: cannot create temp file for here document: No such file or directory
&gt; 
&gt; # set | grep T.*MP
&gt; TMP=/tmp/.private/root
&gt; TMPDIR=/tmp/.private/root
&gt; # ls /tmp/.private/root
&gt; ls: cannot access /tmp/.private/root: No such file or directory
&gt; 
&gt; Indeed.

There are many ways to fool yourself.
Try &quot;env TMPDIR= chroot&quot; next time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72370</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2008-06-14 22:33:20 +0400</bug_when>
    <thetext>(In reply to comment #1)
&gt; &gt; While performing rescue jobs in a chroot (changing rootfs type):
&gt; This is not a regular operation, right?
It is one of operations when:
- the stress is usually above usual;
- weird diagnostics don&apos;t really help.

&gt; &gt; # mkinitrd --help
&gt; &gt; /sbin/mkinitrd: line 1557: cannot create temp file for here document: No such file or directory
&gt; &gt; ls: cannot access /tmp/.private/root: No such file or directory
&gt; There are many ways to fool yourself.
&gt; Try &quot;env TMPDIR= chroot&quot; next time.
I&apos;ll sure forget it &apos;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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72375</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2008-06-14 23:36:11 +0400</bug_when>
    <thetext>Lets handle this issue in chroot(1).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72382</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2008-06-15 12:05:21 +0400</bug_when>
    <thetext>Thanks in advance!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76626</commentid>
    <comment_count>5</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2008-08-30 03:26:54 +0400</bug_when>
    <thetext>6.11-alt1-2-gc4aa447</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76735</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2008-09-01 01:02:56 +0400</bug_when>
    <thetext>Your advance has arrived :-)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>