Module: check_mk
Branch: master
Commit: 1cc55e81e851a35a700cc44ba7f38539043733cb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1cc55e81e851a3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Feb 23 11:05:01 2012 +0100
FIX: create auth.php if it is empty
---
web/htdocs/login.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/login.py b/web/htdocs/login.py
index f36aa5c..6c87621 100644
--- a/web/htdocs/login.py
+++ b/web/htdocs/login.py
@@ -211,7 +211,8 @@ def normal_login_page():
# We assume: Each user must visit this login page before using the multisite based
# authorization. So we can easily create the file here if it is missing.
# This is a good place to replace old api based files in the future.
- if not os.path.exists(defaults.var_dir + '/wato/auth/auth.php'):
+ auth_php = defaults.var_dir + '/wato/auth/auth.php'
+ if not os.path.exists(auth_php) or os.path.getsize(auth_php) == 0:
import wato
wato.load_plugins()
wato.create_auth_file(wato.load_users())