diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-09-10 19:16:48 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-09-18 18:56:41 +0200 |
commit | d6837823b0a002c9c8afb48caf3eeda5cb73f173 (patch) | |
tree | 55beed451ed18fe3d08f96fe7478d5cc6b330648 /src/util/server.c | |
parent | 77c0d1f6074059dafd2293f9c42ea0f9d60f8aad (diff) | |
download | sssd-d6837823b0a002c9c8afb48caf3eeda5cb73f173.tar.gz sssd-d6837823b0a002c9c8afb48caf3eeda5cb73f173.tar.bz2 sssd-d6837823b0a002c9c8afb48caf3eeda5cb73f173.zip |
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
Diffstat (limited to 'src/util/server.c')
-rw-r--r-- | src/util/server.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/server.c b/src/util/server.c index a33207b3..3dcfccaf 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, |