From d6837823b0a002c9c8afb48caf3eeda5cb73f173 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 10 Sep 2013 19:16:48 +0200 Subject: BE: Log domain name to journald if available If the SSSD is compiled with journald support, then all sss_log() statements will include a new field called "SSSD_DOMAIN" that includes the domain name. Filtering only messages from the single domain is then as easy as: # journalctl SSSD_DOMAIN=foo.example.com --- src/util/server.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/util/server.c') diff --git a/src/util/server.c b/src/util/server.c index a33207b3d..3dcfccaf6 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -423,6 +423,11 @@ int server_setup(const char *name, int flags, setenv("_SSS_LOOPS", "NO", 0); + /* To make sure the domain cannot be set from the environment, unset the + * variable explicitly when setting up any server. Backends later set the + * value after reading domain from the configuration */ + unsetenv(SSS_DOM_ENV); + setup_signals(); /* we want default permissions on created files to be very strict, -- cgit