libcgroup: update to 2.0.2.
This commit is contained in:
parent
faa1641b4d
commit
30e6a0e430
@ -963,7 +963,7 @@ libIceDiscovery.so.37 libIce-3.7.5_2
|
||||
libIceLocatorDiscovery.so.37 libIce-3.7.5_2
|
||||
libvdpau.so.1 libvdpau-0.4.1_1
|
||||
libgsm.so.1 libgsm-1.0.13_13
|
||||
libcgroup.so.1 libcgroup-0.37.1_1
|
||||
libcgroup.so.2 libcgroup-2.0.2_1
|
||||
libxdg-basedir.so.1 libxdg-basedir-1.1.1_1
|
||||
libev.so.4 libev-4.04_1
|
||||
libell.so.0 ell-0.45_1
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- a/src/daemon/cgrulesengd.c
|
||||
+++ b/src/daemon/cgrulesengd.c
|
||||
@@ -889,9 +889,6 @@
|
||||
} else if (pid > 0) {
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
-
|
||||
- /* Change the file mode mask. */
|
||||
- umask(0);
|
||||
} else {
|
||||
flog(LOG_DEBUG, "Not using daemon mode\n");
|
||||
pid = getpid();<Paste>
|
@ -1,38 +0,0 @@
|
||||
Date: Tue, 8 Dec 2015 16:53:41 +0100
|
||||
Subject: [PATCH] api.c: fix infinite loop
|
||||
|
||||
If getgrnam or getpwuid functions failed, the program entered
|
||||
an infinite loop, because the rule pointer was never advanced.
|
||||
This is now fixed by updating the pointer before continuing
|
||||
to the next iteration.
|
||||
---
|
||||
src/api.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/api.c b/src/api.c
|
||||
index d6c9d3a..ef796ac 100644
|
||||
--- a/src/api.c
|
||||
+++ b/src/api.c
|
||||
@@ -2775,13 +2775,17 @@ static struct cgroup_rule *cgroup_find_matching_rule_uid_gid(uid_t uid,
|
||||
/* Get the group data. */
|
||||
sp = &(rule->username[1]);
|
||||
grp = getgrnam(sp);
|
||||
- if (!grp)
|
||||
+ if (!grp) {
|
||||
+ rule = rule->next;
|
||||
continue;
|
||||
+ }
|
||||
|
||||
/* Get the data for UID. */
|
||||
usr = getpwuid(uid);
|
||||
- if (!usr)
|
||||
+ if (!usr) {
|
||||
+ rule = rule->next;
|
||||
continue;
|
||||
+ }
|
||||
|
||||
/* If UID is a member of group, we matched. */
|
||||
for (i = 0; grp->gr_mem[i]; i++) {
|
||||
--
|
||||
2.10.2
|
||||
|
@ -1,22 +0,0 @@
|
||||
In musl libc these macros are defined in the deprecated
|
||||
include file sys/cdefs.h
|
||||
|
||||
--- a/include/libcgroup.h 2014-01-13 15:05:56.000000000 +0100
|
||||
+++ b/include/libcgroup.h 2015-10-25 14:03:32.921207668 +0100
|
||||
@@ -16,6 +16,16 @@
|
||||
#ifndef _LIBCGROUP_H
|
||||
#define _LIBCGROUP_H
|
||||
|
||||
+#if !defined(__GLIBC__)
|
||||
+#ifdef __cplusplus
|
||||
+# define __BEGIN_DECLS extern "C" {
|
||||
+# define __END_DECLS }
|
||||
+#else
|
||||
+# define __BEGIN_DECLS
|
||||
+# define __END_DECLS
|
||||
+#endif
|
||||
+#endif /* !defined(__GLIBC__) */
|
||||
+
|
||||
#define _LIBCGROUP_H_INSIDE
|
||||
|
||||
#include <libcgroup/error.h>
|
@ -1,22 +0,0 @@
|
||||
The musl libc strerror_r(3) semantics are different from
|
||||
GNU libc's if _GNU_SOURCE is defined.
|
||||
|
||||
--- a/src/api.c 2014-01-13 15:05:56.000000000 +0100
|
||||
+++ b/src/api.c 2015-10-25 14:09:18.690232596 +0100
|
||||
@@ -3332,8 +3332,16 @@
|
||||
|
||||
const char *cgroup_strerror(int code)
|
||||
{
|
||||
+#if defined(__GLIBC__)
|
||||
if (code == ECGOTHER)
|
||||
return strerror_r(cgroup_get_last_errno(), errtext, MAXLEN);
|
||||
+#else
|
||||
+ if (code == ECGOTHER) {
|
||||
+ if (0 == strerror_r(cgroup_get_last_errno(), errtext, MAXLEN))
|
||||
+ return errtext;
|
||||
+ return "strerror_r() failed";
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
return cgroup_strerror_codes[code % ECGROUPNOTCOMPILED];
|
||||
}
|
@ -1,17 +1,18 @@
|
||||
# Template file for 'libcgroup'
|
||||
pkgname=libcgroup
|
||||
version=0.41
|
||||
revision=8
|
||||
version=2.0.2
|
||||
revision=1
|
||||
build_style=gnu-configure
|
||||
configure_args="--sbindir=/usr/bin --enable-pam-module-dir=/usr/lib/security"
|
||||
hostmakedepends="flex automake libtool"
|
||||
hostmakedepends="flex"
|
||||
makedepends="pam-devel"
|
||||
short_desc="Library that abstracts the control group file system in Linux"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
license="LGPL-2.1"
|
||||
homepage="http://libcg.sourceforge.net"
|
||||
distfiles="${SOURCEFORGE_SITE}/libcg/${pkgname}-${version}.tar.bz2"
|
||||
checksum=e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51
|
||||
make_dirs="/etc/cgconfig.d 0755 root root"
|
||||
license="LGPL-2.1-only"
|
||||
homepage="https://github.com/libcgroup/libcgroup"
|
||||
distfiles="https://github.com/libcgroup/libcgroup/releases/download/v${version}/libcgroup-${version}.tar.gz"
|
||||
checksum=8ef63b32e0aff619547dbb8a25e1f6bab152d7c4864795cf915571a5994d0cf8
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) # Add musl-fts implementation
|
||||
@ -20,9 +21,6 @@ case "$XBPS_TARGET_MACHINE" in
|
||||
;;
|
||||
esac
|
||||
|
||||
pre_configure() {
|
||||
autoreconf -if
|
||||
}
|
||||
post_configure() {
|
||||
# Disable tests
|
||||
sed -i Makefile -e "/SUBDIRS =/ s; tests;;"
|
||||
|
Loading…
x
Reference in New Issue
Block a user