From d957aff169f145f9c9c85c23266f1ed22ce8e279 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Thu, 1 Jun 2006 16:33:48 +0000 Subject: Relevant BUGIDs: Purpose of commit: new feature Commit summary: --------------- 2006-06-01 Thorsten Kukuk * 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 | 6 ++ NEWS | 3 +- configure.in | 4 + modules/pam_ftp/Makefile.am | 14 +++- modules/pam_ftp/README | 60 +++++++++++--- modules/pam_ftp/README.xml | 41 ++++++++++ modules/pam_ftp/pam_ftp.8 | 89 ++++++++++++++++++++ modules/pam_ftp/pam_ftp.8.xml | 185 ++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 386 insertions(+), 16 deletions(-) create mode 100644 modules/pam_ftp/README.xml create mode 100644 modules/pam_ftp/pam_ftp.8 create mode 100644 modules/pam_ftp/pam_ftp.8.xml diff --git a/ChangeLog b/ChangeLog index b9a131d8..a82a998f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-06-01 Thorsten Kukuk + * 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 47fb0f87..17c6aca3 100644 --- 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 diff --git a/configure.in b/configure.in index bb8532eb..263e996c 100644 --- a/configure.in +++ b/configure.in @@ -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) diff --git a/modules/pam_ftp/Makefile.am b/modules/pam_ftp/Makefile.am index 3f7fb6f9..e6d510a1 100644 --- a/modules/pam_ftp/Makefile.am +++ b/modules/pam_ftp/Makefile.am @@ -1,10 +1,13 @@ # -# Copyright (c) 2005 Thorsten Kukuk +# Copyright (c) 2005, 2006 Thorsten Kukuk # 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 + diff --git a/modules/pam_ftp/README b/modules/pam_ftp/README index 6d03330c..15f4130e 100644 --- a/modules/pam_ftp/README +++ b/modules/pam_ftp/README @@ -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 . -Thorsten Kukuk , 17. June 1999 diff --git a/modules/pam_ftp/README.xml b/modules/pam_ftp/README.xml new file mode 100644 index 00000000..65de28e3 --- /dev/null +++ b/modules/pam_ftp/README.xml @@ -0,0 +1,41 @@ + + +--> +]> + +
+ + + + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="pam_ftp.8.xml" xpointer='xpointer(//refnamediv[@id = "pam_ftp-name"]/*)'/> + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
diff --git a/modules/pam_ftp/pam_ftp.8 b/modules/pam_ftp/pam_ftp.8 new file mode 100644 index 00000000..63f62be9 --- /dev/null +++ b/modules/pam_ftp/pam_ftp.8 @@ -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 . diff --git a/modules/pam_ftp/pam_ftp.8.xml b/modules/pam_ftp/pam_ftp.8.xml new file mode 100644 index 00000000..b67ed182 --- /dev/null +++ b/modules/pam_ftp/pam_ftp.8.xml @@ -0,0 +1,185 @@ + + + + + + + pam_ftp + 8 + Linux-PAM Manual + + + + pam_ftp + PAM module for anonymous access module + + + + + pam_ftp.so + + debug + + + ignore + + + users=XXX,YYY, + + + + + + + DESCRIPTION + + + pam_ftp is a PAM module which provides a pluggable + anonymous ftp mode of access. + + + 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 + + + + + + + + + + Print debug information. + + + + + + + + + + + Pay no attention to the email address of the user + (if supplied). + + + + + + + + + + + Instead of ftp or + anonymous, provide anonymous login + to the comma separated list of users: + . + Should the applicant enter + one of these usernames the returned username is set to + the first in the list: XXX. + + + + + + + + + + + MODULE SERVICES PROVIDED + + Only the service is supported. + + + + + RETURN VALUES + + + + + PAM_SUCCESS + + + The authentication was successfull. + + + + + + PAM_USER_UNKNOWN + + + User not known. + + + + + + + + + + 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 + + + + + + SEE ALSO + + + pam.conf5 + , + + pam.d8 + , + + pam8 + + + + + + AUTHOR + + pam_ftp was written by Andrew G. Morgan <morgan@kernel.org>. + + + + + -- cgit v1.2.3