diff options
author | Frank <frankthetank@users.noreply.github.com> | 2017-05-01 21:14:56 -0400 |
---|---|---|
committer | Frank <frankthetank@users.noreply.github.com> | 2017-05-01 21:14:56 -0400 |
commit | 11db9c8687a7e11fb5e94fe148f955a9496c1640 (patch) | |
tree | b58f30e50a804af07d109ac9c3d1dd53c3a4b3fa /src/etc | |
parent | f2e702b175ba03ce31fb847b408a7f5ab170ea25 (diff) | |
parent | 74ddcdb2be383425c745c2ed9cea1649ad73d25a (diff) | |
download | pfsense-11db9c8687a7e11fb5e94fe148f955a9496c1640.zip pfsense-11db9c8687a7e11fb5e94fe148f955a9496c1640.tar.gz |
Merge branch 'master' of https://github.com/pfsense/pfsense into dyndns_dreamhost
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/pfsense-utils.inc | 15 | ||||
-rw-r--r-- | src/etc/inc/pkg-utils.inc | 7 | ||||
-rw-r--r-- | src/etc/inc/system.inc | 4 | ||||
-rw-r--r-- | src/etc/inc/xmlparse.inc | 6 |
4 files changed, 19 insertions, 13 deletions
diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index 3fa06c0..301420c 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -2893,6 +2893,7 @@ function set_language() { function get_locale_list() { $locales = array( + "de_DE" => gettext("German (Germany)"), "en_US" => gettext("English"), "es" => gettext("Spanish"), "nb" => gettext("Norwegian Bokmål"), @@ -3216,19 +3217,15 @@ function pkg_call_plugins($plugin_type, $plugin_params) { return $results; } foreach ($config['installedpackages']['package'] as $package) { - if (!file_exists("/usr/local/pkg/" . $package['configurationfile'])) { - continue; - } - $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], 'packagegui'); - $pkgname = substr(reverse_strrchr($package['configurationfile'], "."), 0, -1); - if (is_array($pkg_config['plugins']['item'])) { - foreach ($pkg_config['plugins']['item'] as $plugin) { + if (is_array($package['plugins']['item'])) { + foreach ($package['plugins']['item'] as $plugin) { if ($plugin['type'] == $plugin_type) { - if (file_exists($pkg_config['include_file'])) { - require_once($pkg_config['include_file']); + if (file_exists($package['include_file'])) { + require_once($package['include_file']); } else { continue; } + $pkgname = substr(reverse_strrchr($package['configurationfile'], "."), 0, -1); $plugin_function = $pkgname . '_'. $plugin_type; $results[$pkgname] = call_user_func($plugin_function, $plugin_params); } diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc index 36e0885..df4ac49 100644 --- a/src/etc/inc/pkg-utils.inc +++ b/src/etc/inc/pkg-utils.inc @@ -835,6 +835,13 @@ function install_package_xml($package_name) { if (is_array($pkg_config['tabs'])) { $config['installedpackages']['package'][$pkgid]['tabs'] = $pkg_config['tabs']; } + /* plugins */ + if (isset($pkg_config['include_file'])) { + $config['installedpackages']['package'][$pkgid]['include_file'] = $pkg_config['include_file']; + } + if (is_array($pkg_config['plugins']['item'])) { + $config['installedpackages']['package'][$pkgid]['plugins']['item'] = $pkg_config['plugins']['item']; + } } else { pkg_debug("Unable to find config file\n"); update_status(gettext("Loading package configuration... failed!") . "\n\n" . gettext("Installation aborted.")); diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index b14e625..fb6e61a 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -1237,6 +1237,7 @@ function system_webgui_create_certificate() { $cert = array(); $cert['refid'] = uniqid(); $cert['descr'] = sprintf(gettext("webConfigurator default (%s)"), $cert['refid']); + $cert_hostname = "{$config['system']['hostname']}-{$cert['refid']}"; $dn = array( 'countryName' => "US", @@ -1244,7 +1245,8 @@ function system_webgui_create_certificate() { 'localityName' => "Locality", 'organizationName' => "{$g['product_name']} webConfigurator Self-Signed Certificate", 'emailAddress' => "admin@{$config['system']['hostname']}.{$config['system']['domain']}", - 'commonName' => "{$config['system']['hostname']}-{$cert['refid']}"); + 'commonName' => $cert_hostname, + 'subjectAltName' => "DNS:{$cert_hostname}"); $old_err_level = error_reporting(0); /* otherwise openssl_ functions throw warnings directly to a page screwing menu tab */ if (!cert_create($cert, null, 2048, 2000, $dn, "self-signed", "sha256")) { while ($ssl_err = openssl_error_string()) { diff --git a/src/etc/inc/xmlparse.inc b/src/etc/inc/xmlparse.inc index 5632e98..5d00d29 100644 --- a/src/etc/inc/xmlparse.inc +++ b/src/etc/inc/xmlparse.inc @@ -247,7 +247,7 @@ function dump_xml_config_sub($arr, $indent) { (substr($ent, 0, 9) == "ldap_attr") || (substr($ent, 0, 9) == "ldap_bind") || (substr($ent, 0, 11) == "ldap_basedn") || - (substr($ent, 0, 18) == "ldap_authcn") || + (substr($ent, 0, 11) == "ldap_authcn") || (substr($ent, 0, 19) == "ldap_extended_query")) { $xmlconfig .= "<$ent><![CDATA[" . htmlentities($cval) . "]]></$ent>\n"; } else { @@ -278,9 +278,9 @@ function dump_xml_config_sub($arr, $indent) { (substr($ent, 0, 9) == "ldap_attr") || (substr($ent, 0, 9) == "ldap_bind") || (substr($ent, 0, 11) == "ldap_basedn") || - (substr($ent, 0, 18) == "ldap_authcn") || + (substr($ent, 0, 11) == "ldap_authcn") || (substr($ent, 0, 19) == "ldap_extended_query") || - (substr($ent, 0, 5) == "text")) { + (substr($ent, 0, 4) == "text")) { $xmlconfig .= "<$ent><![CDATA[" . htmlentities($val) . "]]></$ent>\n"; } else { $xmlconfig .= "<$ent>" . htmlentities($val) . "</$ent>\n"; |