-
Notifications
You must be signed in to change notification settings - Fork 273
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
Support elogind as logind alternative #787
base: master
Are you sure you want to change the base?
Conversation
Can be enabled with --enable-logind=elogind logind from systemd is still the default
You can find the elogind project here: https://github.com/elogind/elogind It's a drop-in replacement for systemd-logind as it's based on the systemd sources. |
Basically the patch is ok, but I expect that Linux-PAM will use more systemd functions in the future, even if I don't have anything concrete in mind at the moment. That's why I would prefer SYSTEMD_LIBS and EGLOGIND_LIBS to be two independent variables from the beginning, so that we don't have to separate them later again. @ldv-alt what do you think? |
AS_IF([test "$WITH_LOGIND" != "no"], [ | ||
AS_CASE(["$enableval"], [elogind], [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to use AS_CASE(["$WITH_LOGIND"], ...)
instead of AS_IF(...)
and AS_CASE(["$enableval"], ...)
?
AS_CASE(["$enableval"], [elogind], [ | ||
PKG_CHECK_MODULES([LOGIND], [libelogind >= 255], [LOGIND_CFLAGS="-DUSE_LOGIND=1 $LOGIND_CFLAGS"]) | ||
], [ | ||
PKG_CHECK_MODULES([LOGIND], [libsystemd >= 254], [LOGIND_CFLAGS="-DUSE_LOGIND=1 $LOGIND_CFLAGS"], [AS_IF([test "$WITH_LOGIND" != "check"], [AC_MSG_ERROR([Cannot find libsystemd])])]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using AS_CASE
, it would be more readable to handle each case separately rather than merging yes
and check
cases.
We could have SYSTEMD_* and ELOGIND_* variables initialized in configure.ac, and LOGIND_* variables based on them that are AC_SUBST'ed and would currently be used in Makefile.am files. This way we could make SYSTEMD_* variables AC_SUBST'ed when needed. |
libelogind.so is a drop-in replacement for libsystemd.so If you need any public function that is currently stubbed, we might add it. However, why would PAM use (any) systemd (functions), as systemd-logind uses PAM, and has several PAM modules. One of them, pam_systemd, is distributed as pam_elogind by us. |
If PAM would not use systemd functions, there would be no need for you to add elogind support. |
Can be enabled with --enable-logind=elogind
logind from systemd is still the default