Module: check_mk
Branch: master
Commit: e6f9219acdfa54110e790ede47afed433ae7107a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e6f9219acdfa54…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Apr 3 09:57:25 2013 +0200
Also populating empty auth serials file in page hook
---
web/htdocs/userdb.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index 075a467..2d2853a 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -556,7 +556,7 @@ def general_page_hook():
# Create initial auth.serials file, same issue as auth.php above
serials_file = '%s/auth.serials' % os.path.dirname(defaults.htpasswd_file)
- if not os.path.exists(serials_file):
+ if not os.path.exists(serials_file) or os.path.getsize(serials_file) == 0:
save_users(load_users())
# Hook function can be registered here to execute actions on a "regular" base
without