summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-17 23:23:21 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-17 23:23:21 +0000
commit2b8ae0c0c8ac84f7828e7df44b70b7a7f68087db (patch)
tree4be04b5e124b8f074bf239fed39968aeaa73fa0c /perl-install
parent926857fafc0c9f2759f3b65aabe8a0112f9a16ca (diff)
downloaddrakx-2b8ae0c0c8ac84f7828e7df44b70b7a7f68087db.tar
drakx-2b8ae0c0c8ac84f7828e7df44b70b7a7f68087db.tar.gz
drakx-2b8ae0c0c8ac84f7828e7df44b70b7a7f68087db.tar.bz2
drakx-2b8ae0c0c8ac84f7828e7df44b70b7a7f68087db.tar.xz
drakx-2b8ae0c0c8ac84f7828e7df44b70b7a7f68087db.zip
restrict the progs callable to a few one.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/standalone/interactive_http/Makefile8
-rwxr-xr-xperl-install/standalone/interactive_http/interactive_http.cgi3
-rw-r--r--perl-install/standalone/interactive_http/miniserv.init2
3 files changed, 10 insertions, 3 deletions
diff --git a/perl-install/standalone/interactive_http/Makefile b/perl-install/standalone/interactive_http/Makefile
index ca6a1bc37..d790226e5 100644
--- a/perl-install/standalone/interactive_http/Makefile
+++ b/perl-install/standalone/interactive_http/Makefile
@@ -3,11 +3,15 @@ FNAME=$(NAME)/drakxtools_http
PREFIX=
DATADIR=$(PREFIX)/usr/share
-all:
+all: index.html
+
+index.html: index.html.pl
+ perl $^ > $@
install:
install -D miniserv.init $(PREFIX)/etc/init.d/drakxtools_http
- install -D -m 644 miniserv.conf $(PREFIX)/etc/drakxtools_http.conf
+ install -D -m 644 authorised_progs $(PREFIX)/etc/drakxtools_http/authorised_progs
+ install -D -m 644 miniserv.conf $(PREFIX)/etc/drakxtools_http/conf
install -D -m 644 miniserv.pam $(PREFIX)/etc/pam.d/miniserv
install -D -m 644 miniserv.logrotate $(PREFIX)/etc/logrotate.d/drakxtools_http
diff --git a/perl-install/standalone/interactive_http/interactive_http.cgi b/perl-install/standalone/interactive_http/interactive_http.cgi
index cb184300a..48dd06fb8 100755
--- a/perl-install/standalone/interactive_http/interactive_http.cgi
+++ b/perl-install/standalone/interactive_http/interactive_http.cgi
@@ -62,6 +62,9 @@ sub force_exit_dead_prog {
sub spawn_server {
my ($prog) = @_;
+ my @authorised_progs = map { chomp($_) } cat_('/etc/drakxtools_http/authorised_progs');
+ member($prog, @authorised_progs) or error("You tried to call a non-authorised program");
+
fork and return;
$ENV{INTERACTIVE_HTTP} = $script_name;
diff --git a/perl-install/standalone/interactive_http/miniserv.init b/perl-install/standalone/interactive_http/miniserv.init
index 39c724dc7..e7673083c 100644
--- a/perl-install/standalone/interactive_http/miniserv.init
+++ b/perl-install/standalone/interactive_http/miniserv.init
@@ -8,7 +8,7 @@ server=/usr/share/libDrakX/$name/miniserv.pl
case "$1" in
'start')
echo -n "Starting $name: "
- perl $server /etc/$name.conf
+ perl $server /etc/$name/conf
touch /var/lock/subsys/drakxtools_http
echo $name
;;