#!/usr/local/bin/perl
# edit_unix.cgi
# Save automatic unix user authentication options

require './acl-lib.pl';
&ReadParse();
$access{'unix'} && $access{'create'} && $access{'delete'} ||
	&error($text{'unix_ecannot'});

&lock_file($ENV{'MINISERV_CONFIG'});
&get_miniserv_config(\%miniserv);
if ($in{'unix_def'}) {
	delete($miniserv{'unixauth'});
	}
else {
	$miniserv{'unixauth'} = $in{'user'};
	}
&put_miniserv_config(\%miniserv);
&unlock_file($ENV{'MINISERV_CONFIG'});
&restart_miniserv();
&redirect("");

