diff options
author | jim-p <jimp@pfsense.org> | 2013-08-28 10:26:48 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-08-28 10:26:48 -0400 |
commit | ca34f8ee173d3a76ad7f3af85dea6d6ae97c49db (patch) | |
tree | a06e4213adbadaea21e359c16709f0dd7ee55d33 /config/sudo | |
parent | da4fcbcca56077414bcd2927508d4c65d5faa896 (diff) | |
download | pfsense-packages-ca34f8ee173d3a76ad7f3af85dea6d6ae97c49db.tar.gz pfsense-packages-ca34f8ee173d3a76ad7f3af85dea6d6ae97c49db.tar.bz2 pfsense-packages-ca34f8ee173d3a76ad7f3af85dea6d6ae97c49db.zip |
Switch to rw before doing disk write operations when syncing sudoers file.
Diffstat (limited to 'config/sudo')
-rw-r--r-- | config/sudo/sudo.inc | 3 | ||||
-rw-r--r-- | config/sudo/sudo.xml | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/config/sudo/sudo.inc b/config/sudo/sudo.inc index a65753a1..5ffa14c3 100644 --- a/config/sudo/sudo.inc +++ b/config/sudo/sudo.inc @@ -26,6 +26,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +require_once("config.inc"); $pfs_version = substr(trim(file_get_contents("/etc/version")),0,3); switch ($pfs_version) { @@ -71,6 +72,7 @@ function sudo_install() { function sudo_write_config() { global $config; $sudoers = ""; + conf_mount_rw(); if (!is_array($config['installedpackages']['sudo']['config'][0]['row'])) { /* No config, wipe sudoers file and bail. */ unlink(SUDO_SUDOERS); @@ -104,6 +106,7 @@ function sudo_write_config() { log_error("Sudoers file invalid: {$result}"); unlink($tmpsudoers); } + conf_mount_ro(); } /* Get a list of users and groups in a format we can use to make proper sudoers entries. diff --git a/config/sudo/sudo.xml b/config/sudo/sudo.xml index 56163abf..defca988 100644 --- a/config/sudo/sudo.xml +++ b/config/sudo/sudo.xml @@ -3,7 +3,7 @@ <description>Sudo Command Control</description> <requirements>None</requirements> <name>sudo</name> - <version>0.1</version> + <version>0.2</version> <title>Sudo - Shell Command Privilege Delegation Utility</title> <include_file>/usr/local/pkg/sudo.inc</include_file> <menu> |