import rsyslog-8.1911.0-7.el8_4.2

This commit is contained in:
CentOS Sources 2021-06-29 10:01:42 -04:00 committed by Andrew Lukoshko
parent 5ed1f72be1
commit 3c8a96e211
2 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,49 @@
diff -up rsyslog-8.1911.0/grammar/rainerscript.c.orig rsyslog-8.1911.0/grammar/rainerscript.c
--- rsyslog-8.1911.0/grammar/rainerscript.c.orig 2021-04-06 13:43:55.366523373 +0200
+++ rsyslog-8.1911.0/grammar/rainerscript.c 2021-04-06 13:44:40.039239056 +0200
@@ -905,15 +905,29 @@ static int
doGetGID(struct nvlst *valnode, struct cnfparamdescr *param,
struct cnfparamvals *val)
{
- char *cstr;
- int r;
- struct group *resultBuf;
- struct group wrkBuf;
- char stringBuf[2048]; /* 2048 has been proven to be large enough */
+ char *cstr;
+ int r;
+ struct group *resultBuf = NULL;
+ struct group wrkBuf;
+ char *stringBuf = NULL;
+ size_t bufSize = 1024;
+ int e;
+
+ cstr = es_str2cstr(valnode->val.d.estr, NULL);
+ do {
+ char *p;
+
+ /* Increase bufsize and try again.*/
+ bufSize *= 2;
+ p = realloc(stringBuf, bufSize);
+ if(!p) {
+ e = ENOMEM;
+ break;
+ }
+ stringBuf = p;
+ e = getgrnam_r(cstr, &wrkBuf, stringBuf, bufSize, &resultBuf);
+ } while(!resultBuf && (e == ERANGE));
- cstr = es_str2cstr(valnode->val.d.estr, NULL);
- const int e = getgrnam_r(cstr, &wrkBuf, stringBuf,
- sizeof(stringBuf), &resultBuf);
if(resultBuf == NULL) {
if(e != 0) {
LogError(e, RS_RET_ERR, "parameter '%s': error to "
@@ -929,6 +943,7 @@ doGetGID(struct nvlst *valnode, struct c
param->name, (int) resultBuf->gr_gid, cstr);
r = 1;
}
+ free(stringBuf);
free(cstr);
return r;
}

View File

@ -6,7 +6,7 @@
Summary: Enhanced system logging and kernel message trapping daemon
Name: rsyslog
Version: 8.1911.0
Release: 7%{?dist}
Release: 7%{?dist}.2
License: (GPLv3+ and ASL 2.0)
Group: System Environment/Daemons
ExcludeArch: i686
@ -54,6 +54,7 @@ Patch4: rsyslog-8.1911.0-rhbz1659383-config-enabled-error.patch
Patch5: rsyslog-8.1911.0-rhbz1789675-serialize-crash-race.patch
Patch6: rsyslog-8.1911.0-rhbz1793569-imfile-file_id.patch
Patch7: rsyslog-8.1911.0-rhbz1843994-imfile-selinux-symlink-crash.patch
Patch8: rsyslog-8.1911.0-rhbz1944756-large-group.patch
%package crypto
Summary: Encryption support
@ -263,6 +264,7 @@ mv build doc
%patch5 -p1 -b .serialize-json
%patch6 -p1 -b .imfile-id
%patch7 -p1 -b .imfile-selinux-symlink
%patch8 -p1 -b .large-groups
%build
%ifarch sparc64
@ -499,6 +501,10 @@ done
%{_libdir}/rsyslog/omudpspoof.so
%changelog
* Tue Apr 06 2021 Attila Lakatos <alakatos@redhat.com> - 8.1911.0-7.2
- added patch resolving theoretically "too large" groups
resolves:rhbz#1944756
* Wed Nov 18 2020 Attila Lakatos <alakatos@redhat.com> - 8.1911.0-7
- add back rsyslog-udpspoof package
resolves: rhbz#1869874