diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-11-18 23:25:21 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-11-18 23:25:21 +0000 |
commit | 950f0f9e08c6e6dd8dd6a4908d72acf41e6e2bdc (patch) | |
tree | b48d1e73096435b47ae7a63b6b7c20aaf2c4e608 /etc/inc/auth.inc | |
parent | c9a4b3f267f0b216c807ba26fb6bab0b57f1bb86 (diff) | |
download | pfsense-950f0f9e08c6e6dd8dd6a4908d72acf41e6e2bdc.zip pfsense-950f0f9e08c6e6dd8dd6a4908d72acf41e6e2bdc.tar.gz |
Correctly show 401 errors.
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r-- | etc/inc/auth.inc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index 08afe7d..26486e1 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -36,6 +36,24 @@ require_once("functions.inc"); $groupindex = index_groups(); $userindex = index_users(); +function logout_session() { + global $_SESSION; + + if (hasLockAbility($_SESSION['Username'])) { + unlink_if_exists("{$g['tmp_path']}/webconfigurator.lock"); + } + + /* wipe out $_SESSION */ + $_SESSION = array(); + + /* and destroy it */ + session_destroy(); + + $scriptName = split("/", $_SERVER["SCRIPT_FILENAME"]); + $scriptElms = count($scriptName); + $scriptName = $scriptName[$scriptElms-1]; +} + function &getSystemAdminNames() { global $config, $g, $userindex; $adminUsers = array(); |