mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #37119 from jfindlay/log_proc_user
log.setup: only assign user if defined
This commit is contained in:
commit
169a82e62b
2 changed files with 7 additions and 2 deletions
|
@ -930,8 +930,13 @@ def patch_python_logging_handlers():
|
|||
def __process_multiprocessing_logging_queue(opts, queue):
|
||||
import salt.utils
|
||||
salt.utils.appendproctitle('MultiprocessingLoggingQueue')
|
||||
|
||||
# Assign UID/GID of user to proc if set
|
||||
from salt.utils.verify import check_user
|
||||
check_user(opts['user'])
|
||||
user = opts.get('user')
|
||||
if user:
|
||||
check_user(user)
|
||||
|
||||
if salt.utils.is_windows():
|
||||
# On Windows, creating a new process doesn't fork (copy the parent
|
||||
# process image). Due to this, we need to setup extended logging
|
||||
|
|
|
@ -184,7 +184,7 @@ class TestDaemon(object):
|
|||
'''
|
||||
# Setup the multiprocessing logging queue listener
|
||||
salt_log_setup.setup_multiprocessing_logging_listener(
|
||||
self.parser.options
|
||||
vars(self.parser.options)
|
||||
)
|
||||
|
||||
# Set up PATH to mockbin
|
||||
|
|
Loading…
Add table
Reference in a new issue