]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs:
authorThorsten Kukuk <kukuk@thkukuk.de>
Thu, 1 Jun 2006 16:33:48 +0000 (16:33 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Thu, 1 Jun 2006 16:33:48 +0000 (16:33 +0000)
Purpose of commit: new feature

Commit summary:
---------------

2006-06-01  Thorsten Kukuk  <kukuk@thkukuk.de>

        * modules/pam_ftp/Makefile.am: Include Make.xml.rules.
        * modules/pam_ftp/pam_ftp.8.xml: New.
        * modules/pam_ftp/pam_ftp.8: New, generated from xml file.
        * modules/pam_ftp/README.xml: New.
        * modules/pam_ftp/README: Regenerated from xml file.

ChangeLog
NEWS
configure.in
modules/pam_ftp/Makefile.am
modules/pam_ftp/README
modules/pam_ftp/README.xml [new file with mode: 0644]
modules/pam_ftp/pam_ftp.8 [new file with mode: 0644]
modules/pam_ftp/pam_ftp.8.xml [new file with mode: 0644]

index b9a131d88016a245db7167f9b9c1bad48eaa6e1e..a82a998f32b0a12f3e562e16abf8aab2abc45743 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-06-01  Thorsten Kukuk  <kukuk@thkukuk.de>
 
+       * modules/pam_ftp/Makefile.am: Include Make.xml.rules.
+       * modules/pam_ftp/pam_ftp.8.xml: New.
+       * modules/pam_ftp/pam_ftp.8: New, generated from xml file.
+       * modules/pam_ftp/README.xml: New.
+       * modules/pam_ftp/README: Regenerated from xml file.
+
        * modules/pam_issue/Makefile.am: Include Make.xml.rules.
        * modules/pam_issue/pam_issue.8.xml: New.
        * modules/pam_issue/pam_issue.8: New, generated from xml file.
diff --git a/NEWS b/NEWS
index 47fb0f87d8a1655070ade62c7210906c6814134d..17c6aca3fc00cf4b249905fd7a2dae832a581759 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,7 +3,8 @@ Linux-PAM NEWS -- history of user-visible changes.
 
 * pam_tally: Fix support for large UIDs
 * Fixed all problems found by Coverity
-* Add manual page for pam_mkhomedir, pam_umask, pam_filter, pam_issue
+* Add manual page for pam_mkhomedir, pam_umask, pam_filter,
+  pam_issue, pam_ftp
 
 Release 0.99.4.0
 
index bb8532eb849703841e6712f46fec4101791a8710..263e996c6da4278764c8986c4ce577433f51fa78 100644 (file)
@@ -345,6 +345,10 @@ AC_CHECK_LIB([selinux],[getfilecon], LIBSELINUX="-lselinux", LIBSELINUX="")
 AC_SUBST(LIBSELINUX)
 AM_CONDITIONAL([HAVE_LIBSELINUX], [test ! -z "$LIBSELINUX"])
 
+dnl Check for xattr support
+AC_CHECK_HEADERS([sys/xattr.h])
+AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr)
+
 dnl Checks for Libcap
 AC_CHECK_LIB([cap], [cap_get_proc], LIBCAP="-lcap", LIBCAP="" )
 AC_SUBST(LIBCAP)
index 3f7fb6f90306e40e0a7f9158f9bfae0bfe44bae4..e6d510a125f952d927ade793df98ade877e2ae02 100644 (file)
@@ -1,10 +1,13 @@
 #
-# Copyright (c) 2005 Thorsten Kukuk <kukuk@suse.de>
+# Copyright (c) 2005, 2006 Thorsten Kukuk <kukuk@suse.de>
 #
 
 CLEANFILES = *~
 
-EXTRA_DIST = README tst-pam_ftp
+EXTRA_DIST = README $(MANS) $(XMLS) tst-pam_ftp
+
+man_MANS = pam_ftp.8
+XMLS = README.xml pam_ftp.8.xml
 
 securelibdir = $(SECUREDIR)
 secureconfdir = $(SCONFIGDIR)
