summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/interactive_http/interactive_http.cgi
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/standalone/interactive_http/interactive_http.cgi
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/standalone/interactive_http/interactive_http.cgi')
-rwxr-xr-xperl-install/standalone/interactive_http/interactive_http.cgi3
1 files changed, 3 insertions, 0 deletions
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;