Improve audit log output
Show the full command path in the actual audit log message, but still only show the command name in the prefix.
This commit is contained in:
parent
2ee2b2cb33
commit
82b0301c0e
|
@ -65,10 +65,9 @@ def audit():
|
|||
"""
|
||||
|
||||
args = argv
|
||||
args[0] = "pvc"
|
||||
pid = getpid()
|
||||
|
||||
openlog(facility=LOG_AUTH, ident=f"{args[0]}[{pid}]")
|
||||
openlog(facility=LOG_AUTH, ident=f"{args[0].split('/')[-1]}[{pid}]")
|
||||
syslog(
|
||||
f"""client audit: command "{' '.join(args)}" by user {environ.get('USER', None)}"""
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue