Skip to content

Commit

Permalink
PAM::Constants holds the master list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Steinert committed Mar 4, 2010
1 parent 3ac3196 commit c427f57
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 34 deletions.
32 changes: 0 additions & 32 deletions constants.txt

This file was deleted.

38 changes: 36 additions & 2 deletions lib/PAM/Constants.pm
Expand Up @@ -5,12 +5,44 @@ use warnings;

use Carp qw(croak);
use Exporter;
use PAM;

use base 'Exporter';

our %EXPORT_TAGS = ( 'all' => [ qw(
PAM_SUCCESS
PAM_SUCCESS
PAM_OPEN_ERR
PAM_SYMBOL_ERR
PAM_SERVICE_ERR
PAM_SYSTEM_ERR
PAM_BUF_ERR
PAM_PERM_DENIED
PAM_AUTH_ERR
PAM_CRED_INSUFFICIENT
PAM_AUTHINFO_UNAVAIL
PAM_USER_UNKNOWN
PAM_MAXTRIES
PAM_NEW_AUTHTOK_REQD
PAM_ACCT_EXPIRED
PAM_SESSION_ERR
PAM_CRED_UNAVAIL
PAM_CRED_EXPIRED
PAM_CRED_ERR
PAM_NO_MODULE_DATA
PAM_CONV_ERR
PAM_AUTHTOK_ERR
PAM_AUTHTOK_RECOVERY_ERR
PAM_AUTHTOK_LOCK_BUSY
PAM_AUTHTOK_DISABLE_AGING
PAM_TRY_AGAIN
PAM_IGNORE
PAM_ABORT
PAM_AUTHTOK_EXPIRED
PAM_MODULE_UNKNOWN
PAM_BAD_ITEM
PAM_CONV_AGAIN
PAM_INCOMPLETE
PAM_SERVICE
) ] );

our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
Expand All @@ -22,6 +54,8 @@ sub AUTOLOAD {
# XS function. If a constant is not found then control is passed
# to the AUTOLOAD in AutoLoader.

require PAM;

my $constname;
our $AUTOLOAD;
($constname = $AUTOLOAD) =~ s/.*:://;
Expand Down

0 comments on commit c427f57

Please sign in to comment.