sssd/0009-UTIL-Lower-debug-level-in-perform_checks.patch
2015-09-07 18:37:40 +02:00

51 lines
1.8 KiB
Diff

From b5e5c04b5af74537c95213a72d4c916b50c05588 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Wed, 22 Jul 2015 16:29:09 +0200
Subject: [PATCH 09/14] UTIL: Lower debug level in perform_checks()
Failures in perform_checks() don't have to be fatal, therefore the debug
messages shouldn't be either.
Reviewed-by: Alexander Bokovoy <abokovoy@redhat.com>
---
src/util/check_and_open.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/util/check_and_open.c b/src/util/check_and_open.c
index 59b90bf4b96731e385fcf92ed8bc251cb94abfda..b40ae2003e3de22ce9e4ca07cecc68e18a7abab4 100644
--- a/src/util/check_and_open.c
+++ b/src/util/check_and_open.c
@@ -99,12 +99,12 @@ static errno_t perform_checks(struct stat *stat_buf,
}
if ((mode & S_IFMT) != (st_mode & S_IFMT)) {
- DEBUG(SSSDBG_CRIT_FAILURE, "File is not the right type.\n");
+ DEBUG(SSSDBG_TRACE_LIBS, "File is not the right type.\n");
return EINVAL;
}
if ((st_mode & ALLPERMS) != (mode & ALLPERMS)) {
- DEBUG(SSSDBG_CRIT_FAILURE,
+ DEBUG(SSSDBG_TRACE_LIBS,
"File has the wrong (bit masked) mode [%.7o], "
"expected [%.7o].\n",
(st_mode & ALLPERMS), (mode & ALLPERMS));
@@ -112,12 +112,12 @@ static errno_t perform_checks(struct stat *stat_buf,
}
if (uid != (uid_t)(-1) && stat_buf->st_uid != uid) {
- DEBUG(SSSDBG_CRIT_FAILURE, "File must be owned by uid [%d].\n", uid);
+ DEBUG(SSSDBG_TRACE_LIBS, "File must be owned by uid [%d].\n", uid);
return EINVAL;
}
if (gid != (gid_t)(-1) && stat_buf->st_gid != gid) {
- DEBUG(SSSDBG_CRIT_FAILURE, "File must be owned by gid [%d].\n", gid);
+ DEBUG(SSSDBG_TRACE_LIBS, "File must be owned by gid [%d].\n", gid);
return EINVAL;
}
--
2.5.0