diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-08-18 19:54:52 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-08-18 19:54:52 +0400 |
commit | 4f5c104c782b4965bd1fd6ff86be4e9deede33a8 (patch) | |
tree | b85ae5bce28faf88adcb3237551669918307f179 /rspamc.pl.in | |
parent | d4bdfa8504c3484bdf836990cf313a9de8cc64bd (diff) | |
download | rspamd-4f5c104c782b4965bd1fd6ff86be4e9deede33a8.tar.gz rspamd-4f5c104c782b4965bd1fd6ff86be4e9deede33a8.zip |
* Handle password correctly in rspamc
Diffstat (limited to 'rspamc.pl.in')
-rwxr-xr-x | rspamc.pl.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rspamc.pl.in b/rspamc.pl.in index 4185039de..af2ea7a7e 100755 --- a/rspamc.pl.in +++ b/rspamc.pl.in @@ -25,7 +25,7 @@ $main::VERSION = '@RSPAMD_VERSION@'; sub HELP_MESSAGE { print <<EOD; -Usage: rspamc.pl [-h host] [-p port] [-P] [-c conf_file] [-s statfile] [command] +Usage: rspamc.pl [-h host] [-p port] [-P password] [-c conf_file] [-s statfile] [command] -h host to connect or unix socket path -p port to connect (not used with unix sockets) -P ask for control password @@ -222,7 +222,7 @@ sub do_control_command { } my %args; -getopt('c:h:p:Ps:', \%args); +getopt('c:h:p:P:s:', \%args); my $cmd = shift; my $do_parse_config = 1; @@ -259,6 +259,9 @@ if (defined ($args{h})) { if (defined ($args{p})) { $cfg{'port'} = $args{p}; } +if (defined ($args{P})) { + $cfg{'password'} = $args{P}; +} if ($cmd =~ /(SYMBOLS|SCAN|PROCESS|CHECK|REPORT_IFSPAM|REPORT|URLS|EMAILS)/i) { $cfg{'command'} = $1; |