Added CGI args parser
authorJamie Cameron <jcameron@webmin.com>
Wed, 10 Jun 2009 17:33:44 +0000 (17:33 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 10 Jun 2009 17:33:44 +0000 (17:33 +0000)
sshd/cgi_args.pl [new file with mode: 0644]

diff --git a/sshd/cgi_args.pl b/sshd/cgi_args.pl
new file mode 100644 (file)
index 0000000..4352774
--- /dev/null
@@ -0,0 +1,17 @@
+
+do 'sshd-lib.pl';
+
+sub cgi_args
+{
+my ($cgi) = @_;
+if ($cgi eq 'edit_keys.cgi') {
+       # Allows no args
+       return undef;
+       }
+elsif ($cgi eq 'edit_host.cgi') {
+       # First client host
+       my $hconf = &get_client_config();
+       return @$hconf ? 'idx=0' : 'new=1';
+       }
+return undef;
+}