[systemd-devel] How to quiet cron sessions logging with systemd-212?

Lennart Poettering lennart at poettering.net
Tue Jun 10 09:04:49 PDT 2014


On Tue, 10.06.14 14:31, Ivan Shapovalov (intelfx100 at gmail.com) wrote:

> It's more interesting, why a logind session is ever being created for the cron job...
> It shouldn't be that way, or do I misunderstand something?

We should create a logind session for all sessions of normal users. It
doesn't matter if its just a background job or foreground, logind should
know about it, we should set up its full environment (including the
per-user systemd), and set all security limits and stuff.

For system users (i.e. those with an uid < 1000), for all that stuff
that is just an implementation detail of the OS however there shouldn't
really be any PAM or logind session created by cron. It should just
setresuid() and invoke whatever it needs to invoke... Setting up a full
PAM session is quite unnecessary then...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list