summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-09-21 05:57:12 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-09-22 11:41:11 +0200
commitd2f4746587809673122d348a8f806f1c14d3d60a (patch)
treea9aba78aff28bea93c1685571a3033c082afb247 /src
parent4865dcbead699b861c24e87b16e20fc2f6698d3f (diff)
downloadsssd-d2f4746587809673122d348a8f806f1c14d3d60a.tar.gz
sssd-d2f4746587809673122d348a8f806f1c14d3d60a.tar.bz2
sssd-d2f4746587809673122d348a8f806f1c14d3d60a.zip
Check return values of setenv and unsetenv
Diffstat (limited to 'src')
-rw-r--r--src/providers/data_provider_be.c6
-rw-r--r--src/util/server.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
index ccd51b45..6b58d88a 100644
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -2891,7 +2891,11 @@ int main(int argc, const char *argv[])
return 2;
}
- setenv(SSS_DOM_ENV, be_domain, 1);
+ ret = setenv(SSS_DOM_ENV, be_domain, 1);
+ if (ret != 0) {
+ DEBUG(SSSDBG_MINOR_FAILURE, ("Setting "SSS_DOM_ENV" failed, journald "
+ "logging mightnot work as expected\n"));
+ }
ret = die_if_parent_died();
if (ret != EOK) {
diff --git a/src/util/server.c b/src/util/server.c
index 3dcfccaf..b1c59e1d 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -426,7 +426,11 @@ int server_setup(const char *name, int flags,
/* 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);
+ ret = unsetenv(SSS_DOM_ENV);
+ if (ret != 0) {
+ DEBUG(SSSDBG_MINOR_FAILURE, ("Unsetting "SSS_DOM_ENV" failed, journald "
+ "logging mightnot work as expected\n"));
+ }
setup_signals();