Module: check_mk
Branch: master
Commit: 1fd87f94f7136104b966b1861b3c9a32a8905a7f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1fd87f94f71361…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 22 12:23:30 2012 +0100
Updated bug entries #0881
---
.bugs/881 | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/.bugs/881 b/.bugs/881
new file mode 100644
index 0000000..826e521
--- /dev/null
+++ b/.bugs/881
@@ -0,0 +1,13 @@
+Title: Manpage of fileinfo outdated
+Component: docu
+State: open
+Date: 2012-11-22 12:21:55
+Targetversion: future
+Class: bug
+
+The man page of fileinfo is not uptodate: The linux agent now
+supports fileinfo. Also the configuration of that should be
+described here.
+
+The man page of fileinfo.groups: do we really have regular expressions?
+It does not seem to work...
Module: check_mk
Branch: master
Commit: d0a5549e98ed1ded708c6d7f18aebdf16c729542
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d0a5549e98ed1d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 22 12:10:22 2012 +0100
Updated bug entries #0880
---
.bugs/880 | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/.bugs/880 b/.bugs/880
new file mode 100644
index 0000000..c334cf0
--- /dev/null
+++ b/.bugs/880
@@ -0,0 +1,10 @@
+Title: Convert check writing docu to new check API
+Component: docu
+State: open
+Date: 2012-11-22 12:09:37
+Targetversion: future
+Class: todo
+
+Now since 1.2.0 is out long enough it is time to convert
+the check writing docu to the new dictionary based format
+of check_info[...].
Module: check_mk
Branch: master
Commit: 8da8c92ad2d1b56a3384f781e6577fd45e74f43b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8da8c92ad2d1b5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 22 09:18:08 2012 +0100
Checking for existing auth.phgp and auth.serials independent of the used login method
---
web/htdocs/login.py | 10 ----------
web/htdocs/userdb.py | 23 ++++++++++++++++++++++-
2 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/web/htdocs/login.py b/web/htdocs/login.py
index 3c7557d..7e5e2ee 100644
--- a/web/htdocs/login.py
+++ b/web/htdocs/login.py
@@ -205,16 +205,6 @@ def page_login(no_html_output = False):
return normal_login_page()
def normal_login_page(called_directly = True):
- # Working around the problem that the auth.php file needed for multisite based
- # authorization of external addons might not exist when setting up a new installation
- # 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.
- 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.create_auth_file(wato.load_users())
-
html.set_render_headfoot(False)
html.header(_("Check_MK Multisite Login"), javascripts=[], stylesheets=["pages", "login"])
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index c49d112..e0da8ce 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -24,7 +24,7 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-import config
+import config, defaults
from lib import *
import time
from valuespec import *
@@ -217,6 +217,25 @@ def hook_save(users):
else:
raise
+# This function registers general stuff, which is independet of the single
+# connectors to each page load. It is exectued AFTER all other page hooks.
+def general_page_hook():
+ # Working around the problem that the auth.php file needed for multisite based
+ # authorization of external addons might not exist when setting up a new installation
+ # 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.
+ 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.create_auth_file(wato.load_users())
+
+ # 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):
+ import wato
+ wato.save_users(wato.load_users())
+
# Hook function can be registered here to execute actions on a "regular" base without
# user triggered action. This hook is called on each page load.
# Catch all exceptions and log them to apache error log. Let exceptions raise trough
@@ -235,3 +254,5 @@ def hook_page():
import traceback
html.log('Exception (%s, page handler): %s' %
(connector['id'], traceback.format_exc()))
+
+ general_page_hook()