-
Notifications
You must be signed in to change notification settings - Fork 87
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
Missing call to setgroups; use getaddrinfo() instead of gethostbyname() #1308
Comments
Thanks for sharing! I propose putting these improvements on the backlog for the next major release (4.0.0) |
Absolutely. That's totally your call as to how you want to address these, even if at all. I'm just doing my diligence as a packager by letting you know about them. :-) |
I've merged a potential fix for Poked around with |
Describe the bug
Rpmlint identified a few issues worth mentioning. I've posted the full output below. Some of the issues are expected or are a result of how the rpm is built (and can be ignored). However, these in particular are worth discussing:
netatalk.x86_64: E: missing-call-to-setgroups-before-setuid /usr/sbin/cnid_dbd
Looks like this one was been around awhile, as the relevant line of code was written 19 years ago:
https://github.com/Netatalk/netatalk/blob/main/etc/cnid_dbd/main.c#L449
What I found interesting is afprun calls setgroups before setuid. Thus it passes the rpmlint check:
https://github.com/Netatalk/netatalk/blob/main/etc/afpd/afprun.c#L123
Should something similar be done for cnid_dbd?
netatalk.x86_64: W: binary-or-shlib-calls-gethostbyname /usr/lib64/libatalk.so.18.0.0
This looks like the relevant line of code:
https://github.com/Netatalk/netatalk/blob/main/libatalk/util/netatalk_conf.c#L2193
The suggestion would be to use getaddrinfo() rather than gethostbyname().
From what I can tell, this is primarily because gethostbyname does not support ipv6.
netatalk.x86_64: W: binary-or-shlib-calls-gethostbyname /usr/sbin/afpd
https://github.com/Netatalk/netatalk/blob/main/etc/afpd/nfsquota.c#L80
Same comment as the previous.
To Reproduce
Run rpmlint on the netatalk rpm
Expected behavior
No errors or warnings, that have not been addressed or explained
Environment
Logs
Additional context
none
The text was updated successfully, but these errors were encountered: