Open knight-of-ni opened 4 months ago
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 missing-call-to-setgroups-before-setuid
now.
Poked around with binary-or-shlib-calls-gethostbyname
a bit but it seems like a much more involved coding project. Postponing to a future time.
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