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

Bug#727708: init system other points, and conclusion [and 1 more messages]

On Mon, Dec 30, 2013 at 1:35 PM, Tollef Fog Heen <tfheen@err.no> wrote:
]] cameron
On Mon, Dec 30, 2013 at 9:43 AM, Tollef Fog Heen <tfheen@err.no> wrote: >> If this is not required by systemd, why is it done by sd_notify ? >> > It's not. You obviously did not read the code. It is. Here is a G+ convo with Lennart I had: > As a sender you only have to set SCM_CREDENTIALS manually if you > want to fake it (for which you need privs however). sd_notify() basically impersonates the process. You only need to set SCM manually if you are writing an external library. If someone is just doing it in the daemon, the kernel will set SCM_CREDENTIALS automatically.
You seem to be confusing systemd-notify(1) with sd_notify(3). sd_notify(3) is the library call that's called by the daemon itself. systemd-notify(1) is a command line tool to «Notify service manager about start-up completion and other daemon status changes».

I am not confused, but I am wrong. sd_notify() does not use SCM_CREDENTIALS explicitly (only implicitly via the kernel's autosetting of them).

Sorry for the misrepresentation,
Cameron Norman

Reply to: