Name
CatalystX::Usul::Admin - Subroutines that run as the super user
Version
0.5.$Revision: 1139 $
Synopsis
# Setuid root program wrapper
use CatalystX::Usul::Admin;
use English qw(-no_match_vars);
my $prog = CatalystX::Usul::Admin->new( appclass => q(App::Munchies),
arglist => q(e) );
$EFFECTIVE_USER_ID = 0; $REAL_USER_ID = 0;
$EFFECTIVE_GROUP_ID = 0; $REAL_GROUP_ID = 0;
unless ($prog->is_authorised) {
my $text = 'Permission denied to '.$prog->method.' for '.$prog->logname;
$prog->error( $text );
exit 1;
}
exit $prog->run;
Description
Methods called from the setuid root program wrapper
Subroutines/Methods
new
Constructor
is_authorised
Is the user authorised to call the method
is_setuid
Is the program running suid
account_report
Calls the report method on the user model
authenticate
Calls the authenticate method on the user model
create_account
Calls the create account method on the user model
create_ugrps
Creates the user and group to own the application files
deploy_server
Redispatches the call to one of the server specific methods
delete_account
Calls the delete account method on the user model
init_suid
Enable the setuid
root wrapper?
make_default
When installed should this installation become the default for this host? Causes the symbolic link (that hides the version directory from the PATH
environment variable) to be deleted and recreated pointing to this installation
post_install
Runs the post installation methods as defined in the post installtion config
populate_account
Calls the populate account method on the user model
restart_server
Restarts the web server
roles
Returns the identity roles object
roles_update
Calls the roles update method on the user model
set_owner
Set the ownership of the installed files and directories
set_password
Calls "update_password" with a true parameter
set_permissions
Set the permissions on the installed files and directories
set_user
Execs an interactive shell as another user
signal_process
Calls the signal process as root method in the CatalystX::Usul::IPC class
tape_backup
Runs the tape backup command in the appname_cli
program
uninstall
Will uninstall the application
untaint_self
Returns an untainted reconstruction of our own invoking command line
update_account
update_mail_aliases
update_password
update_progs
users
Private Methods
_deploy_mod_perl_server
Creates the symlinks necessary to deploy the Apache/mod_perl server
_deploy_plack_server
Create the symlink necessary to deploy the Plack server
Diagnostics
None
Configuration and Environment
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Author
Peter Flanigan, <Support at RoxSoft.co.uk>
License and Copyright
Copyright (c) 2011 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE