Hi. This set of patches adds support for OpenBSD. We've running with these for years but since I am a professional slacker I never took the time to properly report them... patch 1/3: add support for BSD authentication (OpenBSD does not use PAM nor SHADOW) patch 2/3: get_kinfo_proc(): add support for OpenBSD patch 3/3: get/setnetgrent is a little bit different on OpenBSD, so adapt accordingly Waiting on your comments. Thank you :-)
Created attachment 94329 [details] [review] patch 1/3: add support for BSD authentication
Created attachment 94330 [details] [review] patch 2/3: get_kinfo_proc(): add support for OpenBSD
Created attachment 94331 [details] [review] patch 3/3: get/setnetgrent is different on OpenBSD
Created attachment 94333 [details] [review] patch 1/3: add support for BSD authentication
Any comments about these patches?
Any chance I could have someone interested in these? Thanks.
So the reason patches are totally ignored it because of PolKit is deprecated and should not be used anymore or ...? If it's too much of a burden, get me commit access for 10 minutes and I can take care of these ;-)
Yeah, there's not much reviewer bandwith on PolicyKit, sorry. I may look at these for the next release though.
(In reply to Colin Walters from comment #8) > Yeah, there's not much reviewer bandwith on PolicyKit, sorry. I may look at > these for the next release though. That would be awesome, thanks Colin.
Created attachment 117176 [details] [review] add OpenBSD support Hi. This bring the OpenBSD patch up-to-date with the most recent polkit release. I hope we can move forward at some point... Thank you very much in advance.
Sorry about not responding earlier, I was not getting any bugmail for a time ☹ > +case "$host_os" in > + *openbsd*) > + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ > + #include <stddef.h> > + #include <netgroup.h> > + ]], [[int r = setnetgrent (NULL);]])], > + [AC_DEFINE([HAVE_SETNETGRENT_RETURN], 1, [Define to 1 if setnetgrent has > return value])]) > + ;; > + *) > + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ > + #include <stddef.h> > + #include <netdb.h> > + ]], [[int r = setnetgrent (NULL);]])], > + [AC_DEFINE([HAVE_SETNETGRENT_RETURN], 1, [Define to 1 if setnetgrent has > return value])]) > + ;; > +esac Can this use AC_CHECK_HEADERS([netgroup.h]) and an #ifdef inside the test code instead? (And similarly the *authority.c files should use HAVE_NETGROUP_H.) That would prevent the two versions getting out of sync and someone accidentally breaking the OpenBSD version. > + if (sysctl (name, namelen, p, &sz, NULL, 0) == -1) { > + perror("sysctl kern.proc.pid"); > + return FALSE; > + } (The perror() can corrupt errno, and the real error reporting happens in the caller so it seems redundant anyway. Generally the coding style would favor using GError directly in this function instead of passing errno to the caller, but FreeBSD has started this way. But either case, we probably try to redirect the bug reports to you so I don’t functions in #ifdefs as a review / acceptance blockers at all.)
> But either case, we probably try to redirect the bug reports to you so I don’t > functions in #ifdefs as a review / acceptance blockers at all.) …we will probably try…, …I don’t see functions”
(In reply to Miloslav Trmac from comment #11) > Sorry about not responding earlier, I was not getting any bugmail for a time No problem, I am happy someone is answering now :-) > Can this use AC_CHECK_HEADERS([netgroup.h]) and an #ifdef inside the test > code instead? (And similarly the *authority.c files should use > HAVE_NETGROUP_H.) That would prevent the two versions getting out of sync > and someone accidentally breaking the OpenBSD version. Right, hopefully this is taken care of in my new patch. > > > + if (sysctl (name, namelen, p, &sz, NULL, 0) == -1) { > > + perror("sysctl kern.proc.pid"); > > + return FALSE; > > + } > (The perror() can corrupt errno, and the real error reporting happens in the > caller so it seems redundant anyway. Generally the coding style would favor > using GError directly in this function instead of passing errno to the > caller, but FreeBSD has started this way. But either case, we probably try > to redirect the bug reports to you so I don’t functions in #ifdefs as a > review / acceptance blockers at all.) Yeah, I don't think the error was really useful there so I just dropped it. Thanks for the review!
Created attachment 117239 [details] [review] add OpenBSD support v3
Thanks, applied. I have also committed a minor cleanup to use HAVE_NETGROUP_H consistently everywhere.
(In reply to Miloslav Trmac from comment #15) > Thanks, applied. I have also committed a minor cleanup to use > HAVE_NETGROUP_H consistently everywhere. That's awesome. Thanks Miloslav :-)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.