Mount image rw during changes

This commit is contained in:
Scott Ullrich 2008-11-20 22:11:06 +00:00
parent 4d98f63453
commit dff1a09d60
4 changed files with 20 additions and 6 deletions

View File

@ -167,6 +167,7 @@ if (isAllowedPage("system_usermanager")) {
}
if ($_POST) {
conf_mount_rw();
unset($input_errors);
$pconfig = $_POST;
@ -236,6 +237,8 @@ if (isAllowedPage("system_usermanager")) {
local_user_set_groups($userent,$_POST['groups']);
write_config();
conf_mount_ro();
pfSenseHeader("system_usermanager.php");
}
}

View File

@ -65,7 +65,8 @@ if ($_GET) {
}
if ($_POST) {
conf_mount_rw();
unset($input_errors);
$pconfig = $_POST;
@ -93,6 +94,7 @@ if ($_POST) {
/* if this is an AJAX caller then handle via JSON */
if (isAjax() && is_array($input_errors)) {
input_errors2Ajax($input_errors);
conf_mount_ro();
exit;
}
@ -122,6 +124,8 @@ if ($_POST) {
write_config();
conf_mount_ro();
pfSenseHeader("system_usermanager.php?act=edit&id={$userid}");
}
}

View File

@ -60,6 +60,7 @@ if (!is_array($a_user['priv']))
$a_user['priv'] = array();
if ($_POST) {
conf_mount_rw();
unset($input_errors);
$pconfig = $_POST;
@ -89,10 +90,13 @@ if ($_POST) {
local_user_set($a_user);
$retval = write_config();
$savemsg = get_std_save_message($retval);
conf_mount_ro();
pfSenseHeader("system_usermanager.php?act=edit&id={$userid}");
exit;
}
conf_mount_ro();
}
/* if ajax is calling, give them an update message */

View File

@ -30,6 +30,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
##|+PRIV
##|*IDENT=page-system-usermanager-settings
##|*NAME=System: User manager: settings page
@ -37,8 +38,6 @@
##|*MATCH=system_usermanager_settings.php*
##|-PRIV
if($_POST['savetest'])
$save_and_test = true;
@ -61,6 +60,8 @@ $pgtitle = array("System","User manager settings");
if ($_POST) {
unset($input_errors);
conf_mount_rw();
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if($_POST['session_timeout']) {
@ -129,6 +130,9 @@ if ($_POST) {
write_config();
}
conf_mount_ro();
}
include("head.inc");
@ -357,5 +361,4 @@ if(!$pconfig['backend'])
return true;
}
}
</script>
</script>