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

getent: handle errors #80

Closed
faxm0dem opened this issue Aug 14, 2014 · 6 comments
Closed

getent: handle errors #80

faxm0dem opened this issue Aug 14, 2014 · 6 comments
Labels

Comments

@faxm0dem
Copy link
Contributor

I'm stumbling on the following error message for large groups:

syslog-ng[9522]: $(getent group) failed; key='124', errno='Numerical result out of range (34)'

Found some references:

@algernon algernon added the bug label Aug 14, 2014
@faxm0dem
Copy link
Contributor Author

faxm0dem commented Nov 4, 2014

Trying to solve this with my limited Cskills.
I'm seeing this error for groups with the following sizes (according to getent group <gid> | wc -c): 875, 726, 1004, ... . Looking at the code, I see bufsize which on my system seems to be 1024: shouldn't that be enough for these groups?

@faxm0dem
Copy link
Contributor Author

faxm0dem commented Nov 4, 2014

I guess the solution would be to have a loop reallocating the buffer in case if (errno == ERANGE)

@algernon
Copy link
Contributor

algernon commented Nov 4, 2014

As a quick workaround, I'd try upping the buffer size to something like 4096. That's easier and less costy than reallocation would be.

@faxm0dem
Copy link
Contributor Author

faxm0dem commented Nov 5, 2014

you mean by ignoring _SC_GETPW_R_SIZE_MAX completely?

@algernon
Copy link
Contributor

algernon commented Nov 5, 2014

Yes.

@mochrul
Copy link
Collaborator

mochrul commented Jul 28, 2017

getent module removed from the incubator (and merged into syslog-ng upstream).

@mochrul mochrul closed this as completed Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants