Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get ID for group with large number of users when using 'fileGroup' parameter #4245

Open
emilbart opened this issue Apr 14, 2020 · 0 comments

Comments

@emilbart
Copy link

emilbart commented Apr 14, 2020

rsyslogd complains when in action we set to 'fileGroup' parameter the name of group with large number of users.

The problem is in function doGetGID where getgrnam_r is called. The buffer with not enough size is passed to getgrnam_r.

Expected behavior

rsyslog should find ID for group with large number of users when using 'fileGroup' parameter in rainerscript configuration.

Actual behavior

The rsyslog complains with the following messages:
parameter 'filegroup': error to obtaining group id for 'students': Numerical result out of range [v8.32.0]
error during parsing file /etc/rsyslog.d/test.conf, on or before line 1: parameter 'filegroup': ID for group students could not be found [v8.32.0 try http://www.rsyslog.

Steps to reproduce the behavior

  1. Create a group with large number of users. For example assign to group at least 200 user.
  2. Create file /etc/rsyslog.d/test.conf with the following body:
    *.* action(type="omfile" FileCreateMode="0644" fileOwner="student1" fileGroup="students" File="/tmp/logging")
  3. Run rsyslogd.

Environment

rsyslogd -v
rsyslogd 8.32.0, compiled with:
PLATFORM: x86_64-pc-linux-gnu
PLATFORM (lsb_release -d):
FEATURE_REGEXP: Yes
GSSAPI Kerberos 5 support: Yes
FEATURE_DEBUG (debug build, slow code): No
32bit Atomic operations supported: Yes
64bit Atomic operations supported: Yes
memory allocator: system default
Runtime Instrumentation (slow code): No
uuid support: Yes
systemd support: Yes
Number of Bits in RainerScript integers: 64

See http://www.rsyslog.com for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant