From 0fe6ff3ef4d45d8c16e89d4505cdc5857e133299 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Fri, 9 Jun 2006 18:18:43 +0000 Subject: Relevant BUGIDs: Purpose of commit: new feature Commit summary: --------------- 2006-06-09 Thorsten Kukuk * modules/pam_time/Makefile.am: Include Make.xml.rules. * modules/pam_time/time.conf.5: New, generated from xml file. * modules/pam_time/time.conf.5.xml: New. * modules/pam_time/pam_time.8: New, generated from xml file. * modules/pam_time/pam_time.8.xml: New. * modules/pam_time/README.xml: New. * modules/pam_time/README: Regenerated from README.xml. --- ChangeLog | 8 ++ NEWS | 3 +- modules/pam_group/group.conf.5 | 10 +-- modules/pam_group/group.conf.5.xml | 6 +- modules/pam_time/Makefile.am | 11 ++- modules/pam_time/README | 45 +++++------ modules/pam_time/README.xml | 34 +++++++++ modules/pam_time/pam_time.8 | 72 ++++++++++++++++++ modules/pam_time/pam_time.8.xml | 148 +++++++++++++++++++++++++++++++++++++ modules/pam_time/time.conf.5 | 92 +++++++++++++++++++++++ modules/pam_time/time.conf.5.xml | 143 +++++++++++++++++++++++++++++++++++ 11 files changed, 541 insertions(+), 31 deletions(-) create mode 100644 modules/pam_time/README.xml create mode 100644 modules/pam_time/pam_time.8 create mode 100644 modules/pam_time/pam_time.8.xml create mode 100644 modules/pam_time/time.conf.5 create mode 100644 modules/pam_time/time.conf.5.xml diff --git a/ChangeLog b/ChangeLog index 39d0c520..8bbaf0b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2006-06-09 Thorsten Kukuk + * modules/pam_time/Makefile.am: Include Make.xml.rules. + * modules/pam_time/time.conf.5: New, generated from xml file. + * modules/pam_time/time.conf.5.xml: New. + * modules/pam_time/pam_time.8: New, generated from xml file. + * modules/pam_time/pam_time.8.xml: New. + * modules/pam_time/README.xml: New. + * modules/pam_time/README: Regenerated from README.xml. + * modules/pam_wheel/Makefile.am: Include Make.xml.rules. * modules/pam_wheel/pam_wheel.8.xml: New. * modules/pam_wheel/pam_wheel.8: New, generated from xml file. diff --git a/NEWS b/NEWS index d6466810..5cccd162 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,8 @@ Linux-PAM NEWS -- history of user-visible changes. * Add manual page for pam_mkhomedir, pam_umask, pam_filter, pam_issue, pam_ftp, pam_group, pam_lastlog, pam_listfile, pam_localuser, pam_mail, pam_motd, pam_nologin, pam_permit, - pam_rootok, pam_securetty, pam_shells, pam_userdb, pam_warn + pam_rootok, pam_securetty, pam_shells, pam_userdb, pam_warn, + pam_time Release 0.99.4.0 diff --git a/modules/pam_group/group.conf.5 b/modules/pam_group/group.conf.5 index 204a9749..3c597c7c 100644 --- a/modules/pam_group/group.conf.5 +++ b/modules/pam_group/group.conf.5 @@ -1,11 +1,11 @@ .\" Title: group.conf .\" Author: .\" Generator: DocBook XSL Stylesheets v1.70.1 -.\" Date: 06/02/2006 +.\" Date: 06/09/2006 .\" Manual: Linux\-PAM Manual .\" Source: Linux\-PAM Manual .\" -.TH "GROUP.CONF" "5" "06/02/2006" "Linux\-PAM Manual" "Linux\-PAM Manual" +.TH "GROUP.CONF" "5" "06/09/2006" "Linux\-PAM Manual" "Linux\-PAM Manual" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -17,7 +17,7 @@ group.conf \- configuration file for the pam_group module The pam_group PAM module does not authenticate the user, but instead it grants group memberships (in the credential setting phase of the authentication module) to the user. Such memberships are based on the service they are applying for. .PP For this module to function correctly there must be a correctly formatted -\fI/etc/security/groups.conf\fR +\fI/etc/security/group.conf\fR file present. White spaces are ignored and lines maybe extended with '\\' (escaped newlines). Text following a '#' is ignored to the end of the line. .PP The syntax of the lines is as follows: @@ -41,9 +41,9 @@ For these items the simple wildcard '*' may be used only once. With netgroups no .PP The \fItimes\fR -field is used to indicate "when" these groups are to be given to the user. The format here is a logic list of day/time\-range entries the days are specified by a sequence of two character entries, MoTuSa for example is Monday Tuesday and Saturday. Note that repeated days are unset MoMo = no day, and MoWk = all weekdays bar Monday. The two character combinations accepted are Mo Tu We Th Fr Sa Su Wk Wd Al, the last two being week\-end days and all 7 days of the week respectively. As a final example, AlFr means all days except Friday. +field is used to indicate "when" these groups are to be given to the user. The format here is a logic list of day/time\-range entries. The days are specified by a sequence of two character entries, MoTuSa for example is Monday Tuesday and Saturday. Note that repeated days are unset MoMo = no day, and MoWk = all weekdays bar Monday. The two character combinations accepted are Mo Tu We Th Fr Sa Su Wk Wd Al, the last two being week\-end days and all 7 days of the week respectively. As a final example, AlFr means all days except Friday. .PP -Each day/time\-range can be prefixed with a '!' to indicate "anything but". The time\-range part is two 24\-hour times HHMM separated by a hyphen indicating the start and finish time (if the finish time is smaller than the start time it is deemed to apply on the following day). +Each day/time\-range can be prefixed with a '!' to indicate "anything but". The time\-range part is two 24\-hour times HHMM, separated by a hyphen, indicating the start and finish time (if the finish time is smaller than the start time it is deemed to apply on the following day). .PP The \fIgroups\fR diff --git a/modules/pam_group/group.conf.5.xml b/modules/pam_group/group.conf.5.xml index 036efb15..7cab1d49 100644 --- a/modules/pam_group/group.conf.5.xml +++ b/modules/pam_group/group.conf.5.xml @@ -26,7 +26,7 @@ For this module to function correctly there must be a correctly - formatted /etc/security/groups.conf file present. + formatted /etc/security/group.conf file present. White spaces are ignored and lines maybe extended with '\' (escaped newlines). Text following a '#' is ignored to the end of the line. @@ -64,7 +64,7 @@ The times field is used to indicate "when" these groups are to be given to the user. The format here is a logic - list of day/time-range entries the days are specified by a sequence of + list of day/time-range entries. The days are specified by a sequence of two character entries, MoTuSa for example is Monday Tuesday and Saturday. Note that repeated days are unset MoMo = no day, and MoWk = all weekdays bar Monday. The two character combinations accepted are Mo Tu We Th Fr Sa @@ -73,7 +73,7 @@ Each day/time-range can be prefixed with a '!' to indicate "anything but". - The time-range part is two 24-hour times HHMM separated by a hyphen + The time-range part is two 24-hour times HHMM, separated by a hyphen, indicating the start and finish time (if the finish time is smaller than the start time it is deemed to apply on the following day). diff --git a/modules/pam_time/Makefile.am b/modules/pam_time/Makefile.am index 2c77b54a..6c5ae3a2 100644 --- a/modules/pam_time/Makefile.am +++ b/modules/pam_time/Makefile.am @@ -4,7 +4,10 @@ CLEANFILES = *~ -EXTRA_DIST = README time.conf tst-pam_time +EXTRA_DIST = README $(MANS) $(XMLS) time.conf tst-pam_time + +man_MANS = time.conf.5 pam_time.8 +XMLS = README.xml time.conf.5.xml pam_time.8.xml TESTS = tst-pam_time @@ -21,3 +24,9 @@ endif securelib_LTLIBRARIES = pam_time.la secureconf_DATA = time.conf + +if ENABLE_REGENERATE_MAN +noinst_DATA = README +README: pam_time.8.xml time.conf.5.xml +-include $(top_srcdir)/Make.xml.rules +endif diff --git a/modules/pam_time/README b/modules/pam_time/README index 38b2b3e6..abafd936 100644 --- a/modules/pam_time/README +++ b/modules/pam_time/README @@ -1,30 +1,33 @@ -$Id$ +pam_time — PAM module for time control access -This is a help file for the pam_time module. It explains the need for -pam_time and also the syntax of the /etc/security/time.conf file. -[a lot of the syntax is freely adapted from the porttime file of the -shadow suite.] +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -1. Introduction -=============== +DESCRIPTION -It is desirable to restrict access to a system and or specific -applications at various times of the day and on specific days or over -various terminal lines. +The pam_time PAM module does not authenticate the user, but instead it +restricts access to a system and or specific applications at various times of +the day and on specific days or over various terminal lines. This module can be +configured to deny access to (individual) users based on their name, the time +of day, the day of week, the service they are applying for and their terminal +from which they are making their request. -The pam_time module is intended to offer a configurable module that -satisfies this purpose, within the context of Linux-PAM. +By default rules for time/port access are taken from config file /etc/security/ +time.conf. -2. the /etc/security/time.conf file -=================================== +EXAMPLES -This file is the configuration script for defining time/port access -control to the system/applications. +These are some example lines which might be specified in /etc/security/ +time.conf. -Its syntax is described in the sample ./time.conf provided in this -directory. +All users except for root are denied access to console-login at all times: + +login ; tty* & !ttyp* ; !root ; !Al0000-2400 + + +Games (configured to use PAM) are only to be accessed out of working hours. +This rule does not apply to the user waster: + + +games ; * ; !waster ; Wd0000-2400 | Wk1800-0800 -unrecognised rules are ignored (but an error is logged to syslog(3)) --------------------- -Bugs to Andrew or the list diff --git a/modules/pam_time/README.xml b/modules/pam_time/README.xml new file mode 100644 index 00000000..6c11eec1 --- /dev/null +++ b/modules/pam_time/README.xml @@ -0,0 +1,34 @@ + + +--> + +]> + +
+ + + + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="pam_time.8.xml" xpointer='xpointer(//refnamediv[@id = "pam_time-name"]/*)'/> + + + + +
+ +
+ +
+ +
+ +
diff --git a/modules/pam_time/pam_time.8 b/modules/pam_time/pam_time.8 new file mode 100644 index 00000000..58b94ec6 --- /dev/null +++ b/modules/pam_time/pam_time.8 @@ -0,0 +1,72 @@ +.\" Title: pam_time +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.70.1 +.\" Date: 06/09/2006 +.\" Manual: Linux\-PAM Manual +.\" Source: Linux\-PAM Manual +.\" +.TH "PAM_TIME" "8" "06/09/2006" "Linux\-PAM Manual" "Linux\-PAM Manual" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +pam_time \- PAM module for time control access +.SH "SYNOPSIS" +.HP 12 +\fBpam_time.so\fR +.SH "DESCRIPTION" +.PP +The pam_time PAM module does not authenticate the user, but instead it restricts access to a system and or specific applications at various times of the day and on specific days or over various terminal lines. This module can be configured to deny access to (individual) users based on their name, the time of day, the day of week, the service they are applying for and their terminal from which they are making their request. +.PP +By default rules for time/port access are taken from config file +\fI/etc/security/time.conf\fR. +.SH "OPTIONS" +.PP +This module does not recognice any options. +.SH "MODULE SERVICES PROVIDED" +.PP +Only the +\fBaccount\fR +service is supported. +.SH "RETURN VALUES" +.TP 3n +PAM_SUCCESS +Access was granted. +.TP 3n +PAM_ABORT +Not all relevant data could be gotten. +.TP 3n +PAM_BUF_ERR +Memory buffer error. +.TP 3n +PAM_PERM_DENIED +Access was not granted. +.TP 3n +PAM_USER_UNKNOWN +The user is not known to the system. +.SH "FILES" +.TP 3n +\fI/etc/security/time.conf\fR +Default configuration file +.SH "EXAMPLES" +.sp +.RS 3n +.nf +#%PAM\-1.0 +# +# apply pam_time accounting to login requests +# +login account required pam_time.so + +.fi +.RE +.SH "SEE ALSO" +.PP + +\fBtime.conf\fR(5), +\fBpam.d\fR(8), +\fBpam\fR(8). +.SH "AUTHORS" +.PP +pam_time was written by Andrew G. Morgan . diff --git a/modules/pam_time/pam_time.8.xml b/modules/pam_time/pam_time.8.xml new file mode 100644 index 00000000..da245ed0 --- /dev/null +++ b/modules/pam_time/pam_time.8.xml @@ -0,0 +1,148 @@ + + + + + + + pam_time + 8 + Linux-PAM Manual + + + + pam_time + + PAM module for time control access + + + + + + + + pam_time.so + + + + + + DESCRIPTION + + The pam_time PAM module does not authenticate the user, but instead + it restricts access to a system and or specific applications at + various times of the day and on specific days or over various + terminal lines. This module can be configured to deny access to + (individual) users based on their name, the time of day, the day of + week, the service they are applying for and their terminal from which + they are making their request. + + + By default rules for time/port access are taken from config file + /etc/security/time.conf. + + + + + OPTIONS + This module does not recognice any options. + + + + MODULE SERVICES PROVIDED + + Only the service is supported. + + + + + RETURN VALUES + + + PAM_SUCCESS + + + Access was granted. + + + + + PAM_ABORT + + + Not all relevant data could be gotten. + + + + + PAM_BUF_ERR + + + Memory buffer error. + + + + + PAM_PERM_DENIED + + + Access was not granted. + + + + + PAM_USER_UNKNOWN + + + The user is not known to the system. + + + + + + + + FILES + + + /etc/security/time.conf + + Default configuration file + + + + + + + EXAMPLES + +#%PAM-1.0 +# +# apply pam_time accounting to login requests +# +login account required pam_time.so + + + + + SEE ALSO + + + time.conf5 + , + + pam.d8 + , + + pam8 + . + + + + + AUTHORS + + pam_time was written by Andrew G. Morgan <morgan@kernel.org>. + + + diff --git a/modules/pam_time/time.conf.5 b/modules/pam_time/time.conf.5 new file mode 100644 index 00000000..e610821d --- /dev/null +++ b/modules/pam_time/time.conf.5 @@ -0,0 +1,92 @@ +.\" Title: time.conf +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.70.1 +.\" Date: 06/09/2006 +.\" Manual: Linux\-PAM Manual +.\" Source: Linux\-PAM Manual +.\" +.TH "TIME.CONF" "5" "06/09/2006" "Linux\-PAM Manual" "Linux\-PAM Manual" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +time.conf \- configuration file for the pam_time module +.SH "DESCRIPTION" +.PP +The pam_time PAM module does not authenticate the user, but instead it restricts access to a system and or specific applications at various times of the day and on specific days or over various terminal lines. This module can be configured to deny access to (individual) users based on their name, the time of day, the day of week, the service they are applying for and their terminal from which they are making their request. +.PP +For this module to function correctly there must be a correctly formatted +\fI/etc/security/time.conf\fR +file present. White spaces are ignored and lines maybe extended with '\\' (escaped newlines). Text following a '#' is ignored to the end of the line. +.PP +The syntax of the lines is as follows: +.PP + +\fIservices\fR;\fIttys\fR;\fIusers\fR;\fItimes\fR +.PP +In words, each rule occupies a line, terminated with a newline or the beginning of a comment; a '\fB#\fR'. It contains four fields separated with semicolons, '\fB;\fR'. +.PP +The first field, the +\fIservices\fR +field, is a logic list of PAM service names that the rule applies to. +.PP +The second field, the +\fItty\fR +field, is a logic list of terminal names that this rule applies to. +.PP +The third field, the +\fIusers\fR +field, is a logic list of users or a netgroup of users to whom this rule applies. +.PP +For these items the simple wildcard '*' may be used only once. With netgroups no wildcards or logic operators are allowed. +.PP +The +\fItimes\fR +field is used to indicate the times at which this rule applies. The format here is a logic list of day/time\-range entries. The days are specified by a sequence of two character entries, MoTuSa for example is Monday Tuesday and Saturday. Note that repeated days are unset MoMo = no day, and MoWk = all weekdays bar Monday. The two character combinations accepted are Mo Tu We Th Fr Sa Su Wk Wd Al, the last two being week\-end days and all 7 days of the week respectively. As a final example, AlFr means all days except Friday. +.PP +Each day/time\-range can be prefixed with a '!' to indicate "anything but". The time\-range part is two 24\-hour times HHMM, separated by a hyphen, indicating the start and finish time (if the finish time is smaller than the start time it is deemed to apply on the following day). +.PP +For a rule to be active, ALL of service+ttys+users must be satisfied by the applying process. +.PP +Note, currently there is no daemon enforcing the end of a session. This needs to be remedied. +.PP +Poorly formatted rules are logged as errors using +\fBsyslog\fR(3). +.SH "EXAMPLES" +.PP +These are some example lines which might be specified in +\fI/etc/security/time.conf\fR. +.PP +All users except for +\fIroot\fR +are denied access to console\-login at all times: +.sp +.RS 3n +.nf +login ; tty* & !ttyp* ; !root ; !Al0000\-2400 + +.fi +.RE +.sp +.PP +Games (configured to use PAM) are only to be accessed out of working hours. This rule does not apply to the user +\fIwaster\fR: +.sp +.RS 3n +.nf + +games ; * ; !waster ; Wd0000\-2400 | Wk1800\-0800 + +.fi +.RE +.sp +.SH "SEE ALSO" +.PP + +\fBpam_time\fR(8), +\fBpam.d\fR(5), +\fBpam\fR(8) +.SH "AUTHORS" +.PP +pam_time was written by Andrew G. Morgan . diff --git a/modules/pam_time/time.conf.5.xml b/modules/pam_time/time.conf.5.xml new file mode 100644 index 00000000..08abb53b --- /dev/null +++ b/modules/pam_time/time.conf.5.xml @@ -0,0 +1,143 @@ + + + + + + + time.conf + 5 + Linux-PAM Manual + + + + time.conf + configuration file for the pam_time module + + + + DESCRIPTION + + + The pam_time PAM module does not authenticate the user, but instead + it restricts access to a system and or specific applications at + various times of the day and on specific days or over various + terminal lines. This module can be configured to deny access to + (individual) users based on their name, the time of day, the day of + week, the service they are applying for and their terminal from which + they are making their request. + + + For this module to function correctly there must be a correctly + formatted /etc/security/time.conf file present. + White spaces are ignored and lines maybe extended with '\' (escaped + newlines). Text following a '#' is ignored to the end of the line. + + + + The syntax of the lines is as follows: + + + + services;ttys;users;times + + + In words, each rule occupies a line, terminated with a newline + or the beginning of a comment; a '#'. + It contains four fields separated with semicolons, + ';'. + + + + The first field, the services field, + is a logic list of PAM service names that the rule applies to. + + + + The second field, the tty + field, is a logic list of terminal names that this rule applies to. + + + + The third field, the users + field, is a logic list of users or a netgroup of users to whom this + rule applies. + + + + For these items the simple wildcard '*' may be used only once. + With netgroups no wildcards or logic operators are allowed. + + + + The times field is used to indicate the times + at which this rule applies. The format here is a logic + list of day/time-range entries. The days are specified by a sequence of + two character entries, MoTuSa for example is Monday Tuesday and Saturday. + Note that repeated days are unset MoMo = no day, and MoWk = all weekdays + bar Monday. The two character combinations accepted are Mo Tu We Th Fr Sa + Su Wk Wd Al, the last two being week-end days and all 7 days of the week + respectively. As a final example, AlFr means all days except Friday. + + + Each day/time-range can be prefixed with a '!' to indicate + "anything but". + The time-range part is two 24-hour times HHMM, separated by a hyphen, + indicating the start and finish time (if the finish time is smaller + than the start time it is deemed to apply on the following day). + + + + For a rule to be active, ALL of service+ttys+users must be satisfied + by the applying process. + + + Note, currently there is no daemon enforcing the end of a session. + This needs to be remedied. + + + Poorly formatted rules are logged as errors using + syslog3. + + + + + EXAMPLES + + These are some example lines which might be specified in + /etc/security/time.conf. + + + All users except for root are denied access + to console-login at all times: + +login ; tty* & !ttyp* ; !root ; !Al0000-2400 + + + + + Games (configured to use PAM) are only to be accessed out of + working hours. This rule does not apply to the user + waster: + +games ; * ; !waster ; Wd0000-2400 | Wk1800-0800 + + + + + + SEE ALSO + + pam_time8, + pam.d5, + pam8 + + + + + AUTHORS + + pam_time was written by Andrew G. Morgan <morgan@kernel.org>. + + + -- cgit v1.2.3