#!/usr/local/bin/perl # edit_misc.cgi # Display all other SSHd options require './sshd-lib.pl'; &ui_print_header(undef, $text{'misc_title'}, "", "misc"); $conf = &get_sshd_config(); print "
\n"; print "\n"; print "\n"; print "
$text{'misc_header'}
\n"; &scmd(); $x11 = &find_value("X11Forwarding", $conf); print "\n", lc($x11) eq 'no' ? "checked" : "", $text{'no'}; } else { printf " %s\n", lc($x11) eq 'yes' ? "checked" : "", $text{'yes'}; printf " %s\n", lc($x11) eq 'yes' ? "" : "checked", $text{'no'}; } &ecmd(); if ($version{'type'} ne 'ssh' || $version{'number'} < 2) { &scmd(); $xoff = &find_value("X11DisplayOffset", $conf); print "\n"; &ecmd(); if ($version{'type'} eq 'ssh' || $version{'number'} >= 2) { &scmd(1); $xauth = &find_value("XAuthLocation", $conf); print "\n"; &ecmd(); } } if ($version{'type'} eq 'ssh' && $version{'number'} < 2) { &scmd(); $umask = &find_value("Umask", $conf); print "\n"; &ecmd(); } &scmd(); $syslog = &find_value("SyslogFacility", $conf); print "\n"; &ecmd(); if ($version{'type'} eq 'openssh') { &scmd(); $loglevel = &find_value("LogLevel", $conf); print "\n"; &ecmd(); } if ($version{'type'} ne 'ssh' || $version{'number'} < 2) { &scmd(); $bits = &find_value("ServerKeyBits", $conf); print "\n"; &ecmd(); } if ($version{'type'} eq 'ssh') { &scmd(); $quiet = &find_value("QuietMode", $conf); print "\n", lc($quiet) eq 'no' ? "checked" : "", $text{'no'}; &ecmd(); } if ($version{'type'} ne 'ssh' || $version{'number'} < 2) { &scmd(); $regen = &find_value("KeyRegenerationInterval", $conf); print "\n"; &ecmd(); } if ($version{'type'} eq 'ssh' && $version{'number'} < 2) { &scmd(); $fascist = &find_value("FascistLogging", $conf); print "\n", lc($fascist) eq 'yes' ? "" : "checked", $text{'no'}; &ecmd(); } if ($version{'type'} ne 'ssh' || $version{'number'} < 2) { if ($version{'type'} eq 'ssh' || $version{'number'} >= 2) { &scmd(1); $pid = &find_value("PidFile", $conf); print "\n"; &ecmd(); } } if ($version{'type'} eq 'openssh' && $version{'number'} >= 3.2) { &scmd(); $separ = &find_value("UsePrivilegeSeparation", $conf); print "\n", lc($separ) eq 'no' ? "checked" : "", $text{'no'}; &ecmd(); } print "
$text{'misc_x11'} \n"; if ($version{'type'} eq 'ssh') { printf " %s\n", lc($x11) eq 'no' ? "" : "checked", $text{'yes'}; printf " %s$text{'misc_xoff'} \n"; printf " %s\n", $xoff ? "" : "checked", $text{'default'}; printf "\n", $xoff ? "checked" : ""; print "$text{'misc_xauth'} \n"; printf " %s\n", $xauth ? "" : "checked", $text{'default'}; printf "\n", $xauth ? "checked" : ""; print "$text{'misc_umask'} \n"; printf " %s\n", $umask ? "" : "checked", $text{'misc_umask_def'}; printf "\n", $umask ? "checked" : ""; print "$text{'misc_syslog'} \n"; printf " %s\n", $syslog ? "" : "checked", $text{'default'}; printf "\n", $syslog ? "checked" : ""; print "$text{'misc_loglevel'} \n"; printf " %s\n", $loglevel ? "" : "checked", $text{'default'}; printf "\n", $loglevel ? "checked" : ""; print "$text{'misc_bits'} \n"; printf " %s\n", $bits ? "" : "checked", $text{'default'}; printf "\n", $bits ? "checked" : ""; print " $text{'bits'}$text{'misc_quiet'} \n"; printf " %s\n", lc($quiet) eq 'no' ? "" : "checked", $text{'yes'}; printf " %s$text{'misc_regen'} \n"; printf " %s\n", $regen ? "" : "checked", $text{'misc_regen_def'}; printf "\n", $regen ? "checked" : ""; print " $text{'secs'}$text{'misc_fascist'} \n"; printf " %s\n", lc($fascist) eq 'yes' ? "checked" : "", $text{'yes'}; printf " %s$text{'misc_pid'} \n"; printf " %s\n", $pid ? "" : "checked", $text{'default'}; printf "\n", $pid ? "checked" : ""; print "$text{'misc_separ'} \n"; printf " %s\n", lc($separ) eq 'no' ? "" : "checked", $text{'yes'}; printf " %s
\n"; print "
\n"; &ui_print_footer("", $text{'index_return'});