<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>672</bug_id>
          
          <creation_ts>2011-01-27 19:20:06 +0000</creation_ts>
          <short_desc>[LTP]PATH contain ending colon for root user</short_desc>
          <delta_ts>2011-02-15 16:36:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kevin Tian">kevin.tian</reporter>
          <assigned_to name="Kevin Tian">kevin.tian</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          <cf_verified>Program Management</cf_verified>
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11549</commentid>
    <comment_count>0</comment_count>
    <who name="Kevin Tian">kevin.tian</who>
    <bug_when>2011-01-27 19:20:06 +0000</bug_when>
    <thetext>now the PATH for root user defined in a problematic way
        PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:

    from eglibc:
        /* Two adjacent colons, or a colon at the beginning or the end
           of `PATH&apos; means to search the current directory.  */

    that means current directory is always searched as the last path,
    which could generate undesired behavior.

    One example is found in LTP cron_deny01 test, which always complains
        &quot;sh: cron_deny01 not found&quot;

    cron_deny01 is a shell script which setups the initial test preparation
    and then invokes itself for real test under a different user:
        su $TEST_USER1 -c &quot;$0&quot;

    &apos;su&apos; doesn&apos;t inherit PATH into the sub-shell, and thus $0 has to
    be an absolute path to have right script found.

    ltp appends the path of cron_deny01 to $PATH before running the test:
        export PATH=&quot;${PATH}:${LTPROOT}/testcases/bin&quot;

    In ideal way &quot;${LTPROOT}/testcases/bin/cron_deny01&quot; is found and becomes
    $0, which works well.

    However due to the ending colon in original PATH:
        PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin::${LTPROOT}/testcases/bin
    $0 becomes &apos;cron_deny01&apos; w/o leading path which makes sub-shell under &apos;su&apos;
    failed to locate cron_deny01.

    remove ending colon can fixes this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11598</commentid>
    <comment_count>1</comment_count>
    <who name="Kevin Tian">kevin.tian</who>
    <bug_when>2011-01-30 00:50:14 +0000</bug_when>
    <thetext>fixed by http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=abc25cb88570bf54d3bb518b5083402894cca061</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11599</commentid>
    <comment_count>2</comment_count>
    <who name="Kevin Tian">kevin.tian</who>
    <bug_when>2011-01-30 00:50:29 +0000</bug_when>
    <thetext>verified</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>