summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
Commit message (Collapse)AuthorAgeFilesLines
* standardize pfsense.com references to https://www.pfsense.orgChris Buechler2014-03-141-1/+1
|
* Make is_linklocal case-insensitive and fix #3433Renato Botelho2014-02-241-1/+1
|
* Add escapeshellarg() calls on exec parameters. While I'm here, replace some ↵Renato Botelho2014-02-041-6/+6
| | | | | | | | | | exec() calls by php functions like symlink, copy, unlink, mkdir Conflicts: etc/inc/filter_log.inc etc/inc/interfaces.inc etc/inc/pfsense-utils.inc etc/inc/pkg-utils.inc
* Add function is_inrange() that calls is_inrange_v6 or is_inrange_v4 accordinglyRenato Botelho2013-12-061-0/+5
|
* Merge pull request #794 from phil-davis/RELENG_2_1Chris Buechler2013-09-031-4/+5
|\ | | | | Backport get_memory changes to 2.1
| * Improve var names in get_memoryPhil Davis2013-09-021-4/+5
| | | | | | Backport from master
* | Fix #3004:Renato Botelho2013-09-031-0/+16
|/ | | | | | . Create a function to replace strings on deep associative arrays . Use the recent created function array_replace_values_recursive to fix VIP interface names instead of touch config.xml directly
* Add scope to target when it is a link-local, it helps ticket #3150Renato Botelho2013-08-201-0/+8
|
* Handle link local addresses with embedded interface scope on is_ipaddrv6 and ↵Ermal2013-08-161-0/+4
| | | | also on dnsmasq which is not yet there for these addresses
* Use pfSense module functions for finding interface v6 addresses. The ↵Ermal2013-08-141-1/+1
| | | | addresses will be not in friendly format as returned by getnameinfo
* If the script_name is blank, try another method to locate what our filename ↵jim-p2013-06-281-0/+4
| | | | is so we don't log an empty script name.
* Create is_linklocal() to validate ll addressesRenato Botelho2013-05-091-0/+4
|
* Make get_static routes behave correctly with aliasesErmal2013-03-051-13/+15
|
* Added IE mobile for WP8un0x2013-03-021-1/+1
|
* Also do checks for ipv6 on is_ipaddr_configuredErmal2013-02-141-2/+1
|
* Check for the right function name since the previous was present in util.inc ↵Ermal2013-02-141-2/+1
| | | | not interfaces.inc
* Restore require_once(interfaces.inc) on get_configured_ip_addresses(), it's ↵Renato Botelho2013-02-131-0/+1
| | | | required by get_interface_ip()
* Two interfaces, carp, ip aliases might be on the same subnet as their ↵Ermal2013-02-131-4/+7
| | | | parent. What needs to be checked is the ip itself
* Use full path to nohupErmal2013-02-131-1/+1
|
* Assign the output of exec to a var to avoid any issuesErmal2013-02-131-1/+2
|
* Check interfaces and VIP IP address overlapRenato Botelho2013-02-111-0/+14
| | | | | | | | - Check if interface IP overlaps other interfaces or localip from mpd based services - Check if VIPs IP overlaps interfaces or other VIPs address It fixes #1723
* Correct name of function call and use directly its return value as its ↵Ermal2013-02-071-8/+5
| | | | boolean as needed. Also correct the function to be more readble and put a note for v4 checks that might be needed
* Make gen_subnetv6 return a compressed form IPv6 address/net representation. ↵Ermal2013-02-071-1/+2
| | | | This removes some issues reported during Ticket #2746 and solve the issue on some cases
* IPv6 subnet checkbcyrill2013-02-061-1/+1
|
* Add check_subnetsv6_overlap()bcyrill2013-02-061-3/+13
|
* Make more strict checks during is_ip* functions. Helps ↵Ermal2013-02-041-1/+3
| | | | http://forum.pfsense.org/index.php/topic,58399.0.html and http://forum.pfsense.org/index.php/topic,58273.0.html
* Add option filter to return_dir_as_array()Renato Botelho2013-01-281-7/+8
| | | | | | - Add a 2nd parameter, default empty, that allows to pass a regex to filter files it'll return - While I'm here, simplify code removinf $canadd var
* Move is_inrange() to util.inc and rename it to is_inrange_v6()Renato Botelho2013-01-241-0/+8
|
* Move is_inrange() to util.inc and rename it to is_inrange_v4()Renato Botelho2013-01-241-0/+8
|
* Forgotten -n optionErmal2013-01-161-1/+1
|
* Use sysctl for this since its better rather than going thorugh dmesgErmal2013-01-161-13/+5
|
* Prevent no such file message when pid file does not existPhil Davis2013-01-061-4/+6
|
* Add the PPPoE Server IP addresses to the locally configured addresses, this ↵smos2013-01-051-0/+13
| | | | prevents the HTTP_REFERER check from triggering.
* Just check the file_exists let pkill decide if its a vaild file or not.Ermal2012-12-281-1/+1
|
* code comment typo ('log_error' should have been 'log_auth')PiBa-NL2012-11-181-1/+1
|
* Add refcount_read to util.incPhil Davis2012-11-151-0/+13
| | | Add refcount_read so other code can easily find out how many things have the file system mounted.
* Make a function to get the current theme and use it everywhere rather than ↵jim-p2012-11-021-0/+23
| | | | duplicating code or missing functions. (Fixes forced themes using the wrong theme for login screen)
* Allow/deny access to DHCP by partial MAC matching.jim-p2012-09-131-2/+3
|
* Unlock on returnErmal2012-07-311-0/+2
|
* There is no need to remove the @ from function names. Also properly unlock ↵Ermal2012-07-311-27/+27
| | | | in case of exception. Size is constant and we know it no need for extra call to shmop. Put some more error checking just in case
* Make access to shared memory atomicPhil Davis2012-07-311-13/+30
| | | | Use lock and unlock to make sure that all incrementing and decrementing of the reference count in the shared memory section is atomic. This ensures that there are not unusual timing conditions that could see 2 callers trying to update the reference count at the same time, which could result in the count never returning to zero. If that happened, then the filesystems would never be restored to read-only. (this is really just relevant to nanobsd) (note that shmop_* calls in php do not do any locking themselves - callers must coordinate their own access to the shared memory section) I also made the number stored in the shared memory be an ordinary integer followed by null chars to pad out the rest of the shared memory section. This makes the numbers stored look normal, and ensures that there is no other rubbish left in memory after them to cause problems on reading.
* Fix negative testjim-p2012-07-301-2/+2
|
* Pad data when adding to refcount reference, to avoid some oddities with how ↵jim-p2012-07-301-2/+2
| | | | php handles such data. http://forum.pfsense.org/index.php/topic,51188.msg278141.html#msg278141
* Fix get_staticroutes() function to handle IPv6 subnets properlyr-duran2012-07-051-1/+3
|
* Do not directly print out a message when checking the interfaces, instead ↵Erik Fonnesbeck2012-07-021-2/+8
| | | | saving the list to use later. Display this list before the interface mismatch message. Fixes #2468 and fixes #2531
* Catch libraries from subdirectories of PBI lib dirs toojim-p2012-06-241-1/+1
|
* Setup library paths to include /usr/pbi/*/lib as a last resort to make sure ↵jim-p2012-06-231-0/+9
| | | | things can find libraries. We may eventually replace this with a better method as this can lead to conflicts, but for now it will allow packages to find their proper libraries.
* Make mac_format aware of cpzone but also friendly to previous code!Ermal2012-06-111-2/+2
|
* Revert "Make mac_format aware of multiple Captiveportal instances"Ermal2012-06-111-3/+2
| | | | This reverts commit 54df925b9ea447bdd10f88a886e2ef11d44c3059.
* Revert "Make sure mac_format is always defined"Ermal2012-06-111-1/+2
| | | | This reverts commit 56f9032170d3130c2066e5eebbe18b96398073ca.
OpenPOWER on IntegriCloud