From 66355b4ef3ffcc0c078abb4aaea095bfe2876df2 Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Sat, 29 Aug 2009 13:55:24 +0000 Subject: added support for configuring inclusion of current directory into path --- src/msec/config.py | 3 ++- src/msec/libmsec.py | 13 +++++++++++++ src/msec/version.py | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/msec/config.py b/src/msec/config.py index 3cd635d..a70ca4f 100644 --- a/src/msec/config.py +++ b/src/msec/config.py @@ -82,6 +82,7 @@ SETTINGS = {'BASE_LEVEL': ("libmsec.base_level", # security options 'USER_UMASK': ("libmsec.set_user_umask", ['*']), 'ROOT_UMASK': ("libmsec.set_root_umask", ['*']), + 'ALLOW_CURDIR_IN_PATH': ("libmsec.allow_curdir_in_path", ['yes', 'no']), 'WIN_PARTS_UMASK': ("libmsec.set_win_parts_umask", ['*']), 'ACCEPT_BOGUS_ERROR_RESPONSES': ("libmsec.accept_bogus_error_responses", ['yes', 'no']), 'ACCEPT_BROADCASTED_ICMP_ECHO': ("libmsec.accept_broadcasted_icmp_echo", ['yes', 'no']), @@ -120,7 +121,7 @@ SETTINGS_SYSTEM = ["ENABLE_STARTUP_MSEC", "ENABLE_STARTUP_PERMS", "ENABLE_MSEC_C "ALLOW_ROOT_LOGIN", "ALLOW_USER_LIST", "ALLOW_AUTOLOGIN", "ENABLE_CONSOLE_LOG", "CREATE_SERVER_LINK", "ALLOW_XAUTH_FROM_ROOT", "ALLOW_REBOOT", "SHELL_HISTORY_SIZE", "SHELL_TIMEOUT", "USER_UMASK", "ROOT_UMASK", - "SECURE_TMP", "WIN_PARTS_UMASK" + "SECURE_TMP", "WIN_PARTS_UMASK", "ALLOW_CURDIR_IN_PATH" ] # network security settings SETTINGS_NETWORK = ["ACCEPT_BOGUS_ERROR_RESPONSES", "ACCEPT_BROADCASTED_ICMP_ECHO", "ACCEPT_ICMP_ECHO", diff --git a/src/msec/libmsec.py b/src/msec/libmsec.py index 997d11c..8b6088b 100755 --- a/src/msec/libmsec.py +++ b/src/msec/libmsec.py @@ -1527,6 +1527,19 @@ class MSEC: """Enforce MSEC file directory permissions on system startup. If this parameter is set to 'enforce', system permissions will be enforced automatically, according to system security settings.""" pass + def allow_curdir_in_path(self, param): + """Include current directory into user PATH by default""" + msec = self.configfiles.get_config_file(SHELLCONF) + + val = msec.get_shell_variable('ALLOW_CURDIR_IN_PATH') + + if val != param: + if param == 'yes': + self.log.info(_('Allowing including current directory in path')) + msec.set_shell_variable('ALLOW_CURDIR_IN_PATH', param) + else: + self.log.info(_('Not allowing including current directory in path')) + msec.set_shell_variable('ALLOW_CURDIR_IN_PATH', param) # }}} diff --git a/src/msec/version.py b/src/msec/version.py index 9131e62..d3cbaf2 100644 --- a/src/msec/version.py +++ b/src/msec/version.py @@ -1 +1 @@ -version='0.60.22' +version='0.70.3' -- cgit v1.2.1