From c8d34822583102c89ff11d5dbbc85005638bef8e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:42:49 +0000 Subject: import libcgroup-0.41-13.el7 --- diff --git a/SOURCES/cgred.service b/SOURCES/cgred.service index 7a77194..dbc3e85 100644 --- a/SOURCES/cgred.service +++ b/SOURCES/cgred.service @@ -1,6 +1,6 @@ [Unit] Description=CGroups Rules Engine Daemon -After=syslog.target +After=syslog.target nss-user-lookup.target [Service] Type=forking diff --git a/SOURCES/cgred.sysconfig b/SOURCES/cgred.sysconfig index 43f4ce4..b0d4967 100644 --- a/SOURCES/cgred.sysconfig +++ b/SOURCES/cgred.sysconfig @@ -1,3 +1,4 @@ # cgrulesengd command line options. See cgrulesengd(8). +CGROUP_LOGLEVEL="WARNING" OPTIONS="-s -g cgred" diff --git a/SOURCES/libcgroup-0.41-api.c-fix-log-level.patch b/SOURCES/libcgroup-0.41-api.c-fix-log-level.patch new file mode 100644 index 0000000..1164712 --- /dev/null +++ b/SOURCES/libcgroup-0.41-api.c-fix-log-level.patch @@ -0,0 +1,35 @@ +From 7e3eded57f77a606f173d6ede51585178ac3f9ee Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Tue, 24 Jan 2017 15:46:31 +0100 +Subject: [PATCH] src/api.c: Fix level of warning messages informing about + failed user/group lookup + +--- + src/api.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/api.c b/src/api.c +index 2102c13..931fb3e 100644 +--- a/src/api.c ++++ b/src/api.c +@@ -639,7 +639,7 @@ static int cgroup_parse_rules(bool cache, uid_t muid, + uid = CGRULE_INVALID; + gid = grp->gr_gid; + } else { +- cgroup_dbg("Warning: Entry for %s not" ++ cgroup_warn("Warning: Entry for %s not" + "found. Skipping rule on line" + " %d.\n", itr, linenum); + skipped = true; +@@ -656,7 +656,7 @@ static int cgroup_parse_rules(bool cache, uid_t muid, + uid = pwd->pw_uid; + gid = CGRULE_INVALID; + } else { +- cgroup_dbg("Warning: Entry for %s not" ++ cgroup_warn("Warning: Entry for %s not" + "found. Skipping rule on line" + " %d.\n", user, linenum); + skipped = true; +-- +2.7.4 + diff --git a/SOURCES/libcgroup-0.41-api.c-preserve-dirty-flag.patch b/SOURCES/libcgroup-0.41-api.c-preserve-dirty-flag.patch new file mode 100644 index 0000000..0da397b --- /dev/null +++ b/SOURCES/libcgroup-0.41-api.c-preserve-dirty-flag.patch @@ -0,0 +1,24 @@ +From c065903104c4d28b1ad0166f84fd6b19e0cf301e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Thu, 16 Mar 2017 14:58:27 +0100 +Subject: [PATCH] src/api.c: preserve dirty flag when copying controller values + +--- + src/api.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/api.c b/src/api.c +index 931fb3e..e9500e0 100644 +--- a/src/api.c ++++ b/src/api.c +@@ -1594,6 +1594,7 @@ static int cgroup_copy_controller_values(struct cgroup_controller *dst, + dst_val = dst->values[i]; + strncpy(dst_val->value, src_val->value, CG_VALUE_MAX); + strncpy(dst_val->name, src_val->name, FILENAME_MAX); ++ dst_val->dirty = src_val->dirty; + } + err: + return ret; +-- +2.7.4 + diff --git a/SPECS/libcgroup.spec b/SPECS/libcgroup.spec index d2f4bf5..cd50b5d 100644 --- a/SPECS/libcgroup.spec +++ b/SPECS/libcgroup.spec @@ -5,7 +5,7 @@ Summary: Library to control and monitor control groups Name: libcgroup Version: 0.41 -Release: 11%{?dist} +Release: 13%{?dist} License: LGPLv2+ Group: Development/Libraries URL: http://libcg.sourceforge.net/ @@ -32,6 +32,10 @@ Patch12: libcgroup-0.41-api.c-support-for-setting-multiline-values-in-contro.pat Patch13: libcgroup-0.41-api.c-fix-order-of-memory-subsystem-parameters.patch # resolves #1347765 Patch14: libcgroup-0.41-api.c-fix-potential-buffer-overflow.patch +# resolves #1406927 +Patch15: libcgroup-0.41-api.c-fix-log-level.patch +# resolves #1384390 +Patch16: libcgroup-0.41-api.c-preserve-dirty-flag.patch BuildRequires: byacc, coreutils, flex, pam-devel, systemd Requires(pre): shadow-utils @@ -90,6 +94,8 @@ provide scripts to manage that configuration. %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 +%patch16 -p1 %build %configure --enable-pam-module-dir=%{_libdir}/security \ @@ -210,6 +216,15 @@ fi %{_libdir}/pkgconfig/libcgroup.pc %changelog +* Thu Mar 16 2017 Nikola Forró - 0.41-13 +- resolves: #1384390 + preserve dirty flag when copying controller values + +* Tue Jan 24 2017 Nikola Forró - 0.41-12 +- resolves: #1406927 + start cgred service after nss-user-lookup target + show warnings about unsuccessful user/group lookups + * Thu Jun 23 2016 Nikola Forró - 0.41-11 - resolves: #1347765 fix potential buffer overflow