CatalystX::Usul::Admin - Subroutines that run as the super user
Describes v0.17.$Rev: 1 $
# Setuid root program wrapper use CatalystX::Usul::Admin; $ENV{PATH} = q(/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin); my $app = CatalystX::Usul::Admin->new_with_options ( appclass => 'YourApp' ); $app->exec_setuid or exec $app->untaint_self or die "Exec failed\n"; exit $app->run;
Methods called from the setuid root program wrapper
Defines the following attributes
commands
Hash ref of OS commands
exec_setuid
A boolean which defaults to false. Becomes true after the program has re-executed itself
paragraph
Hash ref of options that makes output appear in separate paragraphs
public_methods
List of methods that do not require authorization
server_options
Array ref of deployment options
Customize the constructor
Calls the report method on the user model
Calls the authenticate method on the user model
Calls the create account method on the user model
Creates the user and group to own the application files
Redispatches the call to one of the server specific methods
Calls the delete account method on the user model
Retrieves data for the specified user and dumps it using Data::Printer
Enable the setuid root wrapper?
setuid
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
PATH
Runs the post installation methods as defined in the post installation config
Calls the populate account method on the user model
Reads a key file from the secure directory and prints it to STDOUT
Restarts the web server
Returns the identity roles object
Calls the roles update method on the user model
Modifies the parent method to reject unauthorized calls
Set the ownership of the installed files and directories
Calls "update_password" with a true parameter
Set the permissions on the installed files and directories
Execs an interactive shell as another user
Calls the signal process as root method in the CatalystX::Usul::IPC class
Runs the tape backup command in the appname_cli program
appname_cli
Will uninstall the application
Returns an untainted reconstruction of our own invoking command line
Calls update_account in the user model to change attributes of the user account
update_account
Updates a mail alias via File::MailAlias
Changes a users password by calling update_password on the user model
update_password
Uses scp to copy program files from the specified remote server
scp
Creates the symlinks necessary to deploy the Apache/mod_perl server
Create the symlink necessary to deploy the Plack server
Is the user authorised to call the method
Is the program running suid
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
<Support at RoxSoft.co.uk>
Copyright (c) 2014 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
To install CatalystX::Usul, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::Usul
CPAN shell
perl -MCPAN -e shell install CatalystX::Usul
For more information on module installation, please visit the detailed CPAN module installation guide.