From 1ac4e6ae07da547bb0aa7845f7e5c245e59b7763 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Thu, 14 Jan 2016 23:35:35 -0600 Subject: Add config upgrade code to remove L7 config pieces, and file a notice where found. Ticket #5508 --- src/etc/inc/globals.inc | 2 +- src/etc/inc/upgrade_config.inc | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index 1098342..d0e0fd5 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -99,7 +99,7 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "13.5", + "latest_config" => "13.6", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 6217210..aa3ec70 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -4269,4 +4269,20 @@ function upgrade_134_to_135() { $config['syslog']['nolognginx'] = true; } } + +function upgrade_135_to_136() { + global $config; + + if (isset($config['l7shaper'])) { + file_notice("L7shaper", "Layer 7 shaping is no longer supported. Its configuration has been removed."); + unset($config['l7shaper']); + if (is_array($config['filter']['rule'])) { + foreach ($config['filter']['rule'] as $idx => $rule) { + if (isset($rule['l7container'])) { + unset($config['filter']['rule'][$idx]['l7container']); + } + } + } + } +} ?> -- cgit v1.1 From b7be2180d3213ba60a5a7f85860c4a4591bbc579 Mon Sep 17 00:00:00 2001 From: NOYB Date: Fri, 15 Jan 2016 02:16:11 -0800 Subject: HTML Compliance - VPN / IPsec / Tunnel / Edit Phase 1 End tag div seen, but there were open elements. Unclosed element form.
--- src/usr/local/www/vpn_ipsec_phase1.php | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/usr/local/www/vpn_ipsec_phase1.php b/src/usr/local/www/vpn_ipsec_phase1.php index 957fe55..c96f1fb 100644 --- a/src/usr/local/www/vpn_ipsec_phase1.php +++ b/src/usr/local/www/vpn_ipsec_phase1.php @@ -1106,6 +1106,7 @@ events.push(function() { }); //]]> +
Date: Fri, 15 Jan 2016 09:37:47 -0200 Subject: Respect force parameter even if message is the same of last sent --- src/etc/inc/notices.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/etc/inc/notices.inc b/src/etc/inc/notices.inc index 92f74a1..6224813 100644 --- a/src/etc/inc/notices.inc +++ b/src/etc/inc/notices.inc @@ -297,8 +297,8 @@ function notify_via_smtp($message, $force = false) { return; } - /* Do NOT send the same message twice */ - if (file_exists("/var/db/notices_lastmsg.txt")) { + /* Do NOT send the same message twice, except if $force is true */ + if (!$force && file_exists("/var/db/notices_lastmsg.txt")) { $lastmsg = trim(file_get_contents("/var/db/notices_lastmsg.txt")); if ($lastmsg == $message) { return; -- cgit v1.1 From b97c7ee5f88658195fc29ce02ea0e9b8e72d4ca6 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 15 Jan 2016 09:38:29 -0200 Subject: Update smtp class to latest version, fixes #5604 - SMTP class from http://www.phpclasses.org/package/14-PHP-Sends-e-mail-messages-via-SMTP-protocol.html - Adapt code to current version, only change was tls parameter became start_tls --- src/etc/inc/notices.inc | 2 +- src/etc/inc/smtp.inc | 1308 ++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 1171 insertions(+), 139 deletions(-) (limited to 'src') diff --git a/src/etc/inc/notices.inc b/src/etc/inc/notices.inc index 6224813..bfd5ca9 100644 --- a/src/etc/inc/notices.inc +++ b/src/etc/inc/notices.inc @@ -341,7 +341,7 @@ function send_smtp_message($message, $subject = "(no subject)", $force = false) $smtp->direct_delivery = 0; $smtp->ssl = (isset($config['notifications']['smtp']['ssl'])) ? 1 : 0; - $smtp->tls = (isset($config['notifications']['smtp']['tls'])) ? 1 : 0; + $smtp->start_tls = (isset($config['notifications']['smtp']['tls'])) ? 1 : 0; $smtp->debug = 0; $smtp->html_debug = 0; $smtp->localhost = $config['system']['hostname'] . "." . $config['system']['domain']; diff --git a/src/etc/inc/smtp.inc b/src/etc/inc/smtp.inc index 9a70e90..78340da 100644 --- a/src/etc/inc/smtp.inc +++ b/src/etc/inc/smtp.inc @@ -2,35 +2,547 @@ /* * smtp.php * - * @(#) $Header$ + * @(#) $Header: /opt2/ena/metal/smtp/smtp.php,v 1.48 2014/11/23 22:45:30 mlemos Exp $ * */ +/* +{metadocument} + + + net.manuellemos.smtp + + @(#) $Id: smtp.php,v 1.48 2014/11/23 22:45:30 mlemos Exp $ + Copyright (C) Manuel Lemos 1999-2011 + Sending e-mail messages via SMTP protocol + Manuel Lemos + mlemos-at-acm.org + + + en + Sending e-mail messages via SMTP protocol + If you are interested in translating the documentation of + this class to your own idiom, please + contact the author + mailto:authoraddress + . + Technical support for using this class may be obtained in the + smtpclass support forum. Just go to the support forum pages + page to browse the forum archives and post support request + messages: + + http://www.phpclasses.org/discuss/package/14/ + http://www.phpclasses.org/discuss/package/14/ + + To use this class just create a new object, set any variables + to configure its options and call the + SendMessage function to send a + message.It is not recommended that you use this + class alone unless you have deep understanding of Internet mail + standards on how to compose compliant e-mail messages. Instead, use + the + MIME message composing and sending class + http://www.phpclasses.org/mimemessage + and its sub-class SMTP message together with this SMTP class + to properly compose e-mail messages, so your messages are not + discarded for not being correctly composed. + + +{/metadocument} +*/ + class smtp_class { +/* +{metadocument} + + user + STRING + + + Define the authorized user when sending messages to a SMTP + server. + Set this variable to the user name when the SMTP server + requires authentication. + + +{/metadocument} +*/ var $user=""; + +/* +{metadocument} + + realm + STRING + + + Define the authentication realm when sending messages to a + SMTP server. + Set this variable when the SMTP server requires + authentication and if more than one authentication realm is + supported. + + +{/metadocument} +*/ var $realm=""; + +/* +{metadocument} + + password + STRING + + + Define the authorized user password when sending messages + to a SMTP server. + Set this variable to the user password when the SMTP server + requires authentication. + + +{/metadocument} +*/ var $password=""; + +/* +{metadocument} + + workstation + STRING + + + Define the client workstation name when sending messages + to a SMTP server. + Set this variable to the client workstation when the SMTP + server requires authentication identifiying the origin workstation + name. + + +{/metadocument} +*/ var $workstation=""; + +/* +{metadocument} + + authentication_mechanism + STRING + + + Force the use of a specific authentication mechanism. + Set it to an empty string to let the class determine the + authentication mechanism to use automatically based on the + supported mechanisms by the server and by the SASL client library + classes. + Set this variable to a specific mechanism name if you want to + override the automatic authentication mechanism selection. + + +{/metadocument} +*/ var $authentication_mechanism=""; + +/* +{metadocument} + + host_name + STRING + + + Define the SMTP server host name. + Set to the host name of the SMTP server to which you want to + relay the messages. + + +{/metadocument} +*/ var $host_name=""; + +/* +{metadocument} + + host_port + INTEGER + 25 + + Define the SMTP server host port. + Set to the TCP port of the SMTP server host to connect. + + +{/metadocument} +*/ var $host_port=25; + +/* +{metadocument} + + socks_host_name + STRING + + + Define the SOCKS server host name. + Set to the SOCKS server host name through which the SMTP + connection should be routed. Leave it empty if you do not want the + connections to be established through a SOCKS server. + + +{/metadocument} +*/ + var $socks_host_name = ''; + +/* +{metadocument} + + socks_host_port + INTEGER + 1080 + + Define the SOCKS server host port. + Set to the port of the SOCKS server host through which the + the SMTP connection should be routed. + + +{/metadocument} +*/ + var $socks_host_port=1080; + +/* +{metadocument} + + socks_version + STRING + 5 + + Set the SOCKS protocol version. + Change this value if SOCKS server you want to use is + listening to a different port. + + +{/metadocument} +*/ + var $socks_version='5'; + +/* +{metadocument} + + http_proxy_host_name + STRING + + + Define the HTTP proxy server host name. + Set to the HTTP proxy server host name through which the + SMTP connection should be routed. Leave it empty if you do not + want the connections to be established through an HTTP proxy. + + +{/metadocument} +*/ + var $http_proxy_host_name = ''; + +/* +{metadocument} + + http_proxy_host_port + INTEGER + 80 + + Define the HTTP proxy server host port. + Set to the port of the HTTP proxy server host through which + the SMTP connection should be routed. + + +{/metadocument} +*/ + var $http_proxy_host_port=80; + +/* +{metadocument} + + user_agent + STRING + SMTP Class (http://www.phpclasses.org/smtpclass $Revision: 1.48 $) + + Set the user agent used when connecting via an HTTP proxy. + Change this value only if for some reason you want emulate a + certain e-mail client. + + +{/metadocument} +*/ + var $user_agent='SMTP Class (http://www.phpclasses.org/smtpclass $Revision: 1.48 $)'; + +/* +{metadocument} + + ssl + BOOLEAN + 0 + + Define whether the connection to the SMTP server should be + established securely using SSL protocol. + Set to 1 if the SMTP server + requires secure connections using SSL protocol. + + +{/metadocument} +*/ var $ssl=0; - var $tls=0; + +/* +{metadocument} + + start_tls + BOOLEAN + 0 + + Define whether the connection to the SMTP server should use + encryption after the connection is established using TLS + protocol. + Set to 1 if the SMTP server + requires that authentication be done securely starting the TLS + protocol after the connection is established. + + +{/metadocument} +*/ + var $start_tls = 0; + +/* +{metadocument} + + localhost + STRING + + + Name of the local host computer + Set to the name of the computer connecting to the SMTP + server from the local network. + + +{/metadocument} +*/ var $localhost=""; + +/* +{metadocument} + + timeout + INTEGER + 0 + + Specify the connection timeout period in seconds. + Leave it set to 0 if you want + the connection attempts to wait forever. Change this value if for + some reason the timeout period seems insufficient or otherwise it + seems too long. + + +{/metadocument} +*/ var $timeout=0; + +/* +{metadocument} + + data_timeout + INTEGER + 0 + + Specify the timeout period in seconds to wait for data from + the server. + Leave it set to 0 if you want + to use the same value defined in the + timeout variable. Change this value + if for some reason the default data timeout period seems + insufficient or otherwise it seems too long. + + +{/metadocument} +*/ var $data_timeout=0; + +/* +{metadocument} + + direct_delivery + BOOLEAN + 0 + + Boolean flag that indicates whether the message should be + sent in direct delivery mode, i.e. the message is sent to the SMTP + server associated to the domain of the recipient instead of + relaying to the server specified by the + host_name variable. + Set this to 1 if you + want to send urgent messages directly to the recipient domain SMTP + server. + + +{/metadocument} +*/ var $direct_delivery=0; + +/* +{metadocument} + + error + STRING + + + Message that describes the error when a call to a class + function fails. + Check this variable when an error occurs to understand what + happened. + + +{/metadocument} +*/ var $error=""; + +/* +{metadocument} + + debug + BOOLEAN + 0 + + Specify whether it is necessary to output SMTP connection + debug information. + Set this variable to + 1 if you need to see + the progress of the SMTP connection and protocol dialog when you + need to understand the reason for delivery problems. + + +{/metadocument} +*/ var $debug=0; + +/* +{metadocument} + + html_debug + BOOLEAN + 0 + + Specify whether the debug information should be outputted in + HTML format. + Set this variable to + 1 if you need to see + the debug output in a Web page. + + +{/metadocument} +*/ var $html_debug=0; + +/* +{metadocument} + + esmtp + BOOLEAN + 1 + + Specify whether the class should attempt to use ESMTP + extensions supported by the server. + Set this variable to + 0 if for some reason you + want to avoid benefitting from ESMTP extensions. + + +{/metadocument} +*/ var $esmtp=1; - var $esmtp_host=""; + +/* +{metadocument} + + esmtp_extensions + HASH + + + Associative array with the list of ESMTP extensions + supported by the SMTP server. + Check this variable after connecting to the SMTP server to + determine which ESMTP extensions are supported. + + +{/metadocument} +*/ var $esmtp_extensions=array(); - var $maximum_piped_recipients=100; + +/* +{metadocument} + + exclude_address + STRING + + + Specify an address that should be considered invalid + when resolving host name addresses. + In some networks any domain name that does not exist is + resolved as a sub-domain of the default local domain. If the DNS is + configured in such way that it always resolves any sub-domain of + the default local domain to a given address, it is hard to + determine whether a given domain does not exist. + If your network is configured this way, you may set this variable + to the address that all sub-domains of the default local domain + resolves, so the class can assume that such address is invalid. + + +{/metadocument} +*/ var $exclude_address=""; + +/* +{metadocument} + + getmxrr + STRING + getmxrr + + Specify the name of the function that is called to determine + the SMTP server address of a given domain. + Change this to a working replacement of the PHP + getmxrr() function if this is not working in your system + and you want to send messages in direct delivery mode. + + +{/metadocument} +*/ var $getmxrr="GetMXRR"; + +/* +{metadocument} + + pop3_auth_host + STRING + + + Specify the server address for POP3 based authentication. + Set this variable to the address of the POP3 server if the + SMTP server requires POP3 based authentication. + + +{/metadocument} +*/ var $pop3_auth_host=""; + +/* +{metadocument} + + pop3_auth_port + INTEGER + 110 + + Specify the server port for POP3 based authentication. + Set this variable to the port of the POP3 server if the + SMTP server requires POP3 based authentication. + + +{/metadocument} +*/ var $pop3_auth_port=110; /* private variables - DO NOT ACCESS */ @@ -43,6 +555,8 @@ class smtp_class var $connected_domain=""; var $result_code; var $disconnected_error=0; + var $esmtp_host=""; + var $maximum_piped_recipients=100; /* Private methods - DO NOT CALL */ @@ -86,13 +600,19 @@ class smtp_class { $status=socket_get_status($this->connection); if($status["timed_out"]) - $this->error.=gettext(": data access time out"); + $this->error.=": data access time out"; elseif($status["eof"]) { - $this->error.=gettext(": the server disconnected"); + $this->error.=": the server disconnected"; $this->disconnected_error=1; } } + return($this->error); + } + + Function SetError($error) + { + return($this->error=$error); } Function GetLine() @@ -101,13 +621,13 @@ class smtp_class { if(feof($this->connection)) { - $this->error=gettext("reached the end of data while reading from the SMTP server connection"); + $this->error="reached the end of data while reading from the SMTP server conection"; return(""); } if(GetType($data=@fgets($this->connection,100))!="string" || strlen($data)==0) { - $this->SetDataAccessError(gettext("it was not possible to read line from the SMTP server")); + $this->SetDataAccessError("it was not possible to read line from the SMTP server"); return(""); } $line.=$data; @@ -129,7 +649,7 @@ class smtp_class $this->OutputDebug("C $line"); if(!@fputs($this->connection,"$line\r\n")) { - $this->SetDataAccessError(gettext("it was not possible to send a line to the SMTP server")); + $this->SetDataAccessError("it was not possible to send a line to the SMTP server"); return(0); } return(1); @@ -143,7 +663,7 @@ class smtp_class $this->OutputDebug("C $data"); if(!@fputs($this->connection,$data)) { - $this->SetDataAccessError(gettext("it was not possible to send data to the SMTP server")); + $this->SetDataAccessError("it was not possible to send data to the SMTP server"); return(0); } } @@ -208,49 +728,242 @@ class smtp_class return(1); } + Function Resolve($domain, &$ip, $server_type) + { + if(preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/',$domain)) + $ip=$domain; + else + { + if($this->debug) + $this->OutputDebug('Resolving '.$server_type.' server domain "'.$domain.'"...'); + if(!strcmp($ip=@gethostbyname($domain),$domain)) + $ip=""; + } + if(strlen($ip)==0 + || (strlen($this->exclude_address) + && !strcmp(@gethostbyname($this->exclude_address),$ip))) + return($this->SetError("could not resolve the host domain \"".$domain."\"")); + return(''); + } + Function ConnectToHost($domain, $port, $resolve_message) { - if($this->ssl || $this->tls) + if($this->ssl) { $version=explode(".",function_exists("phpversion") ? phpversion() : "3.0.7"); $php_version=intval($version[0])*1000000+intval($version[1])*1000+intval($version[2]); if($php_version<4003000) - return(gettext("establishing SSL connections requires at least PHP version 4.3.0")); + return("establishing SSL connections requires at least PHP version 4.3.0"); if(!function_exists("extension_loaded") || !extension_loaded("openssl")) - return(gettext("establishing SSL connections requires the OpenSSL extension enabled")); + return("establishing SSL connections requires the OpenSSL extension enabled"); + } + if(strlen($this->Resolve($domain, $ip, 'SMTP'))) + return($this->error); + if(strlen($this->socks_host_name)) + { + switch($this->socks_version) + { + case '4': + $version = 4; + break; + case '5': + $version = 5; + break; + default: + return('it was not specified a supported SOCKS protocol version'); + break; + } + $host_ip = $ip; + $host_port = $port; + if(strlen($this->error = $this->Resolve($this->socks_host_name, $ip, 'SOCKS'))) + return($this->error); + if($this->ssl) + $ip="ssl://".($socks_host = $this->socks_host_name); + else + $socks_host = $ip; + if($this->debug) + $this->OutputDebug("Connecting to SOCKS server \"".$socks_host."\" port ".$this->http_proxy_host_port."..."); + if(($this->connection=($this->timeout ? fsockopen($ip, $this->socks_host_port, $errno, $error, $this->timeout) : fsockopen($ip, $this->socks_host_port, $errno, $error)))) + { + $timeout=($this->data_timeout ? $this->data_timeout : $this->timeout); + if($timeout + && function_exists("socket_set_timeout")) + socket_set_timeout($this->connection,$timeout,0); + if(strlen($this->socks_host_name)) + { + if($this->debug) + $this->OutputDebug('Connected to the SOCKS server '.$this->socks_host_name); + $send_error = 'it was not possible to send data to the SOCKS server'; + $receive_error = 'it was not possible to receive data from the SOCKS server'; + switch($version) + { + case 4: + $command = 1; + $user = ''; + if(!fputs($this->connection, chr($version).chr($command).pack('nN', $host_port, ip2long($host_ip)).$user.Chr(0))) + $error = $this->SetDataAccessError($send_error); + else + { + $response = fgets($this->connection, 9); + if(strlen($response) != 8) + $error = $this->SetDataAccessError($receive_error); + else + { + $socks_errors = array( + "\x5a"=>'', + "\x5b"=>'request rejected', + "\x5c"=>'request failed because client is not running identd (or not reachable from the server)', + "\x5d"=>'request failed because client\'s identd could not confirm the user ID string in the request', + ); + $error_code = $response[1]; + $error = (IsSet($socks_errors[$error_code]) ? $socks_errors[$error_code] : 'unknown'); + if(strlen($error)) + $error = 'SOCKS error: '.$error; + } + } + break; + case 5: + if($this->debug) + $this->OutputDebug('Negotiating the authentication method ...'); + $methods = 1; + $method = 0; + if(!fputs($this->connection, chr($version).chr($methods).chr($method))) + $error = $this->SetDataAccessError($send_error); + else + { + $response = fgets($this->connection, 3); + if(strlen($response) != 2) + $error = $this->SetDataAccessError($receive_error); + elseif(Ord($response[1]) != $method) + $error = 'the SOCKS server requires an authentication method that is not yet supported'; + else + { + if($this->debug) + $this->OutputDebug('Connecting to SMTP server IP '.$host_ip.' port '.$host_port.'...'); + $command = 1; + $address_type = 1; + if(!fputs($this->connection, chr($version).chr($command)."\x00".chr($address_type).pack('Nn', ip2long($host_ip), $host_port))) + $error = $this->SetDataAccessError($send_error); + else + { + $response = fgets($this->connection, 11); + if(strlen($response) != 10) + $error = $this->SetDataAccessError($receive_error); + else + { + $socks_errors = array( + "\x00"=>'', + "\x01"=>'general SOCKS server failure', + "\x02"=>'connection not allowed by ruleset', + "\x03"=>'Network unreachable', + "\x04"=>'Host unreachable', + "\x05"=>'Connection refused', + "\x06"=>'TTL expired', + "\x07"=>'Command not supported', + "\x08"=>'Address type not supported' + ); + $error_code = $response[1]; + $error = (IsSet($socks_errors[$error_code]) ? $socks_errors[$error_code] : 'unknown'); + if(strlen($error)) + $error = 'SOCKS error: '.$error; + } + } + } + } + break; + default: + $error = 'support for SOCKS protocol version '.$this->socks_version.' is not yet implemented'; + break; + } + if(strlen($this->error = $error)) + { + fclose($this->connection); + return($error); + } + } + return(''); + } + } + elseif(strlen($this->http_proxy_host_name)) + { + if(strlen($error = $this->Resolve($this->http_proxy_host_name, $ip, 'SMTP'))) + return($error); + if($this->ssl) + $ip = 'ssl://'.($proxy_host = $this->http_proxy_host_name); + else + $proxy_host = $ip; + if($this->debug) + $this->OutputDebug("Connecting to HTTP proxy server \"".$ip."\" port ".$this->http_proxy_host_port."..."); + if(($this->connection=($this->timeout ? @fsockopen($ip, $this->http_proxy_host_port, $errno, $error, $this->timeout) : @fsockopen($ip, $this->http_proxy_host_port, $errno, $error)))) + { + if($this->debug) + $this->OutputDebug('Connected to HTTP proxy host "'.$this->http_proxy_host_name.'".'); + $timeout=($this->data_timeout ? $this->data_timeout : $this->timeout); + if($timeout + && function_exists("socket_set_timeout")) + socket_set_timeout($this->connection,$timeout,0); + if($this->PutLine('CONNECT '.$domain.':'.$port.' HTTP/1.0') + && $this->PutLine('User-Agent: '.$this->user_agent) + && $this->PutLine('')) + { + if(GetType($response = $this->GetLine()) == 'string') + { + if(!preg_match('/^http\\/[0-9]+\\.[0-9]+[ \t]+([0-9]+)[ \t]*(.*)$/i', $response,$matches)) + return($this->SetError("3 it was received an unexpected HTTP response status")); + $error = $matches[1]; + switch($error) + { + case '200': + for(;;) + { + if(GetType($response = $this->GetLine()) != 'string') + break; + if(strlen($response) == 0) + return(''); + } + break; + default: + $this->error = 'the HTTP proxy returned error '.$error.' '.$matches[2]; + break; + } + } + } + if($this->debug) + $this->OutputDebug("Disconnected."); + fclose($this->connection); + $this->connection = 0; + return($this->error); + } } - if(preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/',$domain)) - $ip=$domain; else { + if($this->ssl) + $ip = 'ssl://'.($host = $domain); + elseif($this->start_tls) + $ip = $host = $domain; + else + $host = $ip; if($this->debug) - $this->OutputDebug($resolve_message); - if(!strcmp($ip=@gethostbyname($domain),$domain)) - return(sprintf(gettext("could not resolve host \"%s\""), $domain)); + $this->OutputDebug("Connecting to SMTP server \"".$host."\" port ".$port."..."); + if(($this->connection=($this->timeout ? @fsockopen($ip, $port, $errno, $error, $this->timeout) : @fsockopen($ip, $port, $errno, $error)))) + return(""); } - if(strlen($this->exclude_address) - && !strcmp(@gethostbyname($this->exclude_address),$ip)) - return(sprintf(gettext("domain \"%s\" resolved to an address excluded to be valid"), $domain)); - if($this->debug) - $this->OutputDebug(sprintf(gettext('Connecting to host address "%1$s" port %2$s...'), $ip, $port)); - if(($this->connection=($this->timeout ? @fsockopen(($this->ssl ? "ssl://" : "").$ip,$port,$errno,$error,$this->timeout) : @fsockopen(($this->ssl ? "ssl://" : "").$ip,$port)))) - return(""); $error=($this->timeout ? strval($error) : "??"); switch($error) { case "-3": - return(gettext("-3 socket could not be created")); + return("-3 socket could not be created"); case "-4": - return(sprintf(gettext("-4 dns lookup on hostname \"%s\" failed"), $domain)); + return("-4 dns lookup on hostname \"".$domain."\" failed"); case "-5": - return(gettext("-5 connection refused or timed out")); + return("-5 connection refused or timed out"); case "-6": - return(gettext("-6 fdopen() call failed")); + return("-6 fdopen() call failed"); case "-7": - return(gettext("-7 setvbuf() call failed")); + return("-7 setvbuf() call failed"); } - return(sprintf(gettext('could not connect to the host "%1$s": %2$s'), $domain, $error)); + return("could not connect to the host \"".$domain."\": ".$error); } Function SASLAuthenticate($mechanisms, $credentials, &$authenticated, &$mechanism) @@ -259,7 +972,7 @@ class smtp_class if(!function_exists("class_exists") || !class_exists("sasl_client_class")) { - $this->error=gettext("it is not possible to authenticate using the specified mechanism because the SASL library class is not loaded"); + $this->error="it is not possible to authenticate using the specified mechanism because the SASL library class is not loaded"; return(0); } $sasl=new sasl_client_class; @@ -283,19 +996,19 @@ class smtp_class case SASL_NOMECH: if(strlen($this->authentication_mechanism)) { - $this->error=printf(gettext('authenticated mechanism %1$s may not be used: %2$s'), $this->authentication_mechanism, $sasl->error); + $this->error="authenticated mechanism ".$this->authentication_mechanism." may not be used: ".$sasl->error; return(0); } break; default: - $this->error=gettext("Could not start the SASL authentication client:") . " ".$sasl->error; + $this->error="Could not start the SASL authentication client: ".$sasl->error; return(0); } if(strlen($mechanism=$sasl->mechanism)) { if($this->PutLine("AUTH ".$sasl->mechanism.(IsSet($message) ? " ".base64_encode($message) : ""))==0) { - $this->error=gettext("Could not send the AUTH command"); + $this->error="Could not send the AUTH command"; return(0); } if(!$this->VerifyResultLines(array("235","334"),$responses)) @@ -310,7 +1023,7 @@ class smtp_class $response=base64_decode($responses[0]); break; default: - $this->error=gettext("Authentication error:") . " ".$responses[0]; + $this->error="Authentication error: ".$responses[0]; return(0); } for(;!$authenticated;) @@ -325,7 +1038,7 @@ class smtp_class case SASL_CONTINUE: if($this->PutLine(base64_encode($message))==0) { - $this->error=gettext("Could not send the authentication step message"); + $this->error="Could not send the authentication step message"; return(0); } if(!$this->VerifyResultLines(array("235","334"),$responses)) @@ -340,26 +1053,97 @@ class smtp_class $response=base64_decode($responses[0]); break; default: - $this->error=gettext("Authentication error:") . " ".$responses[0]; + $this->error="Authentication error: ".$responses[0]; return(0); } break; default: - $this->error=gettext("Could not process the SASL authentication step:") . " ".$sasl->error; + $this->error="Could not process the SASL authentication step: ".$sasl->error; return(0); } } } return(1); } + + Function StartSMTP($localhost) + { + $success = 1; + $this->esmtp_extensions = array(); + $fallback=1; + if($this->esmtp + || strlen($this->user)) + { + if($this->PutLine('EHLO '.$localhost)) + { + if(($success_code=$this->VerifyResultLines('250',$responses))>0) + { + $this->esmtp_host=$this->Tokenize($responses[0]," "); + for($response=1;$responseTokenize($responses[$response]," ")); + $this->esmtp_extensions[$extension]=$this->Tokenize(""); + } + $success=1; + $fallback=0; + } + else + { + if($success_code==0) + { + $code=$this->Tokenize($this->error," -"); + switch($code) + { + case "421": + $fallback=0; + break; + } + } + } + } + else + $fallback=0; + } + if($fallback) + { + if($this->PutLine("HELO $localhost") + && $this->VerifyResultLines("250",$responses)>0) + $success=1; + } + return($success); + } /* Public methods */ +/* +{metadocument} + + Connect + BOOLEAN + + Connect to an SMTP server. + Call this function as first step to send e-mail messages. + The function returns + 1 if the connection is + successfully established. + + + domain + STRING + + + Specify the domain of the recipient when using the direct + delivery mode. + + + +{/metadocument} +*/ Function Connect($domain="") { if(strcmp($this->state,"Disconnected")) { - $this->error=gettext("connection is already established"); + $this->error="connection is already established"; return(0); } $this->disconnected_error=0; @@ -397,24 +1181,24 @@ class smtp_class $user=$this->user; if(strlen($user)==0) { - $this->error=gettext("it was not specified the POP3 authentication user"); + $this->error="it was not specified the POP3 authentication user"; return(0); } $password=$this->password; if(strlen($password)==0) { - $this->error=gettext("it was not specified the POP3 authentication password"); + $this->error="it was not specified the POP3 authentication password"; return(0); } $domain=$this->pop3_auth_host; - $this->error=$this->ConnectToHost($domain, $this->pop3_auth_port, sprintf(gettext("Resolving POP3 authentication host \"%s\"..."), $domain)); + $this->error=$this->ConnectToHost($domain, $this->pop3_auth_port, "Resolving POP3 authentication host \"".$domain."\"..."); if(strlen($this->error)) return(0); if(strlen($response=$this->GetLine())==0) return(0); if(strcmp($this->Tokenize($response," "),"+OK")) { - $this->error=gettext("POP3 authentication server greeting was not found"); + $this->error="POP3 authentication server greeting was not found"; return(0); } if(!$this->PutLine("USER ".$this->user) @@ -422,7 +1206,7 @@ class smtp_class return(0); if(strcmp($this->Tokenize($response," "),"+OK")) { - $this->error=gettext("POP3 authentication user was not accepted:") . " ".$this->Tokenize("\r\n"); + $this->error="POP3 authentication user was not accepted: ".$this->Tokenize("\r\n"); return(0); } if(!$this->PutLine("PASS ".$password) @@ -430,7 +1214,7 @@ class smtp_class return(0); if(strcmp($this->Tokenize($response," "),"+OK")) { - $this->error=gettext("POP3 authentication password was not accepted:") . " ".$this->Tokenize("\r\n"); + $this->error="POP3 authentication password was not accepted: ".$this->Tokenize("\r\n"); return(0); } fclose($this->connection); @@ -439,13 +1223,13 @@ class smtp_class } if(count($hosts)==0) { - $this->error=gettext("could not determine the SMTP to connect"); + $this->error="could not determine the SMTP to connect"; return(0); } for($host=0, $error="not connected";strlen($error) && $hostConnectToHost($domain, $this->host_port, sprintf(gettext("Resolving SMTP server domain \"%s\"..."), $domain)); + $error=$this->ConnectToHost($domain, $this->host_port, "Resolving SMTP server domain \"$domain\"..."); } if(strlen($error)) { @@ -457,21 +1241,49 @@ class smtp_class && function_exists("socket_set_timeout")) socket_set_timeout($this->connection,$timeout,0); if($this->debug) - $this->OutputDebug(sprintf(gettext("Connected to SMTP server \"%s\"."), $domain)); + $this->OutputDebug("Connected to SMTP server \"".$domain."\"."); + if(!strcmp($localhost=$this->localhost,"") + && !strcmp($localhost=getenv("SERVER_NAME"),"") + && !strcmp($localhost=getenv("HOST"),"")) + $localhost="localhost"; + $success=0; if($this->VerifyResultLines("220",$responses)>0) { - // Send our HELLO - $success = $this->hello($this->hostname()); - if ($this->tls) - $success = $this->startTLS(); - + $success = $this->StartSMTP($localhost); + if($this->start_tls) + { + if(!IsSet($this->esmtp_extensions["STARTTLS"])) + { + $this->error="server does not support starting TLS"; + $success=0; + } + elseif(!function_exists('stream_socket_enable_crypto')) + { + $this->error="this PHP installation or version does not support starting TLS"; + $success=0; + } + elseif($success = ($this->PutLine('STARTTLS') + && $this->VerifyResultLines('220',$responses)>0)) + { + $this->OutputDebug('Starting TLS cryptograpic protocol'); + if(!($success = stream_socket_enable_crypto($this->connection, 1, STREAM_CRYPTO_METHOD_TLS_CLIENT))) + $this->error = 'could not start TLS connection encryption protocol'; + else + { + $this->OutputDebug('TLS started'); + $success = $this->StartSMTP($localhost); + } + } + } if($success && strlen($this->user) && strlen($this->pop3_auth_host)==0) { if(!IsSet($this->esmtp_extensions["AUTH"])) { - $this->error = gettext("server does not require authentication"); + $this->error="server does not require authentication"; + if(IsSet($this->esmtp_extensions["STARTTLS"])) + $this->error .= ', it probably requires starting TLS'; $success=0; } else @@ -535,7 +1347,7 @@ class smtp_class if($success && strlen($mechanism)==0) { - $this->error=gettext("it is not supported any of the authentication mechanisms required by the server"); + $this->error="it is not supported any of the authentication mechanisms required by the server"; $success=0; } } @@ -553,65 +1365,36 @@ class smtp_class } return($success); } +/* +{metadocument} + + +{/metadocument} +*/ - Function hostname() { - if(!strcmp($localhost=$this->localhost,"") - && !strcmp($localhost=getenv("SERVER_NAME"),"") - && !strcmp($localhost=getenv("HOST"),"") - && !strcmp($localhost=getenv("HOSTNAME"),"") - && !strcmp($localhost=gethostname(),"")) - $localhost="localhost"; - - return $localhost; - } - - Function hello() - { - $success = 0; - $fallback = 1; - if ($this->esmtp || strlen($this->user)) { - if ($this->PutLine("EHLO ".$this->hostname())) { - if (($success_code = $this->VerifyResultLines("250",$responses)) > 0) { - $this->esmtp_host = $this->Tokenize($responses[0]," "); - for($response=1;$responseTokenize($responses[$response]," ")); - $this->esmtp_extensions[$extension]=$this->Tokenize(""); - } - $success = 1; - $fallback = 0; - } else { - if ($success_code == 0) { - $code = $this->Tokenize($this->error," -"); - switch($code) { - case "421": - $fallback=0; - break; - } - } - } - } else - $fallback=0; - } - - if ($fallback) { - if ($this->PutLine("HELO $localhost") && $this->VerifyResultLines("250",$responses)>0) - $success=1; - } - return $success; - } - - Function startTLS() { - if ($this->PutLine("STARTTLS") && $this->VerifyResultLines("220",$responses)>0) { - if (!stream_socket_enable_crypto($this->connection,true,STREAM_CRYPTO_METHOD_TLS_CLIENT)) { - return false; - } else { - // Resend HELO since session has been reset - return $this->hello($this->hostname); - } - } else - return false; - } - +/* +{metadocument} + + MailFrom + BOOLEAN + + Set the address of the message sender. + Call this function right after establishing a connection with + the Connect function. + The function returns + 1 if the sender address is + successfully set. + + + sender + STRING + + E-mail address of the sender. + + + +{/metadocument} +*/ Function MailFrom($sender) { if($this->direct_delivery) @@ -625,7 +1408,7 @@ class smtp_class $sender=$this->direct_sender; break; default: - $this->error=gettext("direct delivery connection is already established and sender is already set"); + $this->error="direct delivery connection is already established and sender is already set"; return(0); } } @@ -633,7 +1416,7 @@ class smtp_class { if(strcmp($this->state,"Connected")) { - $this->error=gettext("connection is not in the initial state"); + $this->error="connection is not in the initial state"; return(0); } } @@ -649,13 +1432,43 @@ class smtp_class $this->pending_recipients=0; return(1); } +/* +{metadocument} + + +{/metadocument} +*/ +/* +{metadocument} + + SetRecipient + BOOLEAN + + Set the address of a message recipient. + Call this function repeatedly for each recipient right after + setting the message sender with the + MailFrom function. + The function returns + 1 if the recipient address is + successfully set. + + + recipient + STRING + + E-mail address of a recipient. + + + +{/metadocument} +*/ Function SetRecipient($recipient) { if($this->direct_delivery) { if(GetType($at=strrpos($recipient,"@"))!="integer") - return(gettext("it was not specified a valid direct recipient")); + return("it was not specified a valid direct recipient"); $domain=substr($recipient,$at+1); switch($this->state) { @@ -674,12 +1487,12 @@ class smtp_class case "RecipientSet": if(strcmp($this->connected_domain,$domain)) { - $this->error=gettext("it is not possible to deliver directly to recipients of different domains"); + $this->error="it is not possible to deliver directly to recipients of different domains"; return(0); } break; default: - $this->error=gettext("connection is already established and the recipient is already set"); + $this->error="connection is already established and the recipient is already set"; return(0); } } @@ -691,7 +1504,7 @@ class smtp_class case "RecipientSet": break; default: - $this->error=gettext("connection is not in the recipient setting state"); + $this->error="connection is not in the recipient setting state"; return(0); } } @@ -715,12 +1528,36 @@ class smtp_class $this->state="RecipientSet"; return(1); } +/* +{metadocument} + + +{/metadocument} +*/ +/* +{metadocument} + + StartData + BOOLEAN + + Tell the SMTP server that the message data will start being + sent. + Call this function right after you are done setting all the + message recipients with the + SetRecipient function. + The function returns + 1 if the server is ready to + start receiving the message data. + + +{/metadocument} +*/ Function StartData() { if(strcmp($this->state,"RecipientSet")) { - $this->error=gettext("connection is not in the start sending data state"); + $this->error="connection is not in the start sending data state"; return(0); } $this->error=""; @@ -736,32 +1573,110 @@ class smtp_class $this->state="SendingData"; return(1); } +/* +{metadocument} + + +{/metadocument} +*/ - Function PrepareData(&$data,&$output,$preg=1) +/* +{metadocument} + + PrepareData + STRING + + Prepare message data to normalize line breaks and escaping + lines that contain single dots. + Call this function if the message data you want to send may + contain line breaks that are not the + sequence or it may contain + lines that just have a single dot. + Resulting normalized messages data. + + + data + STRING + + Message data to be prepared. + + + +{/metadocument} +*/ + Function PrepareData($data) { - if($preg - && function_exists("preg_replace")) - $output=preg_replace(array("/\n\n|\r\r/","/(^|[^\r])\n/","/\r([^\n]|\$)/D","/(^|\n)\\./"),array("\r\n\r\n","\\1\r\n","\r\n\\1","\\1.."),$data); - else - $output=ereg_replace("(^|\n)\\.","\\1..",ereg_replace("\r([^\n]|\$)","\r\n\\1",ereg_replace("(^|[^\r])\n","\\1\r\n",ereg_replace("\n\n|\r\r","\r\n\r\n",$data)))); + return(preg_replace(array("/\n\n|\r\r/","/(^|[^\r])\n/","/\r([^\n]|\$)/D","/(^|\n)\\./"),array("\r\n\r\n","\\1\r\n","\r\n\\1","\\1.."),$data)); } +/* +{metadocument} + + +{/metadocument} +*/ +/* +{metadocument} + + SendData + BOOLEAN + + Send message data. + Call this function repeatedly for all message data blocks + to be sent right after start sending message data with the + StartData function. + The function returns + 1 if the message data was + sent to the SMTP server successfully. + + + data + STRING + + Message data to be sent. + + + +{/metadocument} +*/ Function SendData($data) { if(strcmp($this->state,"SendingData")) { - $this->error=gettext("connection is not in the sending data state"); + $this->error="connection is not in the sending data state"; return(0); } $this->error=""; return($this->PutData($data)); } +/* +{metadocument} + + +{/metadocument} +*/ +/* +{metadocument} + + EndSendingData + BOOLEAN + + Tell the server that all the message data was sent. + Call this function when you are done with sending the message + data with the SendData function. + The function returns + 1 if the server accepted the + message. + + +{/metadocument} +*/ Function EndSendingData() { if(strcmp($this->state,"SendingData")) { - $this->error=gettext("connection is not in the sending data state"); + $this->error="connection is not in the sending data state"; return(0); } $this->error=""; @@ -771,7 +1686,31 @@ class smtp_class $this->state="Connected"; return(1); } +/* +{metadocument} + + +{/metadocument} +*/ +/* +{metadocument} + + ResetConnection + BOOLEAN + + Reset an already established SMTP connection to the initial + state. + Call this function when there was an error sending a message + and you need to skip to sending another message without + disconnecting. + The function returns + 1 if the connection was + resetted successfully. + + +{/metadocument} +*/ Function ResetConnection() { switch($this->state) @@ -792,12 +1731,44 @@ class smtp_class $this->state="Connected"; return(1); } +/* +{metadocument} + + +{/metadocument} +*/ +/* +{metadocument} + + Disconnect + BOOLEAN + + Terminate a previously opened connection. + Call this function after you are done sending your + messages. + The function returns + 1 if the connection was + successfully closed. + + + quit + BOOLEAN + 1 + + Boolean option that tells whether the class should + perform the final connection quit handshake, or just close the + connection without waiting. + + + +{/metadocument} +*/ Function Disconnect($quit=1) { if(!strcmp($this->state,"Disconnected")) { - $this->error=gettext("it was not previously established a SMTP connection"); + $this->error="it was not previously established a SMTP connection"; return(0); } $this->error=""; @@ -817,7 +1788,58 @@ class smtp_class $this->OutputDebug("Disconnected."); return(1); } +/* +{metadocument} + + +{/metadocument} +*/ +/* +{metadocument} + + SendMessage + BOOLEAN + + Send a message in a single call. + Call this function if you want to send a single messages to a + small number of recipients in a single call. + The function returns + 1 if the message was sent + successfully. + + + sender + STRING + + E-mail address of the sender. + + + + recipients + STRING + + Array with a list of the e-mail addresses of the + recipients of the message. + + + + headers + ARRAY + + Array with a list of the header lines of the message. + + + + body + STRING + + Body data of the message. + + + +{/metadocument} +*/ Function SendMessage($sender,$recipients,$headers,$body) { if(($success=$this->Connect())) @@ -834,13 +1856,9 @@ class smtp_class { for($header_data="",$header=0;$headerSendData($header_data."\r\n"))) - { - $this->PrepareData($body,$body_data); - $success=$this->SendData($body_data); - } - if($success) - $success=$this->EndSendingData(); + $success=($this->SendData($header_data."\r\n") + && $this->SendData($this->PrepareData($body)) + && $this->EndSendingData()); } } $error=$this->error; @@ -852,7 +1870,21 @@ class smtp_class } return($success); } +/* +{metadocument} + + +{/metadocument} +*/ }; -?> +/* + +{metadocument} + +{/metadocument} + +*/ + +?> \ No newline at end of file -- cgit v1.1 From 89b7a21d679fdecfb0660facdb798b85834d677c Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 15 Jan 2016 11:14:36 -0200 Subject: Update sasl classes to last version and remove all style customizations - http://www.phpclasses.org/package/1888-PHP-Single-API-for-standard-authentication-mechanisms.html --- src/etc/inc/basic_sasl_client.inc | 8 +++----- src/etc/inc/login_sasl_client.inc | 6 +++--- src/etc/inc/ntlm_sasl_client.inc | 26 +++++++++++++------------- src/etc/inc/plain_sasl_client.inc | 10 +++++----- src/etc/inc/sasl.inc | 4 ++-- 5 files changed, 26 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/etc/inc/basic_sasl_client.inc b/src/etc/inc/basic_sasl_client.inc index c817664..b2972b5 100644 --- a/src/etc/inc/basic_sasl_client.inc +++ b/src/etc/inc/basic_sasl_client.inc @@ -21,7 +21,7 @@ class basic_sasl_client_class Function Start(&$client, &$message, &$interactions) { - if ($this->state!=SASL_BASIC_STATE_START) + if($this->state!=SASL_BASIC_STATE_START) { $client->error="Basic authentication state is not at the start"; return(SASL_FAIL); @@ -33,21 +33,19 @@ class basic_sasl_client_class $defaults=array( ); $status=$client->GetCredentials($this->credentials,$defaults,$interactions); - if ($status==SASL_CONTINUE) + if($status==SASL_CONTINUE) { $message=$this->credentials["user"].":".$this->credentials["password"]; $this->state=SASL_BASIC_STATE_DONE; } else - { Unset($message); - } return($status); } Function Step(&$client, $response, &$message, &$interactions) { - switch ($this->state) + switch($this->state) { case SASL_BASIC_STATE_DONE: $client->error="Basic authentication was finished without success"; diff --git a/src/etc/inc/login_sasl_client.inc b/src/etc/inc/login_sasl_client.inc index f5cc050..923d16e 100644 --- a/src/etc/inc/login_sasl_client.inc +++ b/src/etc/inc/login_sasl_client.inc @@ -23,7 +23,7 @@ class login_sasl_client_class Function Start(&$client, &$message, &$interactions) { - if ($this->state!=SASL_LOGIN_STATE_START) + if($this->state!=SASL_LOGIN_STATE_START) { $client->error="LOGIN authentication state is not at the start"; return(SASL_FAIL); @@ -37,7 +37,7 @@ class login_sasl_client_class "realm"=>"" ); $status=$client->GetCredentials($this->credentials,$defaults,$interactions); - if ($status==SASL_CONTINUE) + if($status==SASL_CONTINUE) $this->state=SASL_LOGIN_STATE_IDENTIFY_USER; Unset($message); return($status); @@ -45,7 +45,7 @@ class login_sasl_client_class Function Step(&$client, $response, &$message, &$interactions) { - switch ($this->state) + switch($this->state) { case SASL_LOGIN_STATE_IDENTIFY_USER: $message=$this->credentials["user"].(strlen($this->credentials["realm"]) ? "@".$this->credentials["realm"] : ""); diff --git a/src/etc/inc/ntlm_sasl_client.inc b/src/etc/inc/ntlm_sasl_client.inc index 18e5658..406edf2 100644 --- a/src/etc/inc/ntlm_sasl_client.inc +++ b/src/etc/inc/ntlm_sasl_client.inc @@ -18,12 +18,12 @@ class ntlm_sasl_client_class Function Initialize(&$client) { - if (!function_exists($function="mcrypt_encrypt") || - !function_exists($function="hash")) + if(!function_exists($function="mcrypt_encrypt") + || !function_exists($function="mhash")) { $extensions=array( "mcrypt_encrypt"=>"mcrypt", - "hash"=>"hash" + "mhash"=>"mhash" ); $client->error="the extension ".$extensions[$function]." required by the NTLM SASL client class is not available in this PHP configuration"; return(0); @@ -33,7 +33,7 @@ class ntlm_sasl_client_class Function ASCIIToUnicode($ascii) { - for ($unicode="",$a=0;$aASCIIToUnicode($password); - $md4=hash("md4", $unicode); + $md4=mhash(MHASH_MD4,$unicode); $padded=$md4.str_repeat(chr(0),21-strlen($md4)); $iv_size=mcrypt_get_iv_size(MCRYPT_DES,MCRYPT_MODE_ECB); $iv=mcrypt_create_iv($iv_size,MCRYPT_RAND); - for ($response="",$third=0;$third<21;$third+=7) + for($response="",$third=0;$third<21;$third+=7) { - for ($packed="",$p=$third;$p<$third+7;$p++) - $packed.=str_pad(decbin(ord(substr($padded,$p,1))),8,"0",STR_PAD_LEFT); - for ($key="",$p=0;$pstate!=SASL_NTLM_STATE_START) + if($this->state!=SASL_NTLM_STATE_START) { $client->error="NTLM authentication state is not at the start"; return(SASL_FAIL); @@ -147,7 +147,7 @@ class ntlm_sasl_client_class ); $defaults=array(); $status=$client->GetCredentials($this->credentials,$defaults,$interactions); - if ($status==SASL_CONTINUE) + if($status==SASL_CONTINUE) $this->state=SASL_NTLM_STATE_IDENTIFY_DOMAIN; Unset($message); return($status); @@ -155,7 +155,7 @@ class ntlm_sasl_client_class Function Step(&$client, $response, &$message, &$interactions) { - switch ($this->state) + switch($this->state) { case SASL_NTLM_STATE_IDENTIFY_DOMAIN: $message=$this->TypeMsg1($this->credentials["realm"],$this->credentials["workstation"]); @@ -177,4 +177,4 @@ class ntlm_sasl_client_class } }; -?> +?> \ No newline at end of file diff --git a/src/etc/inc/plain_sasl_client.inc b/src/etc/inc/plain_sasl_client.inc index 691580c..c7feed0 100644 --- a/src/etc/inc/plain_sasl_client.inc +++ b/src/etc/inc/plain_sasl_client.inc @@ -26,7 +26,7 @@ class plain_sasl_client_class Function Start(&$client, &$message, &$interactions) { - if ($this->state!=SASL_PLAIN_STATE_START) + if($this->state!=SASL_PLAIN_STATE_START) { $client->error="PLAIN authentication state is not at the start"; return(SASL_FAIL); @@ -42,9 +42,9 @@ class plain_sasl_client_class "mode"=>"" ); $status=$client->GetCredentials($this->credentials,$defaults,$interactions); - if ($status==SASL_CONTINUE) + if($status==SASL_CONTINUE) { - switch ($this->credentials["mode"]) + switch($this->credentials["mode"]) { case SASL_PLAIN_EXIM_MODE: $message=$this->credentials["user"]."\0".$this->credentials["password"]."\0"; @@ -65,11 +65,11 @@ class plain_sasl_client_class Function Step(&$client, $response, &$message, &$interactions) { - switch ($this->state) + switch($this->state) { /* case SASL_PLAIN_STATE_IDENTIFY: - switch ($this->credentials["mode"]) + switch($this->credentials["mode"]) { case SASL_PLAIN_EXIM_MODE: $message=$this->credentials["user"]."\0".$this->credentials["password"]."\0"; diff --git a/src/etc/inc/sasl.inc b/src/etc/inc/sasl.inc index a9582da..f6a8d0b 100644 --- a/src/etc/inc/sasl.inc +++ b/src/etc/inc/sasl.inc @@ -178,7 +178,7 @@ class sasl_client_class Retrieve the values of one or more credentials to be used by the authentication mechanism classes. This is meant to be used by authentication mechanism driver - classes to retrieve the credentials that may be needed. + classes to retrieve the credentials that may be neede. The function may return SASL_CONTINUE if it succeeded, or SASL_NOMECH if it was not possible to retrieve one of the requested credentials. @@ -359,7 +359,7 @@ class sasl_client_class INTEGER Process the authentication steps after the initial step, - until the authentication iteration dialog is complete. + until the authetication iteration dialog is complete. Call this function iteratively after a successful initial step calling the Start function. The function returns SASL_CONTINUE if step was -- cgit v1.1 From 09221bc393da980573b12a2c4e2a8a8050ef6f77 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 15 Jan 2016 11:44:02 -0200 Subject: Update license on files from /etc/inc --- src/etc/inc/captiveportal.inc | 59 +++++++++++++++++++++------------ src/etc/inc/certs.inc | 56 ++++++++++++++++++++++--------- src/etc/inc/config.console.inc | 64 ++++++++++++++++++++++-------------- src/etc/inc/config.gui.inc | 64 ++++++++++++++++++++++-------------- src/etc/inc/config.inc | 64 ++++++++++++++++++++++-------------- src/etc/inc/config.lib.inc | 67 ++++++++++++++++++++++++-------------- src/etc/inc/crypt.inc | 61 +++++++++++++++++++++++++--------- src/etc/inc/easyrule.inc | 55 ++++++++++++++++++++++--------- src/etc/inc/filter.inc | 59 +++++++++++++++++++++++---------- src/etc/inc/functions.inc | 54 +++++++++++++++++++++--------- src/etc/inc/gmirror.inc | 56 ++++++++++++++++++++++--------- src/etc/inc/gwlb.inc | 56 ++++++++++++++++++++++--------- src/etc/inc/ipsec.attributes.php | 54 +++++++++++++++++++++--------- src/etc/inc/ipsec.auth-user.php | 55 ++++++++++++++++++++++--------- src/etc/inc/ipsec.inc | 58 +++++++++++++++++++++++---------- src/etc/inc/itemid.inc | 54 ++++++++++++++++++++++-------- src/etc/inc/led.inc | 57 ++++++++++++++++++++++++++++---- src/etc/inc/meta.inc | 53 ++++++++++++++++++++++-------- src/etc/inc/notices.inc | 64 +++++++++++++++++++++++------------- src/etc/inc/openvpn.attributes.php | 54 +++++++++++++++++++++--------- src/etc/inc/openvpn.auth-user.php | 54 +++++++++++++++++++++--------- src/etc/inc/openvpn.inc | 58 +++++++++++++++++++++++---------- src/etc/inc/openvpn.tls-verify.php | 53 +++++++++++++++++++++--------- src/etc/inc/pfsense-utils.inc | 64 +++++++++++++++++++++++------------- src/etc/inc/priv.inc | 62 ++++++++++++++++++++++------------- src/etc/inc/rrd.inc | 56 ++++++++++++++++++++++--------- src/etc/inc/service-utils.inc | 64 +++++++++++++++++++++++------------- src/etc/inc/services.inc | 55 ++++++++++++++++++++++--------- src/etc/inc/system.inc | 55 +++++++++++++++++++++++-------- src/etc/inc/unbound.inc | 57 ++++++++++++++++++++++++-------- src/etc/inc/voucher.inc | 59 ++++++++++++++++++++++++--------- src/etc/inc/vpn.inc | 54 +++++++++++++++++++++--------- src/etc/inc/vslb.inc | 53 ++++++++++++++++++++++-------- src/etc/inc/wizardapp.inc | 54 +++++++++++++++++++++--------- src/etc/inc/xmlparse.inc | 55 +++++++++++++++++++++++-------- src/etc/inc/xmlparse_attr.inc | 52 +++++++++++++++++++++-------- src/etc/inc/xmlreader.inc | 55 +++++++++++++++++++++++-------- src/etc/inc/xmlrpc.inc | 52 +++++++++++++++++++++-------- 38 files changed, 1536 insertions(+), 640 deletions(-) (limited to 'src') diff --git a/src/etc/inc/captiveportal.inc b/src/etc/inc/captiveportal.inc index 8b9d33e..ec0cabe 100644 --- a/src/etc/inc/captiveportal.inc +++ b/src/etc/inc/captiveportal.inc @@ -1,9 +1,9 @@ - Copyright (C) 2009-2012 Ermal Luçi + Copyright (c) 2004-2016 Electric Sheep Fencing, LLC. All rights reserved. Copyright (C) 2003-2006 Manuel Kasper . originally part of m0n0wall (http://m0n0.ch/wall) @@ -16,25 +16,42 @@ 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. - - This version of captiveportal.inc has been modified by Rob Parker - to include changes for per-user bandwidth management - via returned RADIUS attributes. This page has been modified to delete any - added rules which may have been created by other per-user code (index.php, etc). - These changes are (c) 2004 Keycom PLC. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ /* include all configuration functions */ diff --git a/src/etc/inc/certs.inc b/src/etc/inc/certs.inc index 6d260e6..26e9e1b 100644 --- a/src/etc/inc/certs.inc +++ b/src/etc/inc/certs.inc @@ -1,9 +1,10 @@ - All rights reserved. + + part of pfSense (https://www.pfsense.org) + Copyright (c) 2008-2016 Electric Sheep Fencing, LLC. All rights reserved. + Copyright (c) 2008 Shrew Soft Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -12,19 +13,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ define("OPEN_SSL_CONF_PATH", "/etc/ssl/openssl.cnf"); diff --git a/src/etc/inc/config.console.inc b/src/etc/inc/config.console.inc index ce9dfd2..fd2d767 100644 --- a/src/etc/inc/config.console.inc +++ b/src/etc/inc/config.console.inc @@ -1,16 +1,9 @@ . @@ -23,19 +16,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ function set_networking_interfaces_ports() { diff --git a/src/etc/inc/config.gui.inc b/src/etc/inc/config.gui.inc index 0883ede..61fa29a 100644 --- a/src/etc/inc/config.gui.inc +++ b/src/etc/inc/config.gui.inc @@ -1,16 +1,9 @@ . @@ -23,19 +16,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ require_once("globals.inc"); diff --git a/src/etc/inc/config.inc b/src/etc/inc/config.inc index 5f038fa..800312e 100644 --- a/src/etc/inc/config.inc +++ b/src/etc/inc/config.inc @@ -1,16 +1,9 @@ . @@ -23,19 +16,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ if (!function_exists('platform_booting')) { diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index 0d66706..41bc2af 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -1,17 +1,11 @@ . @@ -24,19 +18,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ /****f* config/encrypted_configxml @@ -1024,4 +1041,4 @@ function pfSense_clear_globals() { register_shutdown_function('pfSense_clear_globals'); -?> \ No newline at end of file +?> diff --git a/src/etc/inc/crypt.inc b/src/etc/inc/crypt.inc index f621588..a8fcc83 100644 --- a/src/etc/inc/crypt.inc +++ b/src/etc/inc/crypt.inc @@ -1,30 +1,59 @@ . 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. + 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ function crypt_data($val, $pass, $opt) { diff --git a/src/etc/inc/easyrule.inc b/src/etc/inc/easyrule.inc index e91c8a5..4dc70b2 100644 --- a/src/etc/inc/easyrule.inc +++ b/src/etc/inc/easyrule.inc @@ -2,30 +2,53 @@ /* easyrule.inc - Copyright (C) 2009-2010 Jim Pingle (jpingle@gmail.com) + part of pfSense (https://www.pfsense.org) Originally Sponsored By Anathematic @ pfSense Forums - All rights reserved. + Copyright (c) 2009-2010 Electric Sheep Fencing, LLC. 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. + 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ $blockaliasname = 'EasyRuleBlockHosts'; diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc index 23230e8..9eb7c88 100644 --- a/src/etc/inc/filter.inc +++ b/src/etc/inc/filter.inc @@ -1,11 +1,11 @@ . @@ -18,19 +18,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ diff --git a/src/etc/inc/functions.inc b/src/etc/inc/functions.inc index 1edd6a3..c5636fa 100644 --- a/src/etc/inc/functions.inc +++ b/src/etc/inc/functions.inc @@ -1,8 +1,9 @@ . @@ -15,19 +16,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ /* BEGIN compatibility goo with HEAD */ diff --git a/src/etc/inc/gmirror.inc b/src/etc/inc/gmirror.inc index 2700d09..bacd77f 100644 --- a/src/etc/inc/gmirror.inc +++ b/src/etc/inc/gmirror.inc @@ -1,29 +1,53 @@ All rights reserved. @@ -11,20 +15,42 @@ 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. - + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ /****f* itemid/delete_id diff --git a/src/etc/inc/led.inc b/src/etc/inc/led.inc index 4cf0c5e..15ec81f 100644 --- a/src/etc/inc/led.inc +++ b/src/etc/inc/led.inc @@ -1,11 +1,56 @@ - * - * LED control library that wraps around the functionality of led(4) - * + led.inc + + LED control library that wraps around the functionality of led(4) + + part of pfSense (https://www.pfsense.org) + Copyright (c) 2009-2016 Electric Sheep Fencing, LLC. + 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. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ $led_root = "/dev/led/led"; diff --git a/src/etc/inc/meta.inc b/src/etc/inc/meta.inc index 28bf408..af14e13 100644 --- a/src/etc/inc/meta.inc +++ b/src/etc/inc/meta.inc @@ -1,6 +1,10 @@ - All rights reserved. + openvpn.inc + part of pfSense (https://www.pfsense.org) Copyright (C) 2006 Fernando Lemos + Copyright (c) 2006-2016 Electric Sheep Fencing, LLC. All rights reserved. This file was rewritten from scratch by Fernando Lemos but @@ -20,23 +19,46 @@ 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 notices, + 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 - notices, 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ require_once('config.inc'); diff --git a/src/etc/inc/openvpn.tls-verify.php b/src/etc/inc/openvpn.tls-verify.php index ea17207..d5cacff 100644 --- a/src/etc/inc/openvpn.tls-verify.php +++ b/src/etc/inc/openvpn.tls-verify.php @@ -3,8 +3,8 @@ /* openvpn.tls-verify.php - Copyright (C) 2011 Jim Pingle - Copyright (C) 2013-2015 Electric Sheep Fencing, LP + part of pfSense (https://www.pfsense.org) + Copyright (c) 2011-2016 Electric Sheep Fencing, LLC. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,21 +14,44 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ + /* * OpenVPN calls this script to validate a certificate * This script is called ONCE per DEPTH of the certificate chain diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index 1041dec..ae00bee 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -1,14 +1,11 @@ - All rights reserved. + part of pfSense (https://www.pfsense.org) Copyright (C) 2005-2006 Bill Marquette - All rights reserved. - Copyright (C) 2006 Paul Taylor . - All rights reserved. - + Copyright (C) 2008 Shrew Soft Inc Copyright (C) 2003-2006 Manuel Kasper . + Copyright (c) 2004-2016 Electric Sheep Fencing, LLC. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23,20 +17,42 @@ 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. - + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ require_once("priv.defs.inc"); diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc index 50d7b42..0d0715b 100644 --- a/src/etc/inc/rrd.inc +++ b/src/etc/inc/rrd.inc @@ -1,8 +1,10 @@ + Copyright (c) 2010-2016 Electric Sheep Fencing, LLC. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -12,21 +14,43 @@ 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. - - */ + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. +*/ /* include all configuration functions */ diff --git a/src/etc/inc/service-utils.inc b/src/etc/inc/service-utils.inc index ea4b0c5..dbf15bb 100644 --- a/src/etc/inc/service-utils.inc +++ b/src/etc/inc/service-utils.inc @@ -1,14 +1,12 @@ . - Copyright (C) 2010 Ermal Luçi All rights reserved. Redistribution and use in source and binary forms, with or without @@ -15,19 +17,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ define('DYNDNS_PROVIDER_VALUES', 'citynetwork cloudflare custom custom-v6 dnsexit dnsimple dnsmadeeasy dnsomatic dyndns dyndns-custom dyndns-static dyns easydns eurodns freedns glesys googledomains gratisdns he-net he-net-v6 he-net-tunnelbroker loopia namecheap noip noip-free ods opendns ovh-dynhost route53 selfhost spdns spdns-v6 zoneedit'); diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index d1a0dd0..6d869e5 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -1,8 +1,12 @@ . All rights reserved. @@ -13,19 +17,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ function activate_powerd() { diff --git a/src/etc/inc/unbound.inc b/src/etc/inc/unbound.inc index 2ab6e3a..b903551 100644 --- a/src/etc/inc/unbound.inc +++ b/src/etc/inc/unbound.inc @@ -1,8 +1,14 @@ + Copyright (c) 2015-2016 Electric Sheep Fencing, LLC. + All rights reserved. + + originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -12,19 +18,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ /* include all configuration functions */ diff --git a/src/etc/inc/voucher.inc b/src/etc/inc/voucher.inc index 31078e2..221e8c5 100644 --- a/src/etc/inc/voucher.inc +++ b/src/etc/inc/voucher.inc @@ -1,9 +1,14 @@ - Copyright (C) 2010 Scott Ullrich + + part of pfSense (https://www.pfsense.org) Copyright (C) 2007 Marcel Wiget + Copyright (c) 2007-2016 Electric Sheep Fencing, LLC. + All rights reserved. + + originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -13,20 +18,42 @@ 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. - + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ /* include all configuration functions */ diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc index 8aa3cbd..b07df83 100644 --- a/src/etc/inc/vpn.inc +++ b/src/etc/inc/vpn.inc @@ -1,9 +1,10 @@ . All rights reserved. @@ -14,19 +18,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ /* The following items will be treated as arrays in config.xml */ diff --git a/src/etc/inc/xmlparse_attr.inc b/src/etc/inc/xmlparse_attr.inc index c9f6c3a..5c7d674 100644 --- a/src/etc/inc/xmlparse_attr.inc +++ b/src/etc/inc/xmlparse_attr.inc @@ -2,7 +2,10 @@ /* xmlparse_attr.inc functions to parse configuration files in XML format with attributes + + part of pfSense (https://www.pfsense.org) Copyright (C) 2010 Erik Fonnesbeck + Copyright (c) 2010-2016 Electric Sheep Fencing, LLC. All rights reserved. Based on xmlparse.inc, originally part of m0n0wall (http://m0n0.ch/wall) @@ -16,19 +19,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ /* The following items will be treated as arrays in regdomain.xml */ diff --git a/src/etc/inc/xmlreader.inc b/src/etc/inc/xmlreader.inc index 3982c60..420061b 100644 --- a/src/etc/inc/xmlreader.inc +++ b/src/etc/inc/xmlreader.inc @@ -2,8 +2,12 @@ /* xmlreader.inc functions to parse/dump configuration files in XML format - part of m0n0wall (http://m0n0.ch/wall) + part of pfSense (https://www.pfsense.org) + Copyright (c) 2004-2016 Electric Sheep Fencing, LLC. + All rights reserved. + + originally part of m0n0wall (http://m0n0.ch/wall) Copyright (C) 2003-2004 Manuel Kasper . All rights reserved. @@ -14,19 +18,42 @@ 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. + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + "This product includes software developed by the pfSense Project + for use in the pfSense® software distribution. (http://www.pfsense.org/). + + 4. The names "pfSense" and "pfSense Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + coreteam@pfsense.org. + + 5. Products derived from this software may not be called "pfSense" + nor may "pfSense" appear in their names without prior written + permission of the Electric Sheep Fencing, LLC. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + + "This product includes software developed by the pfSense Project + for use in the pfSense software distribution (http://www.pfsense.org/). + + THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + EXPRESSED 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 pfSense PROJECT OR + ITS CONTRIBUTORS 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. */ /* The following items will be treated as arrays in config.xml */ diff --git a/src/etc/inc/xmlrpc.inc b/src/etc/inc/xmlrpc.inc index 001777c..a124341 100644 --- a/src/etc/inc/xmlrpc.inc +++ b/src/etc/inc/xmlrpc.inc @@ -1,7 +1,10 @@ Date: Fri, 15 Jan 2016 08:47:27 -0500 Subject: Fix reboot after upgrade --- src/usr/local/www/pkg_mgr_install.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index 3fd234e..9cad68d 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -130,6 +130,7 @@ if ($_REQUEST['ajax']) { // Check for return codes and replace with suitable strings if (strpos($logline, "__RC=") !== false) { $code = explode(" ", $logline); + $rc = str_replace("__RC=", "", $code[0]); if (count($code) > 1 && @@ -407,7 +408,7 @@ if (!empty($_POST['id']) || $_POST['mode'] == "reinstallall"): - +
-- cgit v1.1 From e9feb2d4b8e48a880be8b8e8116fe7771ff3e6fd Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 08:58:46 -0500 Subject: Bootstrap style select element --- src/usr/local/www/status_queues.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr/local/www/status_queues.php b/src/usr/local/www/status_queues.php index 2a13a12..3e37183 100644 --- a/src/usr/local/www/status_queues.php +++ b/src/usr/local/www/status_queues.php @@ -190,7 +190,7 @@ else: ?> - -- cgit v1.1 From 6c961924a5474bfc71a23d6a0d2e3fcdc6ef6c46 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 09:22:14 -0500 Subject: Simplify HTML --- src/usr/local/www/status_queues.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/status_queues.php b/src/usr/local/www/status_queues.php index 3e37183..37aa319 100644 --- a/src/usr/local/www/status_queues.php +++ b/src/usr/local/www/status_queues.php @@ -274,17 +274,17 @@ function processQueues($altqstats, $level, $parent_name) { '); + print(''); print('
'); print('
'); print('
'); print(''); - print(''); - print(''); - print(''); - print(''); - print(''); - print(''); + print(''); + print(''); + print(''); + print(''); + print(''); + print(''); ?> Date: Fri, 15 Jan 2016 09:32:42 -0500 Subject: Remove unneeded var --- src/usr/local/www/status_queues.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/status_queues.php b/src/usr/local/www/status_queues.php index 37aa319..b1c0815 100644 --- a/src/usr/local/www/status_queues.php +++ b/src/usr/local/www/status_queues.php @@ -242,8 +242,6 @@ function processQueues($altqstats, $level, $parent_name) { global $g; global $if_queue_list; - $row_class="alert_default"; - $parent_name = $parent_name . " queuerow" . $altqstats['name'] . $altqstats['interface']; $prev_if = $altqstats['interface']; foreach ($altqstats['queue'] as $q) { -- cgit v1.1 From 19d5848c9be906e63521373cfb8e05187b8474d4 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 09:47:47 -0500 Subject: Correct failure banner color --- src/usr/local/www/pkg_mgr_install.php | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index 9cad68d..5958783 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -533,6 +533,7 @@ function show_success() { // Display a failure banner function show_failure() { + $('#final').removeClass("alert-info"); $('#final').addClass("alert-danger"); if ("" != "reinstallall") { $('#final').html("" + " " + "" + " " + ""); -- cgit v1.1 From c3f962bab940051e9e3d0fd93f981c1ff8fd0cc2 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 09:54:09 -0500 Subject: Reduced header font size --- src/usr/local/www/bootstrap/css/pfSense-BETA.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr/local/www/bootstrap/css/pfSense-BETA.css b/src/usr/local/www/bootstrap/css/pfSense-BETA.css index 33ee5ac..9332b81 100644 --- a/src/usr/local/www/bootstrap/css/pfSense-BETA.css +++ b/src/usr/local/www/bootstrap/css/pfSense-BETA.css @@ -1,3 +1,6 @@ @import url("/bootstrap/css/pfSense.css"); -/*** Experimental Changes Go Here ***/ \ No newline at end of file +/*** Experimental Changes Go Here ***/ +.panel-title { + font-size: 16px; +} \ No newline at end of file -- cgit v1.1 From 65cce9d728449da1c5243629b25ab3307acfff82 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 15 Jan 2016 14:07:55 -0200 Subject: Encode DHCP/DHCPv6 server additional BOOTP text options before save to XML to preserve data. It fixes #5623 --- src/etc/inc/globals.inc | 2 +- src/etc/inc/services.inc | 8 +++++--- src/etc/inc/upgrade_config.inc | 29 +++++++++++++++++++++++++++++ src/usr/local/www/services_dhcp.php | 4 ++-- src/usr/local/www/services_dhcpv6.php | 4 ++-- 5 files changed, 39 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index d0e0fd5..946cfe6 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -99,7 +99,7 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "13.6", + "latest_config" => "13.7", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc index 4945e8a..2ad38b2 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -958,10 +958,11 @@ EOD; $dhcpdconf .= "\n"; if ($dhcpifconf['numberoptions']['item']) { foreach ($dhcpifconf['numberoptions']['item'] as $itemidx => $item) { + $item_value = base64_decode($item['value']); if (empty($item['type']) || $item['type'] == "text") { - $dhcpdconf .= " option custom-{$dhcpif}-{$itemidx} \"{$item['value']}\";\n"; + $dhcpdconf .= " option custom-{$dhcpif}-{$itemidx} \"{$item_value}\";\n"; } else { - $dhcpdconf .= " option custom-{$dhcpif}-{$itemidx} {$item['value']};\n"; + $dhcpdconf .= " option custom-{$dhcpif}-{$itemidx} {$item_value};\n"; } } } @@ -1462,7 +1463,8 @@ EOD; $dhcpdv6conf .= "\n"; if ($dhcpv6ifconf['numberoptions']['item']) { foreach ($dhcpv6ifconf['numberoptions']['item'] as $itemv6idx => $itemv6) { - $dhcpdv6conf .= " option custom-{$dhcpv6if}-{$itemv6idx} \"{$itemv6['value']}\";\n"; + $itemv6_value = base64_decode($itemv6['value']); + $dhcpdv6conf .= " option custom-{$dhcpv6if}-{$itemv6idx} \"{$itemv6_value}\";\n"; } } diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index aa3ec70..dedab7c 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -4285,4 +4285,33 @@ function upgrade_135_to_136() { } } } + +function upgrade_136_to_137() { + global $config; + + if (is_array($config['dhcpd'])) { + foreach ($config['dhcpd'] as &$dhcpd) { + if (!is_array($dhcpd['numberoptions']['item'])) { + continue; + } + + foreach ($dhcpd['numberoptions']['item'] as &$item) { + $item['value'] = base64_encode($item['value']); + } + } + } + + if (is_array($config['dhcpdv6'])) { + foreach ($config['dhcpdv6'] as &$dhcpdv6) { + if (!is_array($dhcpdv6['numberoptions']['item'])) { + continue; + } + + foreach ($dhcpdv6['numberoptions']['item'] as &$item) { + $item['value'] = base64_encode($item['value']); + } + } + } +} + ?> diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php index 4650051..d13305c 100644 --- a/src/usr/local/www/services_dhcp.php +++ b/src/usr/local/www/services_dhcp.php @@ -230,7 +230,7 @@ if (isset($_POST['submit'])) { $numbervalue = array(); $numbervalue['number'] = htmlspecialchars($_POST["number{$x}"]); $numbervalue['type'] = htmlspecialchars($_POST["itemtype{$x}"]); - $numbervalue['value'] = str_replace('"', '"', htmlspecialchars($_POST["value{$x}"])); + $numbervalue['value'] = base64_encode($_POST["value{$x}"]); $numberoptions['item'][] = $numbervalue; } } @@ -1200,7 +1200,7 @@ $numrows = count($pconfig['numberoptions']['item']) -1; foreach ($pconfig['numberoptions']['item'] as $item) { $number = $item['number']; $itemtype = $item['type']; - $value = $item['value']; + $value = base64_decode($item['value']); $group = new Form_Group(($counter == 0) ? 'Option':null); $group->addClass('repeatable'); diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php index dc58ba2..f455a9c 100644 --- a/src/usr/local/www/services_dhcpv6.php +++ b/src/usr/local/www/services_dhcpv6.php @@ -180,7 +180,7 @@ if ($_POST) { if (isset($_POST["number{$x}"]) && ctype_digit($_POST["number{$x}"])) { $numbervalue = array(); $numbervalue['number'] = htmlspecialchars($_POST["number{$x}"]); - $numbervalue['value'] = htmlspecialchars($_POST["value{$x}"]); + $numbervalue['value'] = base64_encode($_POST["value{$x}"]); $numberoptions['item'][] = $numbervalue; } } @@ -852,7 +852,7 @@ if ($pconfig['numberoptions']) { 'value' . $counter, null, 'text', - $item['value'] + base64_decode($item['value']) ))->setHelp($counter == $last ? 'Value':null); $btn = new Form_Button( -- cgit v1.1 From 2cb37fa6c1a5746a55e09186c557ea298865da87 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 15 Jan 2016 14:27:14 -0200 Subject: Silence stream_socket_enable_crypto() warning when CN doesn't match. Fixes #5604 --- src/etc/inc/smtp.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/etc/inc/smtp.inc b/src/etc/inc/smtp.inc index 78340da..54aa8cf 100644 --- a/src/etc/inc/smtp.inc +++ b/src/etc/inc/smtp.inc @@ -1266,7 +1266,7 @@ class smtp_class && $this->VerifyResultLines('220',$responses)>0)) { $this->OutputDebug('Starting TLS cryptograpic protocol'); - if(!($success = stream_socket_enable_crypto($this->connection, 1, STREAM_CRYPTO_METHOD_TLS_CLIENT))) + if(!($success = @stream_socket_enable_crypto($this->connection, 1, STREAM_CRYPTO_METHOD_TLS_CLIENT))) $this->error = 'could not start TLS connection encryption protocol'; else { @@ -1887,4 +1887,4 @@ class smtp_class */ -?> \ No newline at end of file +?> -- cgit v1.1 From 52e416cc4217a8ad7d88e3345e5854bb6a3791e4 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 15 Jan 2016 22:31:57 +0545 Subject: Fix product_name syntax problem in diag_backup Notice that the old line had $g['[product_name'] - a bonus "[" - that caused the product name to not actually appear in the output. In fixing that, I also wrapped this in sprintf() - that makes it more flexible for translation into languages where the word order of an instruction like this does not start with the verb. --- src/usr/local/www/diag_backup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr/local/www/diag_backup.php b/src/usr/local/www/diag_backup.php index 074ae28..cc48bc7 100644 --- a/src/usr/local/www/diag_backup.php +++ b/src/usr/local/www/diag_backup.php @@ -673,7 +673,7 @@ $section = new Form_Section('Restore backup'); $section->addInput(new Form_StaticText( null, - gettext("Open a ") . $g['[product_name'] . gettext(" configuration XML file and click the button below to restore the configuration.") + sprintf(gettext("Open a %s configuration XML file and click the button below to restore the configuration."), $g['product_name']) )); $section->addInput(new Form_Select( -- cgit v1.1 From 12537fdf6c16ec2704c8478c40d39201ac60b20e Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 15 Jan 2016 22:46:47 +0545 Subject: diag_confbak fix typo in class name --- src/usr/local/www/diag_confbak.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php index bb67309..6a492b9 100644 --- a/src/usr/local/www/diag_confbak.php +++ b/src/usr/local/www/diag_confbak.php @@ -226,7 +226,7 @@ if (is_array($confvers)) { ?>
-
+
Date: Fri, 15 Jan 2016 22:50:16 +0545 Subject: diag_confbak move tab_array code above diff display At the moment the tabs "Config History" and "Backup/Restore" jump down the page below the config diff listing when a diff is displayed. It seems better to me that the tab text stays where it is and the diff listing comes directly below it. --- src/usr/local/www/diag_confbak.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php index bb67309..3f6ac31 100644 --- a/src/usr/local/www/diag_confbak.php +++ b/src/usr/local/www/diag_confbak.php @@ -139,6 +139,11 @@ if ($savemsg) { print_info_box($savemsg, 'success'); } +$tab_array = array(); +$tab_array[] = array(gettext("Config History"), true, "diag_confbak.php"); +$tab_array[] = array(gettext("Backup/Restore"), false, "diag_backup.php"); +display_top_tabs($tab_array); + if ($diff) { ?>
@@ -179,11 +184,6 @@ if ($diff) { Date: Fri, 15 Jan 2016 15:12:07 -0200 Subject: Do not allow certificate to be deleted if it's been used by a package. Fixes #4142 --- src/etc/inc/certs.inc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/etc/inc/certs.inc b/src/etc/inc/certs.inc index 26e9e1b..d49f478 100644 --- a/src/etc/inc/certs.inc +++ b/src/etc/inc/certs.inc @@ -692,6 +692,22 @@ function is_webgui_cert($certref) { } } +function is_package_cert($certref) { + $pluginparams = array(); + $pluginparams['type'] = 'certificates'; + $pluginparams['event'] = 'used_certificates'; + + $certificates_used_by_packages = pkg_call_plugins('plugin_certificates', $pluginparams); + + /* Check if any package is using certificate */ + foreach ($certificates_used_by_packages as $name => $package) { + if (is_array($package['certificatelist'][$certref]) && + isset($package['certificatelist'][$certref]) > 0) { + return true; + } + } +} + function is_captiveportal_cert($certref) { global $config; if (!is_array($config['captiveportal'])) { @@ -706,12 +722,14 @@ function is_captiveportal_cert($certref) { } function cert_in_use($certref) { + return (is_webgui_cert($certref) || is_user_cert($certref) || is_openvpn_server_cert($certref) || is_openvpn_client_cert($certref) || is_ipsec_cert($certref) || - is_captiveportal_cert($certref)); + is_captiveportal_cert($certref) || + is_package_cert($certref)); } function crl_create(& $crl, $caref, $name, $serial = 0, $lifetime = 9999) { -- cgit v1.1 From 0b204e240b77da28a269cf0e87826bb35ebee542 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 12:19:57 -0500 Subject: Fixes some hide/show issues. An lucky bug in 2.2 was not duplicated in 2.3 so the page operated as written rather that as desired. --- src/usr/local/www/vpn_openvpn_server.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/vpn_openvpn_server.php b/src/usr/local/www/vpn_openvpn_server.php index eaaa76e..b7814cf 100644 --- a/src/usr/local/www/vpn_openvpn_server.php +++ b/src/usr/local/www/vpn_openvpn_server.php @@ -824,7 +824,7 @@ if ($act=="new" || $act=="edit"): 'cert_depth', 'Certificate Depth', $pconfig['cert_depth'], - $openvpn_cert_depths + ["" => "Do Not Check"] + $openvpn_cert_depths ))->setHelp('When a certificate-based client logs in, do not accept certificates below this depth. ' . 'Useful for denying certificates made with intermediate CAs generated from the same CA as the server.'); @@ -982,6 +982,7 @@ if ($act=="new" || $act=="edit"): $form->add($section); $section = new Form_Section('Client Settings'); + $section->addClass('advanced'); $section->addInput(new Form_Checkbox( 'dynamic_ip', @@ -1083,10 +1084,6 @@ if ($act=="new" || $act=="edit"): $pconfig['ntp_server2'] )); - $form->add($section); - - $section = new Form_Section('NetBIOS Options'); - $section->addInput(new Form_Checkbox( 'netbios_enable', 'NetBIOS enable', @@ -1150,7 +1147,6 @@ if ($act=="new" || $act=="edit"): $form->add($section); $section = new Form_Section('Advanced Configuration'); - $section->addClass('advanced'); $section->addInput(new Form_Textarea( 'custom_options', @@ -1338,6 +1334,7 @@ events.push(function() { break; case "server_tls": hideMultiClass('authmode', true); + hideClass('advanced', false); hideCheckbox('autokey_enable', true); default: hideInput('custom_options', false); @@ -1439,8 +1436,8 @@ events.push(function() { hideInput('netbios_scope', hide); hideCheckbox('wins_server_enable', hide); wins_server_change(); - hideCheckbox('client_mgmt_port_enable', hide); - client_mgmt_port_change(); +// hideCheckbox('client_mgmt_port_enable', hide); +// client_mgmt_port_change(); } function tuntap_change() { -- cgit v1.1 From 31ac02d40dd658d2a8f7ffc2bfbf22eb5b3ba9e0 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 15 Jan 2016 23:23:02 +0545 Subject: diag_confbak make a single gettext Sentences that are constructed in pieces like this are a potential problem for translation, if the target language needs to use a different grammatical word order. e.g. in Nepali we would say datetime-dekhi datetime-samma (datetime-from datetime-to). Organize it into a single gettext() that has the whole sentence in one go with numbering of the parameters so they can also be potentially re-ordered as needed in a translation. I am having a look at a few places where the gettext() translation is missing, and noticed this kind of thing also. When I see this sort of sentence construction using sentence fragments built up with multiple gettext() calls I will fix them up like this and make PRs. --- src/usr/local/www/diag_confbak.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php index 142a9ad..2ada62c 100644 --- a/src/usr/local/www/diag_confbak.php +++ b/src/usr/local/www/diag_confbak.php @@ -149,7 +149,7 @@ if ($diff) {

- +

-- cgit v1.1 From 3eaa57a220ca324448dacbee9cc02c972bcfaecd Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 15 Jan 2016 23:43:49 +0545 Subject: Internationalization of diag_defaults A couple of typical fixes here: 1) Actually wrap the "Are you sure...?" question in gettext() 2) Use a single gettext() call combined with sprintf() and %s etc to construct a sentence in a single go. 3) Use %s rather than just appending a variable at the end of a sentence of text. That way there is no assumption that the variable text must go at the end in every language. Once I have got the feel of the variations I come across, I will make myself a branch and change a whole bunch of files. But for now I have submitted a few things individually so it is easy for people to comment and give any helpful advice on how to do it better, before I go editing lots of files. IMHO it will be good to cleanup and optimize the internationalized code, then life should be easier for future translators. --- src/usr/local/www/diag_defaults.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/diag_defaults.php b/src/usr/local/www/diag_defaults.php index e13c17a..62a31af 100755 --- a/src/usr/local/www/diag_defaults.php +++ b/src/usr/local/www/diag_defaults.php @@ -85,12 +85,12 @@ include("head.inc");
-

Are you sure you want to reset the system to the factory defaults?

+

-

+

  • @@ -98,7 +98,7 @@ include("head.inc");
  • -
  • ''
  • +

-- cgit v1.1 From b090a0d9f5064184100ad72880ac129eb001ab2c Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 13:20:24 -0500 Subject: Fixed #5772 --- src/usr/local/www/services_dhcpv6.php | 100 ++++++++++++++-------------------- 1 file changed, 42 insertions(+), 58 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php index f455a9c..ed20e16 100644 --- a/src/usr/local/www/services_dhcpv6.php +++ b/src/usr/local/www/services_dhcpv6.php @@ -436,24 +436,6 @@ if ($_GET['act'] == "del") { } } -// Delete a row in the options table -if ($_GET['act'] == "delopt") { - $idx = $_GET['id']; - - if ($pconfig['numberoptions'] && is_array($pconfig['numberoptions']['item'][$idx])) { - unset($pconfig['numberoptions']['item'][$idx]); - } -} - -// Add an option row -if ($_GET['act'] == "addopt") { - if (!is_array($pconfig['numberoptions']['item'])) { - $pconfig['numberoptions']['item'] = array(); - } - - array_push($pconfig['numberoptions']['item'], array('number' => null, 'value' => null)); -} - $pgtitle = array(gettext("Services"), gettext("DHCPv6 Server")); $shortcut_section = "dhcp6"; @@ -834,45 +816,46 @@ $form->add($section); $title = 'Show Additional BOOTP/DHCP Options'; -if ($pconfig['numberoptions']) { - $counter = 0; - $last = count($pconfig['numberoptions']['item']) - 1; - - foreach ($pconfig['numberoptions']['item'] as $item) { - $group = new Form_Group(null); - - $group->add(new Form_Input( - 'number' . $counter, - null, - 'text', - $item['number'] - ))->setHelp($counter == $last ? 'Number':null); - - $group->add(new Form_Input( - 'value' . $counter, - null, - 'text', - base64_decode($item['value']) - ))->setHelp($counter == $last ? 'Value':null); - - $btn = new Form_Button( - 'btn' . $counter, - 'Delete', - 'services_dhcpv6.php?if=' . $if . '&act=delopt' . '&id=' . $counter - ); - - $btn->removeClass('btn-primary')->addClass('btn-danger btn-xs adnlopt'); - $group->addClass('adnlopt'); - $group->add($btn); - $section->add($group); - $counter++; - } +if (!$pconfig['numberoptions']) { + $pconfig['numberoptions']['item'] = array(0 => array('number' => "", 'value' => "")); +} + +$counter = 0; +$last = count($pconfig['numberoptions']['item']) - 1; + +foreach ($pconfig['numberoptions']['item'] as $item) { + $group = new Form_Group(null); + $group->addClass('repeatable'); + + $group->add(new Form_Input( + 'number' . $counter, + null, + 'text', + $item['number'] + ))->setHelp($counter == $last ? 'Number':null); + + $group->add(new Form_Input( + 'value' . $counter, + null, + 'text', + base64_decode($item['value']) + ))->setHelp($counter == $last ? 'Value':null); + + $btn = new Form_Button( + 'deleterow' . $counter, + 'Delete' + ); + + $btn->removeClass('btn-primary')->addClass('btn-warning'); + $group->add($btn); + $section->add($group); + $counter++; } + $btnaddopt = new Form_Button( - 'btnaddopt', - 'Add Option', - 'services_dhcpv6.php?if=' . $if . '&act=addopt' + 'addrowt', + 'Add Option' ); $btnaddopt->removeClass('btn-primary')->addClass('btn-success btn-sm'); @@ -887,6 +870,7 @@ $section->addInput(new Form_Input( )); print($form); + ?>

Date: Fri, 15 Jan 2016 13:38:06 -0500 Subject: Display additional ooptions if value not empty --- src/usr/local/www/services_dhcpv6.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php index ed20e16..46bd63a 100644 --- a/src/usr/local/www/services_dhcpv6.php +++ b/src/usr/local/www/services_dhcpv6.php @@ -817,7 +817,10 @@ $form->add($section); $title = 'Show Additional BOOTP/DHCP Options'; if (!$pconfig['numberoptions']) { + $noopts = true; $pconfig['numberoptions']['item'] = array(0 => array('number' => "", 'value' => "")); +} else { + $noopts = false; } $counter = 0; @@ -826,6 +829,7 @@ $last = count($pconfig['numberoptions']['item']) - 1; foreach ($pconfig['numberoptions']['item'] as $item) { $group = new Form_Group(null); $group->addClass('repeatable'); + $group->addClass('adnloptions'); $group->add(new Form_Input( 'number' . $counter, @@ -858,7 +862,7 @@ $btnaddopt = new Form_Button( 'Add Option' ); -$btnaddopt->removeClass('btn-primary')->addClass('btn-success btn-sm'); +$btnaddopt->removeClass('btn-primary')->addClass('btn-success btn-sm')->addClass('adnloptions'); $section->addInput($btnaddopt); @@ -1004,7 +1008,7 @@ events.push(function() { // Show additional controls $("#btnadnl").click(function() { - hideClass('adnlopt', false); + hideClass('adnloptions', false); hideInput('btnaddopt', false); }); @@ -1015,7 +1019,7 @@ events.push(function() { hideInput('ldap', true); hideInput('bootfile_url', true); hideCheckbox('shownetboot', true); - hideClass('adnlopt', true); + hideClass('adnloptions', ); hideInput('btnaddopt', true); }); //]]> -- cgit v1.1 From babf5d85a3871c11a31b853ed7eb837e989f4c01 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 16 Jan 2016 00:47:06 +0545 Subject: Internationalization batch 1 --- src/usr/local/www/crash_reporter.php | 4 ++-- src/usr/local/www/diag_dns.php | 14 +++++++------- src/usr/local/www/diag_dump_states.php | 2 +- src/usr/local/www/diag_dump_states_sources.php | 4 ++-- src/usr/local/www/diag_limiter_info.php | 8 ++++---- src/usr/local/www/diag_nanobsd.php | 6 +++--- src/usr/local/www/diag_ping.php | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/crash_reporter.php b/src/usr/local/www/crash_reporter.php index 9c5cd80..de3cb58 100644 --- a/src/usr/local/www/crash_reporter.php +++ b/src/usr/local/www/crash_reporter.php @@ -124,7 +124,7 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors); print_r($resp); echo "

" . gettext("Continue") . "" . gettext(" and delete crash report files from local disk.") . "

"; } else { - echo "Could not find any crash files."; + echo gettext("Could not find any crash files."); } } else if (gettext($_POST['Submit']) == "No") { array_map('unlink', glob("/var/crash/*")); @@ -147,7 +147,7 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors); } } } else { - echo "Could not locate any crash data."; + echo gettext("Could not locate any crash data."); } ?>
diff --git a/src/usr/local/www/diag_dns.php b/src/usr/local/www/diag_dns.php index 4a9775b..0acf06f 100755 --- a/src/usr/local/www/diag_dns.php +++ b/src/usr/local/www/diag_dns.php @@ -212,11 +212,11 @@ include("head.inc"); if ($input_errors) { print_input_errors($input_errors); } else if (!$resolved && $type) { - print(''); + print(''); } if ($createdalias) { - print(''); + print(''); } $form = new Form('Lookup'); @@ -244,7 +244,7 @@ if (!$input_errors && $type) { if ($resolved): ?>
-

Results

+

    -

    Timings

    +

- - + + @@ -287,7 +287,7 @@ if (!$input_errors && $type) {
-

More information

+

  • diff --git a/src/usr/local/www/diag_dump_states.php b/src/usr/local/www/diag_dump_states.php index 5a9ab72..91e0f77 100755 --- a/src/usr/local/www/diag_dump_states.php +++ b/src/usr/local/www/diag_dump_states.php @@ -212,7 +212,7 @@ print $form;
-

Current source tracking entries

+

Name serverQuery time
+ title="">
@@ -176,7 +176,7 @@ if (count($sources) > 0) {
-

Limiter Information

+

diff --git a/src/usr/local/www/diag_nanobsd.php b/src/usr/local/www/diag_nanobsd.php index 22bf0be..2ecc2a1 100644 --- a/src/usr/local/www/diag_nanobsd.php +++ b/src/usr/local/www/diag_nanobsd.php @@ -90,7 +90,7 @@ if ($_POST['bootslice']) { sleep(4); } - $savemsg = gettext("The boot slice has been set to") . " " . nanobsd_get_active_slice(); + $savemsg = sprintf(gettext("The boot slice has been set to %s"), nanobsd_get_active_slice()); $class = 'alert-success'; // Survey slice info nanobsd_detect_slice_info(); @@ -139,7 +139,7 @@ if ($_POST['setrw']) { } } -print_info_box("The options on this page are intended for use by advanced users only."); +print_info_box(gettext("The options on this page are intended for use by advanced users only.")); if ($savemsg) { print_info_box($savemsg, $class); @@ -171,7 +171,7 @@ if (is_writable("/")) { if ($refcount == 1 || $refcount == 0 || $refcount == -1) { $refdisplay = ""; } else { - $refdisplay = " (Reference count " . $refcount . ")"; + $refdisplay = " ". sprintf(gettext("(Reference count %s)"), $refcount); } $lbl = gettext("Read/Write") . $refdisplay; $btnlbl = gettext("Switch to Read-Only"); diff --git a/src/usr/local/www/diag_ping.php b/src/usr/local/www/diag_ping.php index d95fc54..b99f595 100644 --- a/src/usr/local/www/diag_ping.php +++ b/src/usr/local/www/diag_ping.php @@ -156,7 +156,7 @@ if ($do_ping) { $result = shell_exec($cmd); if (empty($result)) { - $input_errors[] = "Host \"" . $host . "\" did not respond or could not be resolved."; + $input_errors[] = sprintf(gettext('Host "%s" did not respond or could not be resolved.'), $host); } } @@ -207,7 +207,7 @@ if ($do_ping && !empty($result) && !$input_errors) { ?>
-

Results

+

-- cgit v1.1 From 2bbab3a9349fd4d725106280751c0edf8a8baf03 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 14:49:43 -0500 Subject: Fixed #5771 EXCEPT that the link in the help text does not point to the correct place (yet) --- src/usr/local/www/interfaces.php | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index 0d82dd5..6615b7a 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -1755,13 +1755,26 @@ $group->setHelp('This field can be used to modify ("spoof") the MAC address of t 'Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx or leave blank'); $section->add($group); -$section->addInput(new Form_Input( - 'mtu', - 'MTU', - 'number', - $pconfig['mtu'] -))->setHelp('If you leave this field blank, the adapter\'s default MTU will be used. ' . - 'This is typically 1500 bytes but can vary in some circumstances.'); +// If the interface is a VLAN and has a LAGG as a parent, the MTU cannot be set here. +// We can determine that by parsing the interface name (begins with "lagg", contains "_vlan") +if( (strrpos($wancfg['if'], "lagg", -strlen($wancfg['if'])) !== FALSE) && (strpos($wancfg['if'], "_vlan") !== false)) { + $section->addInput(new Form_Input( + 'mtu', + 'MTU', + 'number', + $pconfig['mtu'] + ))->setHelp('' . 'You may not set the MTU of a VLAN interface that has a LAGG parent here. ' . '
' . + 'interfaces_lagg.php
') + ->setReadonly(); +} else { + $section->addInput(new Form_Input( + 'mtu', + 'MTU', + 'number', + $pconfig['mtu'] + ))->setHelp('If you leave this field blank, the adapter\'s default MTU will be used. ' . + 'This is typically 1500 bytes but can vary in some circumstances.'); +} $section->addInput(new Form_Input( 'mss', -- cgit v1.1 From f495310de0d2fba3de3edb1d80b8188cbba941a6 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 14:52:56 -0500 Subject: Fix typo --- src/usr/local/www/services_dhcpv6.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php index 46bd63a..676927e 100644 --- a/src/usr/local/www/services_dhcpv6.php +++ b/src/usr/local/www/services_dhcpv6.php @@ -949,7 +949,7 @@ events.push(function() { function hideDDNS(hide) { hideCheckbox('ddnsupdate', hide); hideInput('ddnsdomain', hide); - hideInput('ddnsdomainprimary', hide);hideCheckbox + hideInput('ddnsdomainprimary', hide); hideInput('ddnsdomainkeyname', hide); hideInput('ddnsdomainkey', hide); } -- cgit v1.1 From 692b5e028b05035ae4e19d7b1c528adc2c8ab908 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 15:25:37 -0500 Subject: Reverting #5771 - No longer required --- src/usr/local/www/interfaces.php | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index 6615b7a..0d82dd5 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -1755,26 +1755,13 @@ $group->setHelp('This field can be used to modify ("spoof") the MAC address of t 'Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx or leave blank'); $section->add($group); -// If the interface is a VLAN and has a LAGG as a parent, the MTU cannot be set here. -// We can determine that by parsing the interface name (begins with "lagg", contains "_vlan") -if( (strrpos($wancfg['if'], "lagg", -strlen($wancfg['if'])) !== FALSE) && (strpos($wancfg['if'], "_vlan") !== false)) { - $section->addInput(new Form_Input( - 'mtu', - 'MTU', - 'number', - $pconfig['mtu'] - ))->setHelp('' . 'You may not set the MTU of a VLAN interface that has a LAGG parent here. ' . '
' . - 'interfaces_lagg.php
') - ->setReadonly(); -} else { - $section->addInput(new Form_Input( - 'mtu', - 'MTU', - 'number', - $pconfig['mtu'] - ))->setHelp('If you leave this field blank, the adapter\'s default MTU will be used. ' . - 'This is typically 1500 bytes but can vary in some circumstances.'); -} +$section->addInput(new Form_Input( + 'mtu', + 'MTU', + 'number', + $pconfig['mtu'] +))->setHelp('If you leave this field blank, the adapter\'s default MTU will be used. ' . + 'This is typically 1500 bytes but can vary in some circumstances.'); $section->addInput(new Form_Input( 'mss', -- cgit v1.1 From ba23527b3449cdf5a192574b3a1aaf05c7fef8c8 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 15:31:45 -0500 Subject: Fix graph scale setting --- src/usr/local/www/widgets/widgets/traffic_graphs.widget.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php b/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php index 2360fc5..dbcedf8 100644 --- a/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php +++ b/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php @@ -176,11 +176,11 @@ foreach ($ifdescrs as $ifname => $ifdescr):
-- cgit v1.1 From 762ed9137d9a03d77ad56e57488f862e26d3e2c7 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 15:58:47 -0500 Subject: Revise sorting to accommodate firewall logs name (logs) --- src/usr/local/www/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php index 9ef6373..3d7a0d0 100644 --- a/src/usr/local/www/index.php +++ b/src/usr/local/www/index.php @@ -328,8 +328,13 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard"); $widgetconfig): if ($widgetconfig['display'] == 'none'): -- cgit v1.1 From 909002e29bd709534cb771284dd8919aff6d1665 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Fri, 15 Jan 2016 19:37:43 -0500 Subject: Reverting change of label. It broke the display --- src/usr/local/www/widgets/widgets/log.widget.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/widgets/widgets/log.widget.php b/src/usr/local/www/widgets/widgets/log.widget.php index 66e5b04..57bc8ab 100644 --- a/src/usr/local/www/widgets/widgets/log.widget.php +++ b/src/usr/local/www/widgets/widgets/log.widget.php @@ -131,11 +131,11 @@ if (isset($_POST['lastsawtime'])) {
Remove + title="">
- + - + - + -- cgit v1.1