Created attachment 663728 [details] Script to demonstrate the problem Description of problem: It appears that with the introduction of systemd and the Journal for logging, something (systemd?) is altering the tag passed by the logger utility. Behavior is clearly different starting with Fedora 17. Version-Release number of selected component (if applicable): systemd-195-10.fc18.i686 How reproducible: always Steps to Reproduce: 1. Download attached test script. 2. Set up a "journalctl -f" (F17 or newer) or "tail -F /var/log/messages" (F16 or older) in one terminal to watch the system log. 3. Run the test script. Actual results: With F16 and earlier the "[PID]" portion of the system log has a consistent value, specifically that of the bash process running the script -- as desired/needed. With F17 and later, the PID logged is not that of the bash process. Expected results: The script "as is", should give a consistent PID for each of three messages injected into the syslog. I don't think systemd's journal should be munging the value within the message's tag in any way whatsoever. Additional info: Perhaps this is a problem with logger itself. I've done nothing to prove that one way or another; it just seems suspicious given the "coincidental timing" of this bug and the introduction of the journal. Note the 3rd form of message injection in the script's syslog() function where the constant "[123]" is part of the tag and how even something that trivial gets mangled.
For security reasons we will override the PID with actual client PID, so that arbitrary clients cannot fake arbitrary other PIDs. This makes use of the kernels SCM_CREDENTIALS feature.