From 81f256991e7c42388b89e37f5f513a358dc7f632 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Sun, 6 Mar 2005 20:00:14 +0000 Subject: Add doorman (server) package. --- packages/doormanusers.xml | 90 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 packages/doormanusers.xml (limited to 'packages/doormanusers.xml') diff --git a/packages/doormanusers.xml b/packages/doormanusers.xml new file mode 100644 index 00000000..a195f2ad --- /dev/null +++ b/packages/doormanusers.xml @@ -0,0 +1,90 @@ + + doormanusers + Doorman: Users + pkg_edit.php?xml=freeradiussettings.xml&id=0 + + Doorman + Modify doormand settings and users. +
Services
+ doorman.xml +
+ + + 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 + + + + 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']['config'] != "") { + 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); + mwexec("killall -HUP doormand"); + conf_mount_ro(); + config_unlock(); + } + + + sync_package_doorman_users(); + +
+ -- cgit v1.2.3