#!/usr/local/bin/perl
# edit_generic.cgi
# Edit an existing generic

require './sendmail-lib.pl';
require './generics-lib.pl';
&ReadParse();
$conf = &get_sendmailcf();
@gens = &list_generics(&generics_file($conf));
$access{'omode'} == 1 ||
$access{'omode'} == 2 && $gens[$in{'num'}]->{'from'} =~ /$access{'oaddrs'}/ ||
	&error($text{'gform_ecannot'});

&header($text{'gform_edit'}, "");
print "<hr>\n";
&generic_form($gens[$in{'num'}]);
print "<hr>\n";
&footer("list_generics.cgi", $text{'generics_return'},
	"", $text{'index_return'});
