CfgTie

 view release on metacpan or  search on metacpan

CfgTie2.tex  view on Meta::CPAN

@c 319
@node Secure-File,  ,  , Secure
@section Secure-File


@c --- From file: - -------------------------

@subheading NAME


@code{Secure::File} --- A module to open or create files within suid/sgid files

@subheading SYNOPSIS
@example
    use Secure::File;
    my $SF = new Secure::File;
    $SF->open();
@end example
@example
    my $NF = new Secure::File, 'myfile';
@end example

docs/Related.tex  view on Meta::CPAN


@table @asis
@item HTTPD
There is a Perl module, @code{HTTPD-Tools} that help configure the HTTPD
daemon.

@item .newsrc associative array
The Perl module that already does this is @code{News-Newsrc}

@item Process associative arrays
@c open "ps -awxhjch|"; ppid,pid,pgid,sid,tty,tpgid, stat,uid, time, command
@c if tty not equal to '?'
The relevant existing Perl module is @code{Proc-ProcessTable}.
If it used an associative array interface, in part, this would make
signalling named services easier.

@item Quotas
The relevant Perl module is @code{Quota}
The quota subsystem works with the C<CfgTie::TieUser> and the
C<CfgTie::TieMTab> hash-spaces.

lib/CfgTie/TieGroup.pm  view on Meta::CPAN

}

sub EXISTS
{
   my ($self,$id) = @_;
   if (!defined $id) {return 0;}

   if (exists $CfgTie::TieGroup_rec'by_id{$id}) {return 1;}

   # Get the information from the system and store it for later
   my @x = getgrgid $id;
   if (! scalar @x) {return 0;}

   tie %{$CfgTie::TieGroup_rec'by_name{$x[0]}}, 'CfgTie::TieGroup_rec',@x;
   $CfgTie::TieGroup_rec'by_id{$id} = $CfgTie::TieGroup_rec'by_name{$x[0]};

   return 1;
}

sub FETCH
{

lib/CfgTie/TieUser.pm  view on Meta::CPAN

   my $self=shift;

   my %Keys2 = map {$_,1} (keys %{$self});
   $Keys2{'last'}=1;

   delete $Keys2{gcos};
   delete $Keys2{name};
   delete $Keys2{id};
   delete $Keys2{groupid};
   delete $Keys2{password};
   my ($G) = getgrgid($self->{groupid});
   my $A='';
   foreach my $I (sort keys %Keys2) {$A.=trx($I,$self->{$I});}

   CfgTie::Cfgfile::table($self->{gcos},
     trx("Full Name:",  $self->{gcos}).
     trx("Login (UID):",$self->{name}." (".$self->{id}.")").
     trx("Group (GID):","<a href=\"group/$G\">".$G."</a> (".
	$self->{groupid}.")").$A);
}

lib/Secure/File.pm  view on Meta::CPAN

#!/usr/bin/perl -w
#Copyright 1998-2001, Randall Maas.  All rights reserved.  This program is free
#software; you can redistribute it and/or modify it under the same terms as
#PERL itself.

=head1 NAME

C<Secure::File> -- A module to open or create files within suid/sgid files

=head1 SYNOPSIS

    use Secure::File;
    my $SF = new Secure::File;
    $SF->open();

    my $NF = new Secure::File, 'myfile';




( run in 2.502 seconds using v1.01-cache-2.11-cpan-5735350b133 )