chiark / gitweb /
turn kdbus support into a runtime option
[elogind.git] / src / login / pam_elogind.c
index b0bc47130d0a862e23692a658892ea7ea19fbf3e..9554ce6067c5fc1eccaf15bd0f3a5791d10fcf70 100644 (file)
@@ -40,6 +40,9 @@
 #include "socket-util.h"
 #include "fileio.h"
 #include "bus-error.h"
+#include "formats-util.h"
+#include "terminal-util.h"
+#include "hostname-util.h"
 
 static int parse_argv(
                 pam_handle_t *handle,
@@ -174,7 +177,6 @@ static int export_legacy_dbus_address(
                 uid_t uid,
                 const char *runtime) {
 
-#ifdef ENABLE_KDBUS
         _cleanup_free_ char *s = NULL;
         int r;
 
@@ -192,7 +194,7 @@ static int export_legacy_dbus_address(
                 pam_syslog(handle, LOG_ERR, "Failed to set bus variable.");
                 return r;
         }
-#endif
+
         return PAM_SUCCESS;
 }
 
@@ -334,7 +336,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
 
         /* If this fails vtnr will be 0, that's intended */
         if (!isempty(cvtnr))
-                safe_atou32(cvtnr, &vtnr);
+                (void) safe_atou32(cvtnr, &vtnr);
 
         if (!isempty(display) && !vtnr) {
                 if (isempty(seat))