diff --git a/contrib/openpam/HISTORY b/contrib/openpam/HISTORY index 2b1f44f07d3c..22a51b4f9dca 100644 --- a/contrib/openpam/HISTORY +++ b/contrib/openpam/HISTORY @@ -1,4 +1,14 @@ ============================================================================ +OpenPAM Cinquefoil 2002-05-24 + + - BUGFIX: Various warnings uncovered by gcc 3.1. + + - ENHANCE: Add a null conversation function, openpam_nullconv(3). + + - BUGFIX: Initialize the "other" chain to all zeroes. + + - ENHANCE: Document openpam_ttyconv(3). +============================================================================ OpenPAM Cinnamon 2002-05-02 - ENHANCE: Add a null conversation function, openpam_nullconv(). @@ -152,4 +162,4 @@ OpenPAM Calamite 2002-02-09 First (beta) release. ============================================================================ -$P4: //depot/projects/openpam/HISTORY#11 $ +$P4: //depot/projects/openpam/HISTORY#12 $ diff --git a/contrib/openpam/MANIFEST b/contrib/openpam/MANIFEST index 857ffd301689..bdbff5a8d311 100644 --- a/contrib/openpam/MANIFEST +++ b/contrib/openpam/MANIFEST @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/openpam/MANIFEST#8 $ +# $P4: //depot/projects/openpam/MANIFEST#9 $ # CREDITS HISTORY @@ -18,6 +18,7 @@ doc/man/openpam_borrow_cred.3 doc/man/openpam_free_data.3 doc/man/openpam_get_option.3 doc/man/openpam_log.3 +doc/man/openpam_nullconv.3 doc/man/openpam_restore_cred.3 doc/man/openpam_set_option.3 doc/man/openpam_ttyconv.3 diff --git a/contrib/openpam/RELNOTES b/contrib/openpam/RELNOTES index 315cc592c378..4bf6749e7f42 100644 --- a/contrib/openpam/RELNOTES +++ b/contrib/openpam/RELNOTES @@ -1,18 +1,13 @@ - Release notes for OpenPAM Cinnamon - ================================== + Release notes for OpenPAM Cinquefoil + ==================================== The library itself is complete. Documentation exists in the form of -man pages for the library functions, though a few pages are still -incomplete. +man pages for the library functions. -This release is incorporated into FreeBSD-CURRENT as of 2002-05-02. +This release is incorporated into FreeBSD-CURRENT as of 2002-05-24. It has also been successfully built on NetBSD, and should build with minimal or no changes on OpenBSD. It has not been tested on any other OS. -Known issues: - - - The documentation is still incomplete. - -$P4: //depot/projects/openpam/RELNOTES#10 $ +$P4: //depot/projects/openpam/RELNOTES#11 $ diff --git a/contrib/openpam/bin/su/su.c b/contrib/openpam/bin/su/su.c index 564abb8df27a..91f411b6b49f 100644 --- a/contrib/openpam/bin/su/su.c +++ b/contrib/openpam/bin/su/su.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/bin/su/su.c#5 $ + * $P4: //depot/projects/openpam/bin/su/su.c#6 $ */ #include @@ -40,6 +40,7 @@ #include #include #include +#include #include #include diff --git a/contrib/openpam/doc/man/Makefile b/contrib/openpam/doc/man/Makefile index 8192df289ef2..d2384b3f2e10 100644 --- a/contrib/openpam/doc/man/Makefile +++ b/contrib/openpam/doc/man/Makefile @@ -31,7 +31,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $P4: //depot/projects/openpam/doc/man/Makefile#6 $ +# $P4: //depot/projects/openpam/doc/man/Makefile#8 $ # MAN = @@ -39,6 +39,7 @@ MAN += openpam_borrow_cred.3 MAN += openpam_free_data.3 MAN += openpam_get_option.3 MAN += openpam_log.3 +MAN += openpam_nullconv.3 MAN += openpam_restore_cred.3 MAN += openpam_set_option.3 MAN += openpam_ttyconv.3 diff --git a/contrib/openpam/doc/man/openpam_borrow_cred.3 b/contrib/openpam/doc/man/openpam_borrow_cred.3 index d8b2dc7de27c..c7e429c5259b 100644 --- a/contrib/openpam/doc/man/openpam_borrow_cred.3 +++ b/contrib/openpam/doc/man/openpam_borrow_cred.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/openpam_borrow_cred.3#4 $ +.\" $P4: //depot/projects/openpam/doc/man/openpam_borrow_cred.3#5 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt OPENPAM_BORROW_CRED 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/openpam_free_data.3 b/contrib/openpam/doc/man/openpam_free_data.3 index f777f651af81..d87b06ccbb0b 100644 --- a/contrib/openpam/doc/man/openpam_free_data.3 +++ b/contrib/openpam/doc/man/openpam_free_data.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/openpam_free_data.3#4 $ +.\" $P4: //depot/projects/openpam/doc/man/openpam_free_data.3#5 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt OPENPAM_FREE_DATA 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/openpam_get_option.3 b/contrib/openpam/doc/man/openpam_get_option.3 index ee49900b4840..6fd205ae382a 100644 --- a/contrib/openpam/doc/man/openpam_get_option.3 +++ b/contrib/openpam/doc/man/openpam_get_option.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/openpam_get_option.3#8 $ +.\" $P4: //depot/projects/openpam/doc/man/openpam_get_option.3#9 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt OPENPAM_GET_OPTION 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/openpam_log.3 b/contrib/openpam/doc/man/openpam_log.3 index 2148ec2cf4bc..5a13827133f2 100644 --- a/contrib/openpam/doc/man/openpam_log.3 +++ b/contrib/openpam/doc/man/openpam_log.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/openpam_log.3#9 $ +.\" $P4: //depot/projects/openpam/doc/man/openpam_log.3#10 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt OPENPAM_LOG 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/openpam_nullconv.3 b/contrib/openpam/doc/man/openpam_nullconv.3 new file mode 100644 index 000000000000..85a9259ee782 --- /dev/null +++ b/contrib/openpam/doc/man/openpam_nullconv.3 @@ -0,0 +1,97 @@ +.\"- +.\" Copyright (c) 2002 Networks Associates Technology, Inc. +.\" All rights reserved. +.\" +.\" This software was developed for the FreeBSD Project by ThinkSec AS and +.\" NAI Labs, the Security Research Division of Network Associates, Inc. +.\" under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the +.\" DARPA CHATS research program. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. The name of the author may not be used to endorse or promote +.\" products derived from this software without specific prior written +.\" permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $P4: //depot/projects/openpam/doc/man/openpam_nullconv.3#2 $ +.\" +.Dd May 24, 2002 +.Dt OPENPAM_NULLCONV 3 +.Os +.Sh NAME +.Nm openpam_nullconv +.Nd null conversation function +.Sh LIBRARY +.Lb libpam +.Sh SYNOPSIS +.In security/pam_appl.h +.In security/openpam.h +.Ft int +.Fn openpam_nullconv "int n" "const struct pam_message **msg" "struct pam_response **resp" "void *data" +.Sh DESCRIPTION +The +.Nm +function is a null conversation function suitable +for applications that want to use PAM but don't support interactive +dialog with the user. Such applications should set +.Dv PAM_AUTHTOK +to +whatever authentication token they've obtained on their own before +calling +.Xr pam_authenticate 3 +and / or +.Xr pam_chauthtok 3 , +and their PAM +configuration should specify the +.Dv use_first_pass +option for all modules +that require access to the authentication token, to make sure they use +.Dv PAM_AUTHTOK +rather than try to query the user. +.Pp +.Sh RETURN VALUES +The +.Nm +function returns one of the following values: +.Bl -tag -width 18n +.It Bq Er PAM_CONV_ERR +Conversation failure. +.El +.Sh SEE ALSO +.Xr openpam_ttyconv 3 , +.Xr pam 3 , +.Xr pam_chauthtok 3 , +.Xr pam_prompt 3 , +.Xr pam_set_item 3 , +.Xr pam_strerror 3 , +.Xr pam_vprompt 3 +.Sh STANDARDS +The +.Nm +function is an OpenPAM extension. +.Sh AUTHORS +The +.Nm +function and this manual page were developed for the FreeBSD Project +by ThinkSec AS and NAI Labs, the Security Research Division of Network +Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 +.Pq Dq CBOSS , +as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/openpam_restore_cred.3 b/contrib/openpam/doc/man/openpam_restore_cred.3 index 97f3c57833ea..2e11820d3f0a 100644 --- a/contrib/openpam/doc/man/openpam_restore_cred.3 +++ b/contrib/openpam/doc/man/openpam_restore_cred.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/openpam_restore_cred.3#4 $ +.\" $P4: //depot/projects/openpam/doc/man/openpam_restore_cred.3#5 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt OPENPAM_RESTORE_CRED 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/openpam_set_option.3 b/contrib/openpam/doc/man/openpam_set_option.3 index c21ef46bf57a..4f3dd2194e9a 100644 --- a/contrib/openpam/doc/man/openpam_set_option.3 +++ b/contrib/openpam/doc/man/openpam_set_option.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/openpam_set_option.3#8 $ +.\" $P4: //depot/projects/openpam/doc/man/openpam_set_option.3#9 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt OPENPAM_SET_OPTION 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/openpam_ttyconv.3 b/contrib/openpam/doc/man/openpam_ttyconv.3 index df303f8e5465..993ad461ff36 100644 --- a/contrib/openpam/doc/man/openpam_ttyconv.3 +++ b/contrib/openpam/doc/man/openpam_ttyconv.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/openpam_ttyconv.3#9 $ +.\" $P4: //depot/projects/openpam/doc/man/openpam_ttyconv.3#10 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt OPENPAM_TTYCONV 3 .Os .Sh NAME @@ -47,7 +47,19 @@ .Ft int .Fn openpam_ttyconv "int n" "const struct pam_message **msg" "struct pam_response **resp" "void *data" .Sh DESCRIPTION -No description available. +The +.Nm +function is a standard conversation function +suitable for use on TTY devices. It should be adequate for the needs +of most text-based interactive programs. +.Pp +The +.Nm +function allows the application to specify a +timeout for user input by setting the global variable +.Va openpam_ttyconv_timeout +to the length of the timeout in seconds. +.Pp .Sh RETURN VALUES The .Nm @@ -61,8 +73,11 @@ Conversation failure. System error. .El .Sh SEE ALSO +.Xr openpam_nullconv 3 , .Xr pam 3 , -.Xr pam_strerror 3 +.Xr pam_prompt 3 , +.Xr pam_strerror 3 , +.Xr pam_vprompt 3 .Sh STANDARDS The .Nm diff --git a/contrib/openpam/doc/man/pam.3 b/contrib/openpam/doc/man/pam.3 index 1d34f469da52..14a8441fcc16 100644 --- a/contrib/openpam/doc/man/pam.3 +++ b/contrib/openpam/doc/man/pam.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam.3#14 $ +.\" $P4: //depot/projects/openpam/doc/man/pam.3#15 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_acct_mgmt.3 b/contrib/openpam/doc/man/pam_acct_mgmt.3 index 2673c2e08fa8..574a514cda9a 100644 --- a/contrib/openpam/doc/man/pam_acct_mgmt.3 +++ b/contrib/openpam/doc/man/pam_acct_mgmt.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_acct_mgmt.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_acct_mgmt.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_ACCT_MGMT 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_authenticate.3 b/contrib/openpam/doc/man/pam_authenticate.3 index ea3f098622e5..a314a9af5181 100644 --- a/contrib/openpam/doc/man/pam_authenticate.3 +++ b/contrib/openpam/doc/man/pam_authenticate.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_authenticate.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_authenticate.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_AUTHENTICATE 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_chauthtok.3 b/contrib/openpam/doc/man/pam_chauthtok.3 index dd417b5a1b3c..e2372dd37305 100644 --- a/contrib/openpam/doc/man/pam_chauthtok.3 +++ b/contrib/openpam/doc/man/pam_chauthtok.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_chauthtok.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_chauthtok.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_CHAUTHTOK 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_close_session.3 b/contrib/openpam/doc/man/pam_close_session.3 index 5a68f78eb2eb..eae011b07f3d 100644 --- a/contrib/openpam/doc/man/pam_close_session.3 +++ b/contrib/openpam/doc/man/pam_close_session.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_close_session.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_close_session.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_CLOSE_SESSION 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_end.3 b/contrib/openpam/doc/man/pam_end.3 index 631e3df320a8..0f766e60fdd6 100644 --- a/contrib/openpam/doc/man/pam_end.3 +++ b/contrib/openpam/doc/man/pam_end.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_end.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_end.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_END 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_error.3 b/contrib/openpam/doc/man/pam_error.3 index e7227453dfa8..cfa9c8452396 100644 --- a/contrib/openpam/doc/man/pam_error.3 +++ b/contrib/openpam/doc/man/pam_error.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_error.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_error.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_ERROR 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_get_authtok.3 b/contrib/openpam/doc/man/pam_get_authtok.3 index 8f5a702fa743..446cc07602f5 100644 --- a/contrib/openpam/doc/man/pam_get_authtok.3 +++ b/contrib/openpam/doc/man/pam_get_authtok.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_get_authtok.3#14 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_get_authtok.3#15 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_GET_AUTHTOK 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_get_data.3 b/contrib/openpam/doc/man/pam_get_data.3 index b083524c2a64..c1596950ca15 100644 --- a/contrib/openpam/doc/man/pam_get_data.3 +++ b/contrib/openpam/doc/man/pam_get_data.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_get_data.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_get_data.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_GET_DATA 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_get_item.3 b/contrib/openpam/doc/man/pam_get_item.3 index 81f5e04ac40b..71926e500bde 100644 --- a/contrib/openpam/doc/man/pam_get_item.3 +++ b/contrib/openpam/doc/man/pam_get_item.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_get_item.3#13 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_get_item.3#14 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_GET_ITEM 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_get_user.3 b/contrib/openpam/doc/man/pam_get_user.3 index 2d9af19efc0a..e41464bf170e 100644 --- a/contrib/openpam/doc/man/pam_get_user.3 +++ b/contrib/openpam/doc/man/pam_get_user.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_get_user.3#13 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_get_user.3#14 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_GET_USER 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_getenv.3 b/contrib/openpam/doc/man/pam_getenv.3 index 8210ecca467f..8324f9f4b2aa 100644 --- a/contrib/openpam/doc/man/pam_getenv.3 +++ b/contrib/openpam/doc/man/pam_getenv.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_getenv.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_getenv.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_GETENV 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_getenvlist.3 b/contrib/openpam/doc/man/pam_getenvlist.3 index baab41d4fbbc..f9ec82ca03d0 100644 --- a/contrib/openpam/doc/man/pam_getenvlist.3 +++ b/contrib/openpam/doc/man/pam_getenvlist.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_getenvlist.3#13 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_getenvlist.3#14 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_GETENVLIST 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_info.3 b/contrib/openpam/doc/man/pam_info.3 index 66faf7bb8e12..bf20ca44a84f 100644 --- a/contrib/openpam/doc/man/pam_info.3 +++ b/contrib/openpam/doc/man/pam_info.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_info.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_info.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_INFO 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_open_session.3 b/contrib/openpam/doc/man/pam_open_session.3 index 7a0fd5bec556..4275b3dd6cf1 100644 --- a/contrib/openpam/doc/man/pam_open_session.3 +++ b/contrib/openpam/doc/man/pam_open_session.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_open_session.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_open_session.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_OPEN_SESSION 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_prompt.3 b/contrib/openpam/doc/man/pam_prompt.3 index ec9219ec19e7..0e12a5002057 100644 --- a/contrib/openpam/doc/man/pam_prompt.3 +++ b/contrib/openpam/doc/man/pam_prompt.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_prompt.3#13 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_prompt.3#14 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_PROMPT 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_putenv.3 b/contrib/openpam/doc/man/pam_putenv.3 index 020cdfc98af5..5092e036e96d 100644 --- a/contrib/openpam/doc/man/pam_putenv.3 +++ b/contrib/openpam/doc/man/pam_putenv.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_putenv.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_putenv.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_PUTENV 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_set_data.3 b/contrib/openpam/doc/man/pam_set_data.3 index d95818a4cba2..11cd179818f9 100644 --- a/contrib/openpam/doc/man/pam_set_data.3 +++ b/contrib/openpam/doc/man/pam_set_data.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_set_data.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_set_data.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_SET_DATA 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_set_item.3 b/contrib/openpam/doc/man/pam_set_item.3 index f6dc95eafa92..23de9941a185 100644 --- a/contrib/openpam/doc/man/pam_set_item.3 +++ b/contrib/openpam/doc/man/pam_set_item.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_set_item.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_set_item.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_SET_ITEM 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_setcred.3 b/contrib/openpam/doc/man/pam_setcred.3 index c0cedc6bc4fd..e5b39376a523 100644 --- a/contrib/openpam/doc/man/pam_setcred.3 +++ b/contrib/openpam/doc/man/pam_setcred.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_setcred.3#13 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_setcred.3#14 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_SETCRED 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_setenv.3 b/contrib/openpam/doc/man/pam_setenv.3 index f94ecb76bb7b..594851395668 100644 --- a/contrib/openpam/doc/man/pam_setenv.3 +++ b/contrib/openpam/doc/man/pam_setenv.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_setenv.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_setenv.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_SETENV 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 b/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 index 6fd07c3bcf48..e0ee6597a86b 100644 --- a/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 +++ b/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_sm_acct_mgmt.3#8 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_sm_acct_mgmt.3#9 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_SM_ACCT_MGMT 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_sm_authenticate.3 b/contrib/openpam/doc/man/pam_sm_authenticate.3 index c56d7a864374..6d9ebaa2347d 100644 --- a/contrib/openpam/doc/man/pam_sm_authenticate.3 +++ b/contrib/openpam/doc/man/pam_sm_authenticate.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_sm_authenticate.3#8 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_sm_authenticate.3#9 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_SM_AUTHENTICATE 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_sm_chauthtok.3 b/contrib/openpam/doc/man/pam_sm_chauthtok.3 index 7a2d165736d5..5a3d68c91ed0 100644 --- a/contrib/openpam/doc/man/pam_sm_chauthtok.3 +++ b/contrib/openpam/doc/man/pam_sm_chauthtok.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_sm_chauthtok.3#8 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_sm_chauthtok.3#9 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_SM_CHAUTHTOK 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_sm_close_session.3 b/contrib/openpam/doc/man/pam_sm_close_session.3 index 7411198af77c..9c95ff417dad 100644 --- a/contrib/openpam/doc/man/pam_sm_close_session.3 +++ b/contrib/openpam/doc/man/pam_sm_close_session.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_sm_close_session.3#8 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_sm_close_session.3#9 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_SM_CLOSE_SESSION 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_sm_open_session.3 b/contrib/openpam/doc/man/pam_sm_open_session.3 index df85873148d4..4f9a82a95d9d 100644 --- a/contrib/openpam/doc/man/pam_sm_open_session.3 +++ b/contrib/openpam/doc/man/pam_sm_open_session.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_sm_open_session.3#8 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_sm_open_session.3#9 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_SM_OPEN_SESSION 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_sm_setcred.3 b/contrib/openpam/doc/man/pam_sm_setcred.3 index 66c05eed9dcc..a03cc0495167 100644 --- a/contrib/openpam/doc/man/pam_sm_setcred.3 +++ b/contrib/openpam/doc/man/pam_sm_setcred.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_sm_setcred.3#8 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_sm_setcred.3#9 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_SM_SETCRED 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_start.3 b/contrib/openpam/doc/man/pam_start.3 index 2284a7eb61c0..2de4985a611a 100644 --- a/contrib/openpam/doc/man/pam_start.3 +++ b/contrib/openpam/doc/man/pam_start.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_start.3#13 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_start.3#14 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_START 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_strerror.3 b/contrib/openpam/doc/man/pam_strerror.3 index c093f0bbd694..9f31f28f1552 100644 --- a/contrib/openpam/doc/man/pam_strerror.3 +++ b/contrib/openpam/doc/man/pam_strerror.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_strerror.3#12 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_strerror.3#13 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_STRERROR 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_verror.3 b/contrib/openpam/doc/man/pam_verror.3 index 940b3fceccc0..851b0be638b7 100644 --- a/contrib/openpam/doc/man/pam_verror.3 +++ b/contrib/openpam/doc/man/pam_verror.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_verror.3#10 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_verror.3#11 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_VERROR 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_vinfo.3 b/contrib/openpam/doc/man/pam_vinfo.3 index 2bae513a60bd..0e43f77d68a9 100644 --- a/contrib/openpam/doc/man/pam_vinfo.3 +++ b/contrib/openpam/doc/man/pam_vinfo.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_vinfo.3#10 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_vinfo.3#11 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_VINFO 3 .Os .Sh NAME diff --git a/contrib/openpam/doc/man/pam_vprompt.3 b/contrib/openpam/doc/man/pam_vprompt.3 index ae2909e9d875..848cf90de26c 100644 --- a/contrib/openpam/doc/man/pam_vprompt.3 +++ b/contrib/openpam/doc/man/pam_vprompt.3 @@ -31,9 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_vprompt.3#10 $ +.\" $P4: //depot/projects/openpam/doc/man/pam_vprompt.3#11 $ .\" -.Dd May 2, 2002 +.Dd May 24, 2002 .Dt PAM_VPROMPT 3 .Os .Sh NAME diff --git a/contrib/openpam/include/security/openpam.h b/contrib/openpam/include/security/openpam.h index e7bd8cb7d2b6..16f396008121 100644 --- a/contrib/openpam/include/security/openpam.h +++ b/contrib/openpam/include/security/openpam.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/openpam.h#19 $ + * $P4: //depot/projects/openpam/include/security/openpam.h#20 $ */ #ifndef _SECURITY_OPENPAM_H_INCLUDED @@ -137,9 +137,12 @@ _openpam_log(int _level, const char *_fmt, ...); -#if defined(__STDC__) && (__STDC_VERSION__ >= 199901L) -#define openpam_log(lvl, fmt, ...) \ - _openpam_log((lvl), __func__, fmt, __VA_ARGS__) +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +#define openpam_log(lvl, ...) \ + _openpam_log((lvl), __func__, __VA_ARGS__) +#elif defined(__GNUC__) && (__GNUC__ >= 3) +#define openpam_log(lvl, ...) \ + _openpam_log((lvl), __func__, __VA_ARGS__) #elif defined(__GNUC__) && (__GNUC__ >= 2) && (__GNUC_MINOR__ >= 95) #define openpam_log(lvl, fmt...) \ _openpam_log((lvl), __func__, ##fmt) diff --git a/contrib/openpam/include/security/openpam_version.h b/contrib/openpam/include/security/openpam_version.h index e69c4c3ec58a..969e719fd7f6 100644 --- a/contrib/openpam/include/security/openpam_version.h +++ b/contrib/openpam/include/security/openpam_version.h @@ -31,14 +31,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/openpam_version.h#2 $ + * $P4: //depot/projects/openpam/include/security/openpam_version.h#4 $ */ #ifndef _OPENPAM_VERSION_H_INCLUDED #define _OPENPAM_VERSION_H_INCLUDED #define _OPENPAM -#define _OPENPAM_VERSION 20020414 -#define _OPENPAM_RELEASE "Cineraria" +#define _OPENPAM_VERSION 20020524 +#define _OPENPAM_RELEASE "Cinquefoil" #endif diff --git a/contrib/openpam/lib/openpam_log.c b/contrib/openpam/lib/openpam_log.c index 899a6f7ff0f8..4ce77518d0e1 100644 --- a/contrib/openpam/lib/openpam_log.c +++ b/contrib/openpam/lib/openpam_log.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_log.c#13 $ + * $P4: //depot/projects/openpam/lib/openpam_log.c#14 $ */ #include @@ -106,6 +106,9 @@ openpam_log(int level, const char *fmt, ...) switch (level) { case PAM_LOG_DEBUG: +#ifndef DEBUG + return; +#endif priority = LOG_DEBUG; break; case PAM_LOG_VERBOSE: diff --git a/contrib/openpam/lib/openpam_nullconv.c b/contrib/openpam/lib/openpam_nullconv.c index 6534c11fd89d..544b4846269c 100644 --- a/contrib/openpam/lib/openpam_nullconv.c +++ b/contrib/openpam/lib/openpam_nullconv.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_nullconv.c#1 $ + * $P4: //depot/projects/openpam/lib/openpam_nullconv.c#2 $ */ #include @@ -66,3 +66,19 @@ openpam_nullconv(int n, * * PAM_CONV_ERR */ + +/** + * The =openpam_nullconv function is a null conversation function suitable + * for applications that want to use PAM but don't support interactive + * dialog with the user. Such applications should set =PAM_AUTHTOK to + * whatever authentication token they've obtained on their own before + * calling =pam_authenticate and / or =pam_chauthtok, and their PAM + * configuration should specify the ;use_first_pass option for all modules + * that require access to the authentication token, to make sure they use + * =PAM_AUTHTOK rather than try to query the user. + * + * >openpam_ttyconv + * >pam_prompt + * >pam_set_item + * >pam_vprompt + */ diff --git a/contrib/openpam/lib/openpam_ttyconv.c b/contrib/openpam/lib/openpam_ttyconv.c index fc02405bf12a..b35a5f934d1a 100644 --- a/contrib/openpam/lib/openpam_ttyconv.c +++ b/contrib/openpam/lib/openpam_ttyconv.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#10 $ + * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#11 $ */ #include @@ -192,3 +192,17 @@ openpam_ttyconv(int n, * PAM_BUF_ERR * PAM_CONV_ERR */ + +/** + * The =openpam_ttyconv function is a standard conversation function + * suitable for use on TTY devices. It should be adequate for the needs + * of most text-based interactive programs. + * + * The =openpam_ttyconv function allows the application to specify a + * timeout for user input by setting the global variable + * :openpam_ttyconv_timeout to the length of the timeout in seconds. + * + * >openpam_nullconv + * >pam_prompt + * >pam_vprompt + */ diff --git a/contrib/openpam/lib/pam_get_authtok.c b/contrib/openpam/lib/pam_get_authtok.c index d89460f095d8..d56de797a290 100644 --- a/contrib/openpam/lib/pam_get_authtok.c +++ b/contrib/openpam/lib/pam_get_authtok.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#17 $ + * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#18 $ */ #include diff --git a/contrib/openpam/misc/gendoc.pl b/contrib/openpam/misc/gendoc.pl index e2501e3cd5f9..cb4c69d86120 100644 --- a/contrib/openpam/misc/gendoc.pl +++ b/contrib/openpam/misc/gendoc.pl @@ -32,7 +32,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $P4: //depot/projects/openpam/misc/gendoc.pl#13 $ +# $P4: //depot/projects/openpam/misc/gendoc.pl#14 $ # use strict; @@ -201,6 +201,8 @@ sub parse_source($) { s/\s*=$func\b\s*/\n.Nm\n/gs; s/\s*=$argnames\b\s*/\n.Va $1\n/gs; s/\s*=(struct \w+(?: \*)?)\b\s*/\n.Vt $1\n/gs; + s/\s*:([a-z_]+)\b\s*/\n.Va $1\n/gs; + s/\s*;([a-z_]+)\b\s*/\n.Dv $1\n/gs; if (s/\s*=([a-z_]+)\b\s*/\n.Xr $1 3\n/gs) { ++$xref{"$1 3"}; } @@ -378,8 +380,8 @@ as part of the DARPA CHATS research program. $fn = "$func->{'name'}.3"; if (sysopen(FILE, $fn, O_RDWR|O_CREAT|O_TRUNC)) { - print(FILE $mdoc); - close(FILE); + print(FILE $mdoc); + close(FILE); } else { warn("$fn: open(): $!\n"); }