Files

144 lines
4.5 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
<![CDATA[
/*
* sudo.xml
*
* part of pfSense (https://www.pfsense.org)
* Copyright (c) 2013-2025 Rubicon Communications, LLC (Netgate)
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
]]>
</copyright>
<name>sudo</name>
<title>System/Sudo</title>
<include_file>/usr/local/pkg/sudo.inc</include_file>
<menu>
<name>sudo</name>
<section>System</section>
<url>/pkg_edit.php?xml=sudo.xml</url>
</menu>
<fields>
<field>
<type>listtopic</type>
<name>Sudo Options</name>
</field>
<field>
<type>info</type>
<description>
<![CDATA[
User permission definitions for allowing the use of sudo by shell users to run commands as other users, such as root.<br /><br />
More information on the full command options may be found in the <a href="http://www.sudo.ws/sudoers.man.html">sudoers manual</a>.<br /><br />
By default the command is "ALL" meaning the user can run any commands. Leaving the commands field blank assumes "ALL".<br /><br />
A comma-separated list of commands can be supplied to limit the user to individual binaries. <strong>Full paths to binaries must be used.</strong>
]]>
</description>
</field>
<field>
<name>User Privileges</name>
<type>listtopic</type>
</field>
<field>
<fielddescr>User Permissions</fielddescr>
<fieldname>none</fieldname>
<type>rowhelper</type>
<rowhelper>
<rowhelperfield>
<fielddescr>User/Group</fielddescr>
<fieldname>username</fieldname>
<type>select_source</type>
<source><![CDATA[sudo_get_users()]]></source>
<source_name>descr</source_name>
<source_value>name</source_value>
<required/>
</rowhelperfield>
<rowhelperfield>
<fielddescr>Run As</fielddescr>
<fieldname>runas</fieldname>
<type>select_source</type>
<source><![CDATA[sudo_get_users(true)]]></source>
<source_name>descr</source_name>
<source_value>name</source_value>
<required/>
</rowhelperfield>
<rowhelperfield>
<fielddescr>No Password</fielddescr>
<fieldname>nopasswd</fieldname>
<type>checkbox</type>
</rowhelperfield>
<rowhelperfield>
<fielddescr>Command List</fielddescr>
<fieldname>cmdlist</fieldname>
<description>Commands the user may run. Comma-separated list, full paths required. Default: ALL</description>
<type>input</type>
<size>30</size>
<value>ALL</value>
</rowhelperfield>
</rowhelper>
</field>
<field>
<name>Advanced Settings</name>
<type>listtopic</type>
</field>
<field>
<fielddescr>Custom Configuration</fielddescr>
<fieldname>add_includedir</fieldname>
<type>select</type>
<default_value>none</default_value>
<options>
<option><name>Do Not Include</name><value>none</value></option>
<option><name>Include at Start</name><value>include_start</value></option>
<option><name>Include at End</name><value>include_end</value></option>
</options>
<description>
<![CDATA[
Include additional custom configuration files from <b>/usr/local/etc/sudoers.d</b>.<br /><br />
Including custom configuration files allows options to be set which are not supported by the GUI, but these files can be a potential security risk and they are not backed up.<br /><br />
]]>
</description>
</field>
</fields>
<plugins>
<item>
<type>plugin_xmlrpc_send</type>
</item>
<item>
<type>plugin_xmlrpc_recv</type>
</item>
<item>
<type>plugin_xmlrpc_recv_done</type>
</item>
</plugins>
<custom_php_install_command>
<![CDATA[
sudo_install();
sudo_write_config();
]]>
</custom_php_install_command>
<custom_php_resync_config_command>
<![CDATA[
sudo_write_config();
]]>
</custom_php_resync_config_command>
<custom_php_validation_command>
<![CDATA[
sudo_validate_commands($input_errors);
]]>
</custom_php_validation_command>
</packagegui>