# perchild.pl # Defines editors for the per-child UID module in apache 2.0 # The actual functions for most of these are still in core.pl sub perchild_directives { local $rv; $rv = [ [ 'AssignUserId', 0, 8, 'virtual virtualonly', 2.0 ], [ 'ChildPerUserId', 1, 8, 'global', 2.0 ], [ 'CoreDumpDirectory', 0, 9, 'global', 2.0 ], [ 'BindAddress Listen Port', 1, 1, 'global', 2.0, 10 ], [ 'ListenBacklog', 0, 1, 'global', 2.0 ], [ 'LockFile', 0, 9, 'global', 2.0 ], [ 'MaxRequestsPerChild', 0, 0, 'global', 2.0 ], [ 'MinSpareThreads', 0, 0, 'global', 2.0 ], [ 'MaxSpareThreads', 0, 0, 'global', 2.0 ], [ 'MaxThreadsPerChild', 0, 0, 'global', 2.0 ], [ 'NumServers', 0, 0, 'global', 2.0 ], [ 'PidFile', 0, 9, 'global', 2.0 ], [ 'ScoreBoardFile', 0, 9, 'global', 2.0 ], [ 'SendBufferSize', 0, 1, 'global', 2.0 ], [ 'StartThreads', 0, 0, 'global', 2.0 ], [ 'Group', 0, 8, 'global', 2.0, 9 ], [ 'User', 0, 8, 'global', 2.0, 10 ] ]; return &make_directives($rv, $_[0], "perchild"); } sub edit_AssignUserId { local $rv; $rv .= sprintf " %s\n", $_[0] ? "" : "checked", $text{'core_none'}; $rv .= sprintf "\n", $_[0] ? "checked" : ""; $rv .= &text('perchild_assignug', "[0]'>", "[1]'>"); return (2, $text{'perchild_assign'}, $rv); } sub save_AssignUserId { if ($in{'AssignUserId_def'}) { return ( [ ] ); } else { $in{'AssignUserId_uid'} =~ /^-?\d+$/ || &error($text{'perchild_euid'}); $in{'AssignUserId_gid'} =~ /^-?\d+$/ || &error($text{'perchild_egid'}); return ( [ "$in{'AssignUserId_uid'} $in{'AssignUserId_gid'}" ] ); } } sub edit_ChildPerUserId { local $rv = "
| $text{'perchild_num'} | \n". "$text{'perchild_uid'} | \n". "$text{'perchild_gid'} |
| \n"; $rv .= " | \n"; $rv .= " | \n"; $rv .= " |