Ticket #1710: pam_console.diff

File pam_console.diff, 4.0 KB (added by dnicholson@…, 18 years ago)

First cut for Linux-PAM patch

  • postlfs/security/linux-pam.xml

     
    1111  <!ENTITY linux-pam-buildsize     "19.8 MB">
    1212  <!ENTITY linux-pam-time          "0.5 SBU">
    1313  <!ENTITY linux-pam-docs-download "http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-&linux-pam-version;-docs.tar.bz2">
     14  <!-- FIXME: Need more permanent location for pam-redhat -->
     15  <!ENTITY linux-pam-redhat-version  "0.99.5-1">
     16  <!ENTITY linux-pam-redhat-download "http://www.linuxfromscratch.org/~dnicholson/pam-redhat-&linux-pam-redhat-version;.tar.bz2">
    1417]>
    1518
    1619<sect1 id="linux-pam" xreflabel="Linux-PAM-&linux-pam-version;">
     
    6063    <bridgehead renderas="sect3">Additional Downloads</bridgehead>
    6164    <itemizedlist spacing='compact'>
    6265      <listitem>
     66        <para>Optional RedHat modules including pam_console:
     67        <ulink url="&linux-pam-redhat-download;"/></para>
     68      </listitem>
     69      <listitem>
    6370        <para>Optional documentation:
    6471        <ulink url="&linux-pam-docs-download;"/></para>
    6572      </listitem>
     
    94101
    95102<screen><userinput>tar -xf ../Linux-PAM-&linux-pam-version;-docs.tar.bz2 -C doc</userinput></screen>
    96103
     104    <para>RedHat develops a few external <application>Linux-PAM</application>
     105    modules. This includes the pam_console module which can be used by
     106    some programs such as <xref linkend="hal"/> and <xref
     107    linkend="gnome-volume-manager"/>. The purpose of pam_console is indicate
     108    which user is active at the console and take appropriate actions. It does
     109    this by noting active users in the <filename
     110    class='directory'>/var/run/console</filename> directory. If you
     111    downloaded these additional modules and would like to build pam_console,
     112    unpack the tarball from the root of the source tree and prepare the build
     113    files:</para>
     114
     115<screen><userinput>tar -xf ../pam-redhat-&linux-pam-redhat-version;.tar.bz2 &amp;&amp;
     116sed -i 's,modules/Makefile,&amp; modules/pam_console/Makefile,' \
     117    configure.in &amp;&amp;
     118sed -i 's/SUBDIRS =/&amp; pam_console/' modules/Makefile.am &amp;&amp;
     119sed -i '/^permsd_DATA/d' modules/pam_console/Makefile.am &amp;&amp;
     120autoreconf -v</userinput></screen>
     121
    97122    <para>Install <application>Linux-PAM</application> by
    98123    running the following commands:</para>
    99124
     
    142167  <sect2 role="commands">
    143168    <title>Command Explanations</title>
    144169
     170    <para><command>sed -i '/^permsd_DATA/d' modules/pam_console/Makefile.am</command>:
     171    The default configuration for pam_console is to change device permissions
     172    for users when it is determined who is the console user. However, the
     173    BLFS system expects that users will be members of the groups that the
     174    relevant devices are part of. This makes the device permission
     175    changing unnecessary, so the installation of a configuration file is
     176    suppressed.</para>
     177
    145178    <para><parameter>--libdir=/usr/lib</parameter>: This parameter results in
    146179    the libraries being installed in
    147180    <filename class='directory'>/usr/lib</filename>.</para>
     
    244277      url="http://www.kernel.org/pub/linux/libs/pam/modules.html"/>
    245278      for a list of various modules available.</para>
    246279
     280      <para>If you installed the pam_console module from RedHat, we would
     281      like to suppress the default actions taken to set device permissions
     282      since they are unnecessary for the BLFS system. Since we would only
     283      like to use the console locking actions in <filename
     284      class='directory'>/var/run/console</filename>, replace one of the
     285      configuration files with the following:</para>
     286
     287<screen><userinput>cat &gt; /etc/security/console.handlers &lt;&lt; "EOF"
     288<literal># Begin /etc/security/console.handlers
     289console consoledevs tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]\.[0-9] :[0-9]</literal>
     290EOF</userinput></screen>
     291
    247292      <important>
    248293        <para>You should now reinstall the <xref linkend="shadow"/>
    249294        package.</para>