@@ -19,3 +22,10 @@ endif
 securelib_LTLIBRARIES = pam_ftp.la
 
 TESTS = tst-pam_ftp
+
+if ENABLE_REGENERATE_MAN
+noinst_DATA = README
+README: pam_ftp.8.xml
+-include $(top_srcdir)/Make.xml.rules
+endif
+
index 6d03330c10ed6db9d78e117f8fb7b0190fda8d24..15f4130e381a49f48a0e5c50d1776db5915b552e 100644 (file)
@@ -1,18 +1,52 @@
-This is the README for pam_ftp
-------------------------------
+pam_ftp — PAM module for anonymous access module
 
-This module is an authentication module that does simple ftp
-authentication.
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
-Recognized arguments:
+DESCRIPTION
 
-       "debug"         print debug messages
-       "users="        comma separated list of users which
-                       could login only with email adress
-       "ignore"        allow invalid email adresses
+pam_ftp is a PAM module which provides a pluggable anonymous ftp mode of
+access.
 
-Options for:
-auth:  for authentication it provides pam_authenticate() and
-       pam_setcred() hooks.
+This module intercepts the user's name and password. If the name is ftp or
+anonymous, the user's password is broken up at the @ delimiter into a PAM_RUSER
+and a PAM_RHOST part; these pam-items being set accordingly. The username (
+PAM_USER) is set to ftp. In this case the module succeeds. Alternatively, the
+module sets the PAM_AUTHTOK item with the entered password and fails.
+
+This module is not safe and easily spoofable.
+
+OPTIONS
+
+debug
+
+    Print debug information.
+
+ignore
+
+    Pay no attention to the email address of the user (if supplied).
+
+ftp=XXX,YYY,...
+
+    Instead of ftp or anonymous, provide anonymous login to the comma separated
+    list of users: XXX,YYY,.... Should the applicant enter one of these
+    usernames the returned username is set to the first in the list: XXX.
+
+EXAMPLES
+
+Add the following line to /etc/pam.d/ftpd to handle ftp style anonymous login:
+
+#
+# ftpd; add ftp-specifics. These lines enable anonymous ftp over
+#       standard UN*X access (the listfile entry blocks access to
+#       users listed in /etc/ftpusers)
+#
+auth    sufficient  pam_ftp.so
+auth    required    pam_unix.so use_first_pass
+auth    required    pam_listfile.so \
+           onerr=succeed item=user sense=deny file=/etc/ftpusers
+
+
+AUTHOR
+
+pam_ftp was written by Andrew G. Morgan <morgan@kernel.org>.
 
-Thorsten Kukuk <kukuk@suse.de>, 17. June 1999
diff --git a/modules/pam_ftp/README.xml b/modules/pam_ftp/README.xml
new file mode 100644 (file)
index 0000000..65de28e
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+[
+<!--
+<!ENTITY pamaccess SYSTEM "pam_ftp.8.xml">
+-->
+]>
+
+<article>
+
+  <articleinfo>
+
+    <title>
+      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+      href="pam_ftp.8.xml" xpointer='xpointer(//refnamediv[@id = "pam_ftp-name"]/*)'/>
+    </title>
+
+  </articleinfo>
+
+  <section>
+    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+      href="pam_ftp.8.xml" xpointer='xpointer(//refsect1[@id = "pam_ftp-description"]/*)'/>
+  </section>
+
+  <section>
+    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+      href="pam_ftp.8.xml" xpointer='xpointer(//refsect1[@id = "pam_ftp-options"]/*)'/>
+  </section>
+
+  <section>
+    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+      href="pam_ftp.8.xml" xpointer='xpointer(//refsect1[@id = "pam_ftp-examples"]/*)'/>
+  </section>
+
+  <section>
+    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+      href="pam_ftp.8.xml" xpointer='xpointer(//refsect1[@id = "pam_ftp-author"]/*)'/>
+  </section>
+
+</article>
diff --git a/modules/pam_ftp/pam_ftp.8 b/modules/pam_ftp/pam_ftp.8
new file mode 100644 (file)
index 0000000..63f62be
--- /dev/null
@@ -0,0 +1,89 @@
+.\" ** You probably do not want to edit this file directly **
+.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
+.\" Instead of manually editing it, you probably should edit the DocBook XML
+.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
+.TH "PAM_FTP" "8" "06/01/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
+pam_ftp \- PAM module for anonymous access module
+.SH "SYNOPSIS"
+.HP 11
+\fBpam_ftp.so\fR [debug] [ignore] [users=\fIXXX,YYY,\fR...]
+.SH "DESCRIPTION"
+.PP
+pam_ftp is a PAM module which provides a pluggable anonymous ftp mode of access.
+.PP
+This module intercepts the user's name and password. If the name is
+\fIftp\fR
+or
+\fIanonymous\fR, the user's password is broken up at the
+\fI@\fR
+delimiter into a
+\fIPAM_RUSER\fR
+and a
+\fIPAM_RHOST\fR
+part; these pam\-items being set accordingly. The username (\fIPAM_USER\fR) is set to
+\fIftp\fR. In this case the module succeeds. Alternatively, the module sets the
+\fIPAM_AUTHTOK\fR
+item with the entered password and fails.
+.PP
+This module is not safe and easily spoofable.
+.SH "OPTIONS"
+.PP
+.TP
+\fBdebug\fR
+Print debug information.
+.TP
+\fBignore\fR
+Pay no attention to the email address of the user (if supplied).
+.TP
+\fBftp=\fR\fB\fIXXX,YYY,...\fR\fR
+Instead of
+\fIftp\fR
+or
+\fIanonymous\fR, provide anonymous login to the comma separated list of users:
+\fB\fIXXX,YYY,...\fR\fR. Should the applicant enter one of these usernames the returned username is set to the first in the list:
+\fIXXX\fR.
+.SH "MODULE SERVICES PROVIDED"
+.PP
+Only the
+\fBauth\fR
+service is supported.
+.SH "RETURN VALUES"
+.PP
+.TP
+PAM_SUCCESS
+The authentication was successfull.
+.TP
+PAM_USER_UNKNOWN
+User not known.
+.SH "EXAMPLES"
+.PP
+Add the following line to
+\fI/etc/pam.d/ftpd\fR
+to handle ftp style anonymous login:
+.sp
+.nf
+#
+# ftpd; add ftp\-specifics. These lines enable anonymous ftp over
+#       standard UN*X access (the listfile entry blocks access to
+#       users listed in /etc/ftpusers)
+#
+auth    sufficient  pam_ftp.so
+auth    required    pam_unix.so use_first_pass
+auth    required    pam_listfile.so \\
+           onerr=succeed item=user sense=deny file=/etc/ftpusers
+      
+.fi
+.sp
+.SH "SEE ALSO"
+.PP
+\fBpam.conf\fR(5),
+\fBpam.d\fR(8),
+\fBpam\fR(8)
+.SH "AUTHOR"
+.PP
+pam_ftp was written by Andrew G. Morgan <morgan@kernel.org>.
diff --git a/modules/pam_ftp/pam_ftp.8.xml b/modules/pam_ftp/pam_ftp.8.xml
new file mode 100644 (file)
index 0000000..b67ed18
--- /dev/null
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+       "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<refentry id="pam_ftp">
+
+  <refmeta>
+    <refentrytitle>pam_ftp</refentrytitle>
+    <manvolnum>8</manvolnum>
+    <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
+  </refmeta>
+
+  <refnamediv id="pam_ftp-name">
+    <refname>pam_ftp</refname>
+    <refpurpose>PAM module for anonymous access module</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <cmdsynopsis id="pam_ftp-cmdsynopsis">
+      <command>pam_ftp.so</command>
+      <arg choice="opt">
+       debug
+      </arg>
+      <arg choice="opt">
+        ignore
+      </arg>
+      <arg choice="opt" rep='repeat'>
+        users=<replaceable>XXX,YYY,</replaceable>
+      </arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1 id="pam_ftp-description">
+
+    <title>DESCRIPTION</title>
+
+    <para>
+      pam_ftp is a PAM module which provides a pluggable
+      anonymous ftp mode of access.
+    </para>
+    <para>
+      This module intercepts the user's name and password. If the name is
+      <emphasis>ftp</emphasis> or <emphasis>anonymous</emphasis>, the
+      user's password is broken up at the <emphasis>@</emphasis> delimiter
+      into a <emphasis>PAM_RUSER</emphasis> and a
+      <emphasis>PAM_RHOST</emphasis> part; these pam-items being set
+      accordingly. The username (<emphasis>PAM_USER</emphasis>) is set
+      to <emphasis>ftp</emphasis>.  In this case the module succeeds.
+      Alternatively, the module sets the <emphasis>PAM_AUTHTOK</emphasis>
+      item with the entered password and fails.
+    </para>
+    <para>
+      This module is not safe and easily spoofable.
+    </para>
+  </refsect1>
+
+  <refsect1 id="pam_ftp-options">
+
+    <title>OPTIONS</title>
+    <para>
+      <variablelist>
+
+        <varlistentry>
+          <term>
+            <option>debug</option>
+          </term>
+          <listitem>
+            <para>
+             Print debug information.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term>
+            <option>ignore</option>
+          </term>
+          <listitem>
+            <para>
+              Pay no attention to the email address of the user
+              (if supplied).
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term>
+            <option>ftp=<replaceable>XXX,YYY,...</replaceable></option>
+          </term>
+          <listitem>
+            <para>
+              Instead of <emphasis>ftp</emphasis> or
+              <emphasis>anonymous</emphasis>, provide anonymous login
+              to the comma separated list of users:
+              <option><replaceable>XXX,YYY,...</replaceable></option>.
+              Should the applicant enter
+              one of these usernames the returned username is set to
+              the first in the list: <emphasis>XXX</emphasis>.
+            </para>
+          </listitem>
+       </varlistentry>
+
+      </variablelist>
+
+    </para>
+  </refsect1>
+
+  <refsect1 id="pam_ftp-services">
+    <title>MODULE SERVICES PROVIDED</title>
+    <para>
+      Only the <option>auth</option> service is supported.
+    </para>
+  </refsect1>
+
+  <refsect1 id='pam_ftp-return_values'>
+    <title>RETURN VALUES</title>
+    <para>
+      <variablelist>
+
+        <varlistentry>
+          <term>PAM_SUCCESS</term>
+          <listitem>
+            <para>
+              The authentication was successfull.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term>PAM_USER_UNKNOWN</term>
+          <listitem>
+            <para>
+             User not known.
+            </para>
+          </listitem>
+        </varlistentry>
+
+      </variablelist>
+    </para>
+  </refsect1>
+
+  <refsect1 id='pam_ftp-examples'>
+    <title>EXAMPLES</title>
+    <para>
+      Add the following line to <filename>/etc/pam.d/ftpd</filename> to
+      handle ftp style anonymous login:
+      <programlisting>
+#
+# ftpd; add ftp-specifics. These lines enable anonymous ftp over
+#       standard UN*X access (the listfile entry blocks access to
+#       users listed in /etc/ftpusers)
+#
+auth    sufficient  pam_ftp.so
+auth    required    pam_unix.so use_first_pass
+auth    required    pam_listfile.so \
+           onerr=succeed item=user sense=deny file=/etc/ftpusers
+      </programlisting>
+    </para>
+  </refsect1>
+
+  <refsect1 id='pam_ftp-see_also'>
+    <title>SEE ALSO</title>
+    <para>
+      <citerefentry>
+       <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
+      </citerefentry>,
+      <citerefentry>
+       <refentrytitle>pam.d</refentrytitle><manvolnum>8</manvolnum>
+      </citerefentry>,
+      <citerefentry>
+       <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
+      </citerefentry>
+    </para>
+  </refsect1>
+
+  <refsect1 id='pam_ftp-author'>
+    <title>AUTHOR</title>
+      <para>
+        pam_ftp was written by Andrew G. Morgan &lt;morgan@kernel.org&gt;.
+      </para>
+  </refsect1>
+
+</refentry>
+<!-- vim: sw=2
+-->