#!/usr/local/bin/perl # edit_defaults.cgi # Display a form for editing default options require './xinetd-lib.pl'; &ui_print_header(undef, $text{'defs_title'}, ""); foreach $xi (&get_xinetd_config()) { if ($xi->{'name'} eq 'defaults') { $defs = $xi; } } $q = $defs->{'quick'}; print "
\n"; print "\n"; print "\n"; print "\n"; print "
$text{'defs_header'}
\n"; print "\n"; printf "\n"; print "\n"; printf "\n"; print "\n"; $lt = $q->{'log_type'}->[0] eq 'SYSLOG' ? 1 : $q->{'log_type'}->[0] eq 'FILE' ? 2 : 0; print "\n", $text{'defs_hard'}, $lt == 2 ? $q->{'log_type'}->[3] : ''; print "\n"; print "\n"; print "\n"; print "\n"; print "
$text{'serv_from'} %s\n", $q->{'only_from'} ? '' : 'checked', $text{'serv_from_def'}; printf " %s
\n", $q->{'only_from'} ? 'checked' : '', $text{'serv_from_sel'}; print "
$text{'serv_access'} %s\n", $q->{'no_access'} ? '' : 'checked', $text{'serv_access_def'}; printf " %s
\n", $q->{'no_access'} ? 'checked' : '', $text{'serv_access_sel'}; print "

$text{'defs_log'} \n"; printf " %s
\n", $lt == 0 ? 'checked' : '', $text{'defs_log_def'}; printf " %s\n", $lt == 1 ? 'checked' : '', $text{'defs_facility'}; %sconfig = &foreign_config("syslog"); &foreign_require("syslog", "syslog-lib.pl"); print " $text{'defs_level'}\n"; print "
\n"; printf " %s\n", $lt == 2 ? 'checked' : '', $text{'defs_file'}; printf " %s
\n", $lt == 2 ? $q->{'log_type'}->[1] : '', &file_chooser_button("file"); printf "   %s \n", $text{'defs_soft'}, $lt == 2 ? $q->{'log_type'}->[2] : ''; printf "  %s
$text{'defs_success'}$text{'defs_failure'}
\n"; print "
\n"; &ui_print_footer("", $text{'index_return'});