summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/draksec
blob: 9f4002e9662c5010651dedab201c711917862daf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl

use lib qw(/usr/lib/libDrakX);

use standalone;     #- warning, standalone must be loaded very first, for 'explanations'

use common;
use interactive;
use log;
use security::main;

local $_ = join '', @ARGV;

/-h/ and die "usage: draksec [--expert]\n";

$::expert = /-expert/ || cat_("/etc/sysconfig/system") =~ /^CLASS="?expert/m; #"

my $in = 'interactive'->vnew('su', 'security');

begin:
$::isEmbedded and kill USR2, $::CCPID;

security::main::main($prefix, $in);

!$::isEmbedded ? $in->exit(0) : kill(USR1, $::CCPID);
goto begin;