summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-09-20 10:01:24 -0400
committerJakub Hrozek <jhrozek@redhat.com>2013-09-25 14:07:10 +0200
commite33d1454676021db27fd1f1d52bb3d79c7171d01 (patch)
treef91d79cd7e637048db58f1f0190125df58798ea8 /src/util
parent8c844405a785a03864b85295c604d0dc23b0e244 (diff)
downloadsssd-e33d1454676021db27fd1f1d52bb3d79c7171d01.tar.gz
sssd-e33d1454676021db27fd1f1d52bb3d79c7171d01.tar.bz2
sssd-e33d1454676021db27fd1f1d52bb3d79c7171d01.zip
util: Allways fall back to old find_uid method
systemd-login still fails with su/sudo login shells, so always fall back for now. Resolves: https://fedorahosted.org/sssd/ticket/2094
Diffstat (limited to 'src/util')
-rw-r--r--src/util/find_uid.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/find_uid.c b/src/util/find_uid.c
index d9b911b8..6d1478e7 100644
--- a/src/util/find_uid.c
+++ b/src/util/find_uid.c
@@ -310,15 +310,15 @@ errno_t check_if_uid_is_active(uid_t uid, bool *result)
ret = sd_uid_get_sessions(uid, 0, NULL);
if (ret > 0) {
*result = true;
+ return EOK;
}
if (ret == 0) {
*result = false;
}
- if (ret >= 0) {
- return EOK;
+ if (ret < 0) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("systemd-login gave error %d: %s\n",
+ -ret, strerror(-ret)));
}
- DEBUG(SSSDBG_CRIT_FAILURE, ("systemd-login gave error %d: %s\n",
- -ret, strerror(-ret)));
/* fall back to the old method */
#endif