Remove trailing whitespace from test output.
This commit is contained in:
@@ -16,7 +16,7 @@ class SudoAuditPlugin(sudo.Plugin):
|
|||||||
user_info_dict = sudo.options_as_dict(user_info)
|
user_info_dict = sudo.options_as_dict(user_info)
|
||||||
user = user_info_dict.get("user", "???")
|
user = user_info_dict.get("user", "???")
|
||||||
uid = user_info_dict.get("uid", "???")
|
uid = user_info_dict.get("uid", "???")
|
||||||
self._log("-- Started by user {} ({}) -- ".format(user, uid))
|
self._log("-- Started by user {} ({}) --".format(user, uid))
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
self._log("-- Finished --")
|
self._log("-- Finished --")
|
||||||
|
@@ -363,9 +363,9 @@ _py_debug_python_function(const char *class_name, const char *function_name, con
|
|||||||
Py_DECREF(py_kwargs_sorted);
|
Py_DECREF(py_kwargs_sorted);
|
||||||
}
|
}
|
||||||
|
|
||||||
sudo_debug_printf(SUDO_DEBUG_DIAG, "%s.%s %s: %s %s\n", class_name,
|
sudo_debug_printf(SUDO_DEBUG_DIAG, "%s.%s %s: %s%s%s\n", class_name,
|
||||||
function_name, message, args_str ? args_str : "()",
|
function_name, message, args_str ? args_str : "()",
|
||||||
kwargs_str ? kwargs_str : "");
|
kwargs_str ? " " : "", kwargs_str ? kwargs_str : "");
|
||||||
free(args_str);
|
free(args_str);
|
||||||
free(kwargs_str);
|
free(kwargs_str);
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
(AUDIT) -- Started by user testuser1 (123) --
|
(AUDIT) -- Started by user testuser1 (123) --
|
||||||
(AUDIT) Requested command: id --help
|
(AUDIT) Requested command: id --help
|
||||||
(AUDIT) Accepted command: /sbin/id --help
|
(AUDIT) Accepted command: /sbin/id --help
|
||||||
(AUDIT) By the plugin: accepter plugin name (type=POLICY)
|
(AUDIT) By the plugin: accepter plugin name (type=POLICY)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
(AUDIT) -- Started by user ??? (???) --
|
(AUDIT) -- Started by user ??? (???) --
|
||||||
(AUDIT) Requested command: id
|
(AUDIT) Requested command: id
|
||||||
(AUDIT) Plugin errorer plugin name (type=AUDIT) got an error: Some error has happened
|
(AUDIT) Plugin errorer plugin name (type=AUDIT) got an error: Some error has happened
|
||||||
(AUDIT) Sudo has run into an error: 222
|
(AUDIT) Sudo has run into an error: 222
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
(AUDIT) -- Started by user root (0) --
|
(AUDIT) -- Started by user root (0) --
|
||||||
(AUDIT) Requested command: passwd
|
(AUDIT) Requested command: passwd
|
||||||
(AUDIT) Rejected by plugin rejecter plugin name (type=IO): Rejected just because!
|
(AUDIT) Rejected by plugin rejecter plugin name (type=IO): Rejected just because!
|
||||||
(AUDIT) The command was not executed
|
(AUDIT) The command was not executed
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
(AUDIT) -- Started by user root (0) --
|
(AUDIT) -- Started by user root (0) --
|
||||||
Python Example Audit Plugin
|
Python Example Audit Plugin
|
||||||
Python audit plugin (API 1.0): SudoAuditPlugin (loaded from 'SRC_DIR/example_audit_plugin.py')
|
Python audit plugin (API 1.0): SudoAuditPlugin (loaded from 'SRC_DIR/example_audit_plugin.py')
|
||||||
Python Example Audit Plugin (version=1.0)
|
Python Example Audit Plugin (version=1.0)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
(AUDIT1) -- Started by user default (1000) --
|
(AUDIT1) -- Started by user default (1000) --
|
||||||
(AUDIT1) Requested command: id --help
|
(AUDIT1) Requested command: id --help
|
||||||
(AUDIT2) -- Started by user default (1000) --
|
(AUDIT2) -- Started by user default (1000) --
|
||||||
(AUDIT2) Requested command: id --help
|
(AUDIT2) Requested command: id --help
|
||||||
(AUDIT1) Accepted command: /sbin/id --help
|
(AUDIT1) Accepted command: /sbin/id --help
|
||||||
(AUDIT1) By the plugin: accepter plugin name (type=POLICY)
|
(AUDIT1) By the plugin: accepter plugin name (type=POLICY)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
sudo.debug was called with arguments: (DEBUG.ERROR, 'My demo purpose plugin shows this ERROR level debug message')
|
sudo.debug was called with arguments: (DEBUG.ERROR, 'My demo purpose plugin shows this ERROR level debug message')
|
||||||
sudo.debug was called with arguments: (DEBUG.INFO, 'My demo purpose plugin shows this INFO level debug message')
|
sudo.debug was called with arguments: (DEBUG.INFO, 'My demo purpose plugin shows this INFO level debug message')
|
||||||
LogHandler.emit was called
|
LogHandler.emit was called
|
||||||
LogHandler.emit was called
|
LogHandler.emit was called
|
||||||
sudo.options_as_dict was called with arguments: (('ModulePath=SRC_DIR/example_debugging.py', 'ClassName=DebugDemoPlugin'),)
|
sudo.options_as_dict was called with arguments: (('ModulePath=SRC_DIR/example_debugging.py', 'ClassName=DebugDemoPlugin'),)
|
||||||
sudo.options_as_dict returned result: [('ClassName', 'DebugDemoPlugin'), ('ModulePath', 'SRC_DIR/example_debugging.py')]
|
sudo.options_as_dict returned result: [('ClassName', 'DebugDemoPlugin'), ('ModulePath', 'SRC_DIR/example_debugging.py')]
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
__init__ @ SRC_DIR/example_debugging.py:58 calls C function:
|
__init__ @ SRC_DIR/example_debugging.py:58 calls C function:
|
||||||
sudo.debug was called with arguments: (DEBUG.ERROR, 'My demo purpose plugin shows this ERROR level debug message')
|
sudo.debug was called with arguments: (DEBUG.ERROR, 'My demo purpose plugin shows this ERROR level debug message')
|
||||||
__init__ @ SRC_DIR/example_debugging.py:63 calls C function:
|
__init__ @ SRC_DIR/example_debugging.py:63 calls C function:
|
||||||
sudo.debug was called with arguments: (DEBUG.INFO, 'My demo purpose plugin shows this INFO level debug message')
|
sudo.debug was called with arguments: (DEBUG.INFO, 'My demo purpose plugin shows this INFO level debug message')
|
||||||
handle @ logging/__init__.py calls C function:
|
handle @ logging/__init__.py calls C function:
|
||||||
LogHandler.emit was called
|
LogHandler.emit was called
|
||||||
handle @ logging/__init__.py calls C function:
|
handle @ logging/__init__.py calls C function:
|
||||||
LogHandler.emit was called
|
LogHandler.emit was called
|
||||||
__init__ @ SRC_DIR/example_debugging.py:85 calls C function:
|
__init__ @ SRC_DIR/example_debugging.py:85 calls C function:
|
||||||
sudo.options_as_dict was called with arguments: (('ModulePath=SRC_DIR/example_debugging.py', 'ClassName=DebugDemoPlugin'),)
|
sudo.options_as_dict was called with arguments: (('ModulePath=SRC_DIR/example_debugging.py', 'ClassName=DebugDemoPlugin'),)
|
||||||
sudo.options_as_dict returned result: [('ClassName', 'DebugDemoPlugin'), ('ModulePath', 'SRC_DIR/example_debugging.py')]
|
sudo.options_as_dict returned result: [('ClassName', 'DebugDemoPlugin'), ('ModulePath', 'SRC_DIR/example_debugging.py')]
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
SudoGroupPlugin.__init__ was called with arguments: () [('args', ('ModulePath=SRC_DIR/example_group_plugin.py', 'ClassName=SudoGroupPlugin')), ('version', '1.0')]
|
SudoGroupPlugin.__init__ was called with arguments: () [('args', ('ModulePath=SRC_DIR/example_group_plugin.py', 'ClassName=SudoGroupPlugin')), ('version', '1.0')]
|
||||||
SudoGroupPlugin.__init__ returned result: <example_group_plugin.SudoGroupPlugin object>
|
SudoGroupPlugin.__init__ returned result: <example_group_plugin.SudoGroupPlugin object>
|
||||||
SudoGroupPlugin.query was called with arguments: ('user', 'group', ('pw_name', 'pw_passwd', 1001, 101, 'pw_gecos', 'pw_dir', 'pw_shell'))
|
SudoGroupPlugin.query was called with arguments: ('user', 'group', ('pw_name', 'pw_passwd', 1001, 101, 'pw_gecos', 'pw_dir', 'pw_shell'))
|
||||||
SudoGroupPlugin.query returned result: 0
|
SudoGroupPlugin.query returned result: 0
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
SudoPolicyPlugin.__init__ was called with arguments: () [('plugin_options', ('ModulePath=SRC_DIR/example_policy_plugin.py', 'ClassName=SudoPolicyPlugin')), ('settings', ()), ('user_env', ()), ('user_info', ()), ('version', '1.0')]
|
SudoPolicyPlugin.__init__ was called with arguments: () [('plugin_options', ('ModulePath=SRC_DIR/example_policy_plugin.py', 'ClassName=SudoPolicyPlugin')), ('settings', ()), ('user_env', ()), ('user_info', ()), ('version', '1.0')]
|
||||||
SudoPolicyPlugin.__init__ returned result: <example_policy_plugin.SudoPolicyPlugin object>
|
SudoPolicyPlugin.__init__ returned result: <example_policy_plugin.SudoPolicyPlugin object>
|
||||||
SudoPolicyPlugin.validate was called with arguments: ()
|
SudoPolicyPlugin.validate was called with arguments: ()
|
||||||
SudoPolicyPlugin.validate returned result: None
|
SudoPolicyPlugin.validate returned result: None
|
||||||
SudoPolicyPlugin.invalidate was called with arguments: (1,)
|
SudoPolicyPlugin.invalidate was called with arguments: (1,)
|
||||||
SudoPolicyPlugin.invalidate returned result: None
|
SudoPolicyPlugin.invalidate returned result: None
|
||||||
SudoPolicyPlugin.invalidate was called with arguments: (0,)
|
SudoPolicyPlugin.invalidate was called with arguments: (0,)
|
||||||
SudoPolicyPlugin.invalidate returned result: None
|
SudoPolicyPlugin.invalidate returned result: None
|
||||||
|
Reference in New Issue
Block a user