Changeset 8006

Show
Ignore:
Timestamp:
04/03/07 06:21:48 (2 years ago)
Author:
jhuntwork
Message:

Install su from coreutils in chapter 5 as su-tools. Use su-tools to run test suites from coreutils and bash as user nobody. Fixes #1877

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/BOOK/chapter01/changelog.xml

    r7998 r8006  
    3636    </listitem> 
    3737--> 
     38 
     39    <listitem> 
     40      <para>2007-04-03</para> 
     41      <itemizedlist> 
     42        <listitem> 
     43          <para>[jhuntwork] - Install su from coreutils in chapter 5 as su-tools. 
     44          Use su-tools to run test suites from coreutils and bash as user nobody. 
     45          Fixes #1877.</para> 
     46        </listitem> 
     47      </itemizedlist> 
     48    </listitem> 
     49 
    3850    <listitem> 
    3951      <para>2007-04-01</para> 
  • trunk/BOOK/chapter05/coreutils.xml

    r7970 r8006  
    5757<screen><userinput>make install</userinput></screen> 
    5858 
     59    <para>The above command refuses to install <filename>su</filename> 
     60    because it cannot install it setuid root as a non-privileged user. By 
     61    manually installing it with a different name, we can use it for running 
     62    tests in the final system as a non-privileged user and we keep a possibly 
     63    useful <command>su</command> from our host first place in our PATH. Install 
     64    it with:</para> 
     65 
     66<screen><userinput>cp -v src/su /tools/bin/su-tools</userinput></screen> 
     67 
    5968  </sect2> 
    6069 
  • trunk/BOOK/chapter06/bash.xml

    r7970 r8006  
    7171<screen><userinput>make</userinput></screen> 
    7272 
    73     <para>To test the results, issue: 
    74     <userinput>make tests</userinput>.</para> 
     73    <para>To test the results, issue:</para> 
     74 
     75<screen><userinput>chown -Rv nobody ./ 
     76su-tools nobody -s /bin/bash -c "make tests"</userinput></screen> 
    7577 
    7678    <para>Install the package:</para> 
  • trunk/BOOK/chapter06/coreutils.xml

    r7970 r8006  
    7373<screen><userinput>make</userinput></screen> 
    7474 
    75     <para>The test suite of Coreutils makes several assumptions about the 
    76     presence of system users and groups that are not valid within the minimal 
    77     environment that exists at the moment. Therefore, additional items need 
    78     to be set up before running the tests. Skip down to <quote>Install the 
     75    <para>Skip down to <quote>Install the 
    7976    package</quote> if not running the test suite.</para> 
    80  
    81     <para>Create two dummy groups and a dummy user:</para> 
    82  
    83 <screen><userinput>echo "dummy1:x:1000:" &gt;&gt; /etc/group 
    84 echo "dummy2:x:1001:dummy" &gt;&gt; /etc/group 
    85 echo "dummy:x:1000:1000::/root:/bin/bash" &gt;&gt; /etc/passwd</userinput></screen> 
    8677 
    8778    <para>Now the test suite is ready to be run. First, run the tests that are 
    8879    meant to be run as user <systemitem class="username">root</systemitem>:</para> 
    8980 
    90 <screen><userinput>make NON_ROOT_USERNAME=dummy check-root</userinput></screen> 
     81<screen><userinput>make NON_ROOT_USERNAME=nobody check-root</userinput></screen> 
    9182 
    9283    <para>Then run the remainder of the tests as the 
    93     <systemitem class="username">dummy</systemitem> user:</para> 
    94  
    95 <screen><userinput>src/su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen> 
    96  
    97     <para>When testing is complete, remove the dummy user and groups:</para> 
    98  
    99 <screen><userinput>sed -i '/dummy/d' /etc/passwd /etc/group</userinput></screen> 
     84    <systemitem class="username">nobody</systemitem> user:</para> 
     85 
     86<screen><userinput>su-tools nobody -s /bin/bash -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen> 
    10087 
    10188    <para>Install the package:</para> 
  • trunk/BOOK/general.ent

    r7998 r8006  
    11<?xml version="1.0" encoding="ISO-8859-1"?> 
    2 <!ENTITY version "SVN-20070401"> 
    3 <!ENTITY releasedate "April 1, 2007"> 
     2<!ENTITY version "SVN-20070403"> 
     3<!ENTITY releasedate "April 3, 2007"> 
    44<!ENTITY milestone "6.3"> 
    55<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->