.
All rights reserved.
*/
/* ========================================================================== */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/* ========================================================================== */
]]>
Describe your package here
Describe your package requirements here
Currently there are no FAQ items provided.
doormanusers
Doorman: Users
Settings
/pkg_edit.php?xml=doorman.xml&id=0
Users
/pkg.php?xml=doormanusers.xml
installedpackages->package->$packagename->configuration->settings
Username
username
Ports
ports
Addresses
addresses
Description
description
Username
username
Enter the username here. This may be up to 32 characters in length.
input
Password
password
Enter the password here. This may be up to 64 characters in length.
password
Allowed ports
ports
Enter a whitespace-delimited list of the ports or service names *to* which this user may connect.
input
Allowed addresses
addresses
Enter a whitespace-delimited list of the IP addresses or hostnames *from* which this user may connect. Addresses may be unique or expressed as ranges using CIDR notation.
input
Description
description
Enter a description for this user here.
input
function sync_package_doorman_users() {
if ($_POST == "") $_POST = $config['installedpackages']['doormanusers']['config'];
conf_mount_rw();
config_lock();
global $config;
$fout = fopen("/usr/local/etc/doormand/guestlist","w");
fwrite($fout, "# This file was automatically generated by the pfSense\n# package management system.\n\n");
if($config['installedpackages']['doormanusers'])
foreach($config['installedpackages']['doormanusers']['config'] as $rowhelper) {
fwrite($fout, $rowhelper['username'] . "\t" . $rowhelper['password'] . "\n\t" . $rowhelper['ports'] . "\n\t" . $rowhelper['addresses'] . "\n\n");
}
fclose($fout);
restart_service("doorman");
conf_mount_ro();
config_unlock();
}
sync_package_doorman_users();