7 More Discussions You Might Find Interesting
1. Homework & Coursework Questions
Hello! I'd like some help with this assignment.
1. The problem statement, all variables and given/known data:
1)Write a shell script that can uses two types of files as inputs, apache.log and apache.error.log
2)Make it so that you can switch between the two file types
3)Make it so that the... (5 Replies)
Discussion started by: malfiory
5 Replies
2. Shell Programming and Scripting
Hi All
Need help
Can any one share a basic script that is used for monitor sendmail service whether online, offline.etc in solaris
Thanks in advance
Zimmy (5 Replies)
Discussion started by: zimmyyash
5 Replies
3. Homework & Coursework Questions
I am a newbie to UNIX. I'm learning UNIX on my own, just trying to get the jerk of how things work in UNIX environment. I am familiar with Windows environment.
Can anyone pls write simple 'envprint' programs to :
1) List all the environment Information (using the -l or --l options)
2) ... (1 Reply)
Discussion started by: agup17
1 Replies
4. Shell Programming and Scripting
Hi ,
Please help me getting this done.
Write an automated shell program(s) that can create, monitor the log files and report the issues for matching pattern.
(i) Conditions for creating log files.
Log file is created with date (example 2010_03_27.log). If the log file size is 10 Mb for... (1 Reply)
Discussion started by: itian2010
1 Replies
5. Programming
I'd like to write a program (I'm flexible on language; C/C++ was my original idea but a scripting language would probably be better) that runs hundreds of programs, but only N = 4 (say) at a time. The idea is to keep all the cores on a multicore machine busy.
How can I do this? In particular,... (6 Replies)
Discussion started by: CRGreathouse
6 Replies
6. Shell Programming and Scripting
Hello. I'm trying to write a shell script that will take files that have .tar, .tar.gz, .tar.Z, .gz, .Z and .zip file extensions and uncompress and unarchive them. The script should be able to take multiple arguments. So far I can write a script using the case command that will do this but it will... (3 Replies)
Discussion started by: SeanWuzHere
3 Replies
7. Programming
Iam writing a script for my sisters friends little brother
i want the program to say hello lets say his name is Joe and ask him how he is and he can write a reply back saying fine and then it replys "Iam happy you are (his response) today
and then it goes into a basic math where he can put in a... (9 Replies)
Discussion started by: perleo
9 Replies
Plack::Middleware::Auth::Basic(3pm) User Contributed Perl Documentation Plack::Middleware::Auth::Basic(3pm)
NAME
Plack::Middleware::Auth::Basic - Simple basic authentication middleware
SYNOPSIS
use Plack::Builder;
my $app = sub { ... };
builder {
enable "Auth::Basic", authenticator => &authen_cb;
$app;
};
sub authen_cb {
my($username, $password) = @_;
return $username eq 'admin' && $password eq 's3cr3t';
}
DESCRIPTION
Plack::Middleware::Auth::Basic is a basic authentication handler for Plack.
CONFIGURATION
authenticator
A callback function that takes username and password supplied and returns whether the authentication succeeds. Required.
Authenticator can also be an object that responds to "authenticate" method that takes username and password and returns boolean, so
backends for Authen::Simple is perfect to use:
use Authen::Simple::LDAP;
enable "Auth::Basic", authenticator => Authen::Simple::LDAP->new(...);
realm
Realm name to display in the basic authentication dialog. Defaults to restricted area.
LIMITATIONS
This middleware expects that the application has a full access to the headers sent by clients in PSGI environment. That is normally the
case with standalone Perl PSGI web servers such as Starman or HTTP::Server::Simple::PSGI.
However, in a web server configuration where you can't achieve this (i.e. using your application via Apache's mod_cgi), this middleware
does not work since your application can't know the value of "Authorization:" header.
If you use Apache as a web server and CGI to run your PSGI application, you can either a) compile Apache with
"-DSECURITY_HOLE_PASS_AUTHORIZATION" option, or b) use mod_rewrite to pass the Authorization header to the application with the rewrite
rule like following.
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
AUTHOR
Tatsuhiko Miyagawa
SEE ALSO
Plack
perl v5.14.2 2012-06-21 Plack::Middleware::Auth::Basic(3pm)