Apache-AuthzUnix

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Apache::AuthzUnix.

0.02  Mon Feb 12 14:16:12 GMT 2007
    - Caught by Tom Hukins: support DELETE as well as PUT

0.01  Mon Feb 12 11:12:42 2007
	- original version; created by h2xs 1.23 with options
		-b 5.6.0 -AX -n Apache::AuthzUnix

MANIFEST  view on Meta::CPAN

Changes
Makefile.PL
MANIFEST
README
t/Apache-AuthzUnix.t
lib/Apache/AuthzUnix.pm
META.yml                                 Module meta-data (added by MakeMaker)

META.yml  view on Meta::CPAN

# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
name:         Apache-AuthzUnix
version:      0.02
version_from: lib/Apache/AuthzUnix.pm
installdirs:  site
requires:

distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.17

Makefile.PL  view on Meta::CPAN

use 5.006;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    NAME              => 'Apache::AuthzUnix',
    VERSION_FROM      => 'lib/Apache/AuthzUnix.pm', # finds $VERSION
    PREREQ_PM         => {}, # e.g., Module::Name => 1.1
    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
      (ABSTRACT_FROM  => 'lib/Apache/AuthzUnix.pm', # retrieve abstract from module
       AUTHOR         => 'simon <simon@>') : ()),
);

README  view on Meta::CPAN

Apache-AuthzUnix version 0.01
=============================

The README is used to introduce the module and provide instructions on
how to install the module, any machine dependencies it may have (for
example C compilers and installed libraries) and any other information
that should be provided before the module is installed.

A README file is required for CPAN modules since CPAN extracts the
README file from a module distribution so that people browsing the
archive can use it get an idea of the modules uses. It is usually a

lib/Apache/AuthzUnix.pm  view on Meta::CPAN

package Apache::AuthzUnix;
our $VERSION = '0.02';
our $DEBUG   = 0;
require File::stat;
use File::Basename qw(dirname);
use User::pwent;
use User::grent;

use constant MP2 =>
  ~~(exists $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} == 2);

lib/Apache/AuthzUnix.pm  view on Meta::CPAN

                 and $g & ($bit << 3));
    return 0;
}

1;
__END__
# Below is stub documentation for your module. You'd better edit it!

=head1 NAME

Apache::AuthzUnix - Apache/Apache2 authorization handler for Unix permissions

=head1 SYNOPSIS

  PerlModule Apache::AuthzUnix;
  <Location ...>
    AuthName auth
    AuthType Basic
    AuthBasicProvider ldap
    PerlAuthzHandler Apache::AuthzUnix::authz
    # Don't need a "requires" line
  </Location>

=head1 DESCRIPTION

This module was written to provide authorization for DAV access to home
directories, but probably has other uses in the C<UserDir> space. 

Assuming that Apache has authenticated a user, this module helps to
determine whether or not that user can read (or write) a file on the
filesystem. It applies standard Unix user and group tests on the file's
permissions to determine read access and, in the case of C<PUT> and
C<DELETE> methods, write access. If the file does not exist, then the 
containing directory is tested, as one would expect.

This module is designed work on both mod_perl versions 1 and 2.

=head1 AUTHOR

Simon Cozens, E<lt>simon@simon-cozens.orgE<gt>

t/Apache-AuthzUnix.t  view on Meta::CPAN

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Apache-AuthzUnix.t'

#########################

# change 'tests => 1' to 'tests => last_test_to_print';

use Test;
BEGIN { plan tests => 1 };
use Apache::AuthzUnix;
ok(1); # If we made it this far, we're ok.

#########################

# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.



( run in 0.867 second using v1.01-cache-2.11-cpan-39bf76dae61 )