diff options
author | Ermal <eri@pfsense.org> | 2011-05-17 22:08:21 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-05-17 22:08:21 +0000 |
commit | 8bf2e9e5399bb96f6fd819bbb1ad5e5dbabc70a7 (patch) | |
tree | 44dba68b6fd779b2a766770a7a8939ed39a70972 /etc | |
parent | 098820e224964ac8e2a93e8e4cb5ebe866ad258d (diff) | |
download | pfsense-8bf2e9e5399bb96f6fd819bbb1ad5e5dbabc70a7.zip pfsense-8bf2e9e5399bb96f6fd819bbb1ad5e5dbabc70a7.tar.gz |
Test for null names passed to these functions as a safety precaution.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/service-utils.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index 4c09899..57e5472 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -114,6 +114,9 @@ function stop_service($name) { global $config; global $rcfileprefix; + if (empty($name)) + return; + if ($config['installedpackages']['service']) { foreach($config['installedpackages']['service'] as $service) { if(strtolower($service['name']) == strtolower($name)) { @@ -147,6 +150,9 @@ function stop_service($name) { function restart_service($name) { global $config; + if (empty($name)) + return; + stop_service($name); start_service($name); |