help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there a way to also log PWD into syslog?


From: conan zhan
Subject: Is there a way to also log PWD into syslog?
Date: Wed, 08 Sep 2021 14:07:15 +0000

Thanks for the previous answers on ultra-long commands. This is also a question
on 'bashhist.c'

--------------------------


838 hdrlen = snprintf (loghdr, sizeof(loghdr), "HISTORY: PID=%d UID=%d",
getpid(), current_user.uid);

--------------------------


I want to enrich logging this time by adding "Present Working Directory" of the
user to the header 

"HISTORY: PID=%d UID=%d", getpid(), current_user.uid

into -


"HISTORY: PID=%d UID=%d PWD=%s", getpid(), current_user.uid,
[thefunctiontogetPWD?]

Is it possible to do this customization? Thanks.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]