Changeset 153 in openpam for trunk


Ignore:
Timestamp:
May 28, 2002, 12:58:47 AM (17 years ago)
Author:
Dag-Erling Smørgrav
Message:

Split the summar page in two (one for the standard API, one for
extensions). Also add a page about the conversation system, and
remove that information from the pam_start page.

Sponsored by: DARPA, NAI Labs

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MANIFEST

    r152 r153  
    11#
    2 # $P4: //depot/projects/openpam/MANIFEST#10 $
     2# $P4: //depot/projects/openpam/MANIFEST#11 $
    33#
    44CREDITS
     
    1616doc/man/Makefile
    1717doc/man/openpam.3
     18doc/man/openpam.man
    1819doc/man/openpam_borrow_cred.3
    1920doc/man/openpam_free_data.3
     
    2425doc/man/openpam_set_option.3
    2526doc/man/openpam_ttyconv.3
     27doc/man/pam.3
     28doc/man/pam.man
    2629doc/man/pam_acct_mgmt.3
    2730doc/man/pam_authenticate.3
    2831doc/man/pam_chauthtok.3
    2932doc/man/pam_close_session.3
     33doc/man/pam_conv.3
    3034doc/man/pam_end.3
    3135doc/man/pam_error.3
  • trunk/doc/man/Makefile

    r152 r153  
    3232# SUCH DAMAGE.
    3333#
    34 # $P4: //depot/projects/openpam/doc/man/Makefile#9 $
     34# $P4: //depot/projects/openpam/doc/man/Makefile#10 $
    3535#
    3636
    3737GENDOC           = ${.CURDIR}/../../misc/gendoc.pl
    3838
    39 CMAN             =
    40 CMAN            += openpam_borrow_cred.3
    41 CMAN            += openpam_free_data.3
    42 CMAN            += openpam_get_option.3
    43 CMAN            += openpam_log.3
    44 CMAN            += openpam_nullconv.3
    45 CMAN            += openpam_restore_cred.3
    46 CMAN            += openpam_set_option.3
    47 CMAN            += openpam_ttyconv.3
    48 CMAN            += pam_acct_mgmt.3
    49 CMAN            += pam_authenticate.3
    50 CMAN            += pam_chauthtok.3
    51 CMAN            += pam_close_session.3
    52 CMAN            += pam_end.3
    53 CMAN            += pam_error.3
    54 CMAN            += pam_get_authtok.3
    55 CMAN            += pam_get_data.3
    56 CMAN            += pam_get_item.3
    57 CMAN            += pam_get_user.3
    58 CMAN            += pam_getenv.3
    59 CMAN            += pam_getenvlist.3
    60 CMAN            += pam_info.3
    61 CMAN            += pam_open_session.3
    62 CMAN            += pam_prompt.3
    63 CMAN            += pam_putenv.3
    64 CMAN            += pam_set_data.3
    65 CMAN            += pam_set_item.3
    66 CMAN            += pam_setcred.3
    67 CMAN            += pam_setenv.3
    68 CMAN            += pam_sm_acct_mgmt.3
    69 CMAN            += pam_sm_authenticate.3
    70 CMAN            += pam_sm_chauthtok.3
    71 CMAN            += pam_sm_close_session.3
    72 CMAN            += pam_sm_open_session.3
    73 CMAN            += pam_sm_setcred.3
    74 CMAN            += pam_start.3
    75 CMAN            += pam_strerror.3
    76 CMAN            += pam_verror.3
    77 CMAN            += pam_vinfo.3
    78 CMAN            += pam_vprompt.3
     39# Standard PAM API
     40PMAN             =
     41PMAN            += pam_acct_mgmt.3
     42PMAN            += pam_authenticate.3
     43PMAN            += pam_chauthtok.3
     44PMAN            += pam_close_session.3
     45PMAN            += pam_end.3
     46PMAN            += pam_get_data.3
     47PMAN            += pam_get_item.3
     48PMAN            += pam_get_user.3
     49PMAN            += pam_getenv.3
     50PMAN            += pam_getenvlist.3
     51PMAN            += pam_open_session.3
     52PMAN            += pam_putenv.3
     53PMAN            += pam_set_data.3
     54PMAN            += pam_set_item.3
     55PMAN            += pam_setcred.3
     56PMAN            += pam_start.3
     57PMAN            += pam_strerror.3
    7958
    80 MAN              = ${CMAN}
     59# Standard module API
     60MMAN             =
     61MMAN            += pam_sm_acct_mgmt.3
     62MMAN            += pam_sm_authenticate.3
     63MMAN            += pam_sm_chauthtok.3
     64MMAN            += pam_sm_close_session.3
     65MMAN            += pam_sm_open_session.3
     66MMAN            += pam_sm_setcred.3
     67
     68# OpenPAM extensions
     69OMAN             =
     70OMAN            += openpam_borrow_cred.3
     71OMAN            += openpam_free_data.3
     72OMAN            += openpam_get_option.3
     73OMAN            += openpam_log.3
     74OMAN            += openpam_nullconv.3
     75OMAN            += openpam_restore_cred.3
     76OMAN            += openpam_set_option.3
     77OMAN            += openpam_ttyconv.3
     78OMAN            += pam_error.3
     79OMAN            += pam_get_authtok.3
     80OMAN            += pam_info.3
     81OMAN            += pam_prompt.3
     82OMAN            += pam_setenv.3
     83OMAN            += pam_verror.3
     84OMAN            += pam_vinfo.3
     85OMAN            += pam_vprompt.3
     86
     87MAN              = ${PMAN} ${OMAN} ${MMAN}
    8188MAN             += openpam.3
    82 MLINKS           = openpam.3 pam.3
     89MAN             += pam.3
     90MAN             += pam_conv.3
    8391
    84 CLEANFILES      += ${CMAN} openpam.3
     92CLEANFILES      += ${PMAN} ${OMAN} ${MMAN} openpam.3 pam.3
    8593
    86 .for man in ${CMAN}
     94.for man in ${PMAN} ${OMAN} ${MMAN}
    8795${man}: ${.CURDIR}/../../lib/${man:R}.c ${GENDOC}
    8896        perl -w ${GENDOC} ${.CURDIR}/../../lib/${man:R}.c
    8997.endfor
    9098
    91 openpam.3: ${CMAN} ${GENDOC}
    92         perl -w ${GENDOC} -s ${CMAN}
     99openpam.3: ${OMAN} ${GENDOC} openpam.man
     100        perl -w ${GENDOC} -o ${OMAN} <${.CURDIR}/openpam.man
     101
     102pam.3: ${PMAN} ${GENDOC} pam.man
     103        perl -w ${GENDOC} -p ${PMAN} <${.CURDIR}/pam.man
    93104
    94105.include <bsd.prog.mk>
  • trunk/lib/pam_start.c

    r137 r153  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/pam_start.c#14 $
     34 * $P4: //depot/projects/openpam/lib/pam_start.c#15 $
    3535 */
    3636
     
    9999 *
    100100 * The =pam_conv argument points to a =struct pam_conv describing the
    101  * conversation function to use.
    102  * This structure is defined as follows:
    103  *
    104  *     struct pam_conv {
    105  *          int   (*conv)(int, const struct pam_message **,
    106  *              struct pam_response **, void *);
    107  *          void   *appdata_ptr;
    108  *     };
     101 * conversation function to use; see =pam_conv for details.
    109102 *
    110103 * >pam_get_item
  • trunk/misc/gendoc.pl

    r152 r153  
    3333# SUCH DAMAGE.
    3434#
    35 # $P4: //depot/projects/openpam/misc/gendoc.pl#15 $
     35# $P4: //depot/projects/openpam/misc/gendoc.pl#16 $
    3636#
    3737
     
    456456}
    457457
    458 sub gensummary() {
     458sub gensummary($) {
     459    my $page = shift;           # Which page to produce
    459460
    460461    local *FILE;
     462    my $upage;
    461463    my $func;
    462 
    463     sysopen(FILE, "openpam.3", O_RDWR|O_CREAT|O_TRUNC)
    464         or die("openpam.3: $!\n");
    465 
     464    my %xref;
     465
     466    sysopen(FILE, "$page.3", O_RDWR|O_CREAT|O_TRUNC)
     467        or die("$page.3: $!\n");
     468
     469    $upage = uc($page);
    466470    print FILE "$COPYRIGHT
    467471.Dd $TODAY
    468 .Dt PAM 3
     472.Dt $upage 3
    469473.Os
    470474.Sh NAME
    471475";
    472     foreach $func (sort(keys(%FUNCTIONS))) {
    473         print FILE ".Nm $FUNCTIONS{$func}->{'Nm'}\n";
     476    my @funcs = sort(keys(%FUNCTIONS));
     477    while ($func = shift(@funcs)) {
     478        print FILE ".Nm $FUNCTIONS{$func}->{'Nm'}";
     479        print FILE " ,"
     480                if (@funcs);
     481        print FILE "\n";
    474482    }
    475483    print FILE ".Nd Pluggable Authentication Modules Library
    476484.Sh LIBRARY
    477485.Lb libpam
    478 .Sh SYNOPSIS
    479 .In security/pam_appl.h
    480 ";
     486.Sh SYNOPSIS\n";
     487    if ($page eq 'pam') {
     488        print FILE ".In security/pam_appl.h\n";
     489    } else {
     490        print FILE ".In security/openpam.h\n";
     491    }
    481492    foreach $func (sort(keys(%FUNCTIONS))) {
    482493        print FILE ".Ft $FUNCTIONS{$func}->{'Ft'}\n";
    483494        print FILE ".Fn $FUNCTIONS{$func}->{'Fn'}\n";
    484495    }
    485     print FILE ".Sh DESCRIPTION
    486 .Sh RETURN VALUES
    487 The following return codes are defined in the
    488 .In security/pam_constants.h
    489 header:
     496    while (<STDIN>) {
     497        if (m/^\.Xr (\S+)\s*(\d)\s*$/) {
     498            $xref{$1} = $2;
     499        }
     500        print FILE $_;
     501    }
     502
     503    if ($page eq 'pam') {
     504        print FILE ".Sh RETURN VALUES
     505The following return codes are defined by
     506.Aq Pa security/pam_constants.h :
    490507.Bl -tag -width 18n
    491508";
    492     foreach (sort(keys(%PAMERR))) {
    493         print FILE ".It Bq Er $_\n$PAMERR{$_}.\n";
    494     }
    495     print FILE ".El
    496 .Sh SEE ALSO
    497 ";
    498     foreach $func (sort(keys(%FUNCTIONS))) {
    499         print FILE ".Xr $func 3 ,\n";
    500     }
    501     print FILE ".Xr pam.conf 5
    502 .Sh STANDARDS
     509        foreach (sort(keys(%PAMERR))) {
     510            print FILE ".It Bq Er $_\n$PAMERR{$_}.\n";
     511        }
     512        print FILE ".El\n";
     513    }
     514    print FILE ".Sh SEE ALSO
     515";
     516    print FILE ".Xr openpam 3\n"
     517        if ($page eq 'pam');
     518    foreach $func (keys(%FUNCTIONS)) {
     519        $xref{$func} = 3;
     520    }
     521    my @refs = sort(keys(%xref));
     522    while ($_ = shift(@refs)) {
     523        print FILE ".Xr $_ $xref{$_}";
     524        print FILE " ,"
     525            if (@refs);
     526        print FILE "\n";
     527    }
     528    print FILE ".Sh STANDARDS
    503529.Rs
    504530.%T \"X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules\"
     
    526552
    527553    usage()
    528         unless (@ARGV && getopts("s", \%opts));
     554        unless (@ARGV && getopts("op", \%opts));
    529555    $TODAY = strftime("%B %e, %Y", localtime(time()));
    530556    $TODAY =~ s,\s+, ,g;
    531     if ($opts{'s'}) {
     557    if ($opts{'o'} || $opts{'p'}) {
    532558        foreach my $fn (@ARGV) {
    533559            readproto($fn);
    534560        }
    535         gensummary();
     561        gensummary('openpam')
     562            if ($opts{'o'});
     563        gensummary('pam')
     564            if ($opts{'p'});
    536565    } else {
    537566        foreach my $fn (@ARGV) {
Note: See TracChangeset for help on using the changeset viewer.