[Bug 202269] [patch] sysutils/consolekit update to 1.0.0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jan 24 18:06:19 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202269

jesper at schmitz.computer changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jesper at schmitz.computer

--- Comment #5 from jesper at schmitz.computer ---
(In reply to Koop Mast from comment #3)
I think I can shed some light on the issue of inactive X11 sessions launched
with ck-launch-session (e.g not a display manager like x11/slim which uses
libck-connector.so directly (no pam) I have not looked carefully into the
pam_ck_connector.so situation.

In src/ck-sysdeps-unix.c only the HAVE_GETPEEREID is compiled. e.g no pid
returned.
I also found that the "v" is missing in the ttyv device file names: 

+++ tools/ck-get-x11-display-device.c
@@ -140,6 +140,9 @@ get_tty_for_display (Display *xdisplay)

 #if defined(__NetBSD__)
         display = g_strdup_printf ("/dev/ttyE%ld", vt - 1);
+#elif defined(__FreeBSD__)
+        display = g_strdup_printf ("/dev/ttyv%ld", vt - 1);
+
 #else
         display = g_strdup_printf ("/dev/tty%ld", vt);
 #endif


after cc -E the function becomes:
ck_get_socket_peer_credentials (int socket_fd,
                                  pid_t *pid,
                                  uid_t *uid,
                                  GError **error)
{
        gboolean ret;
        uid_t uid_read;
        pid_t pid_read;

        pid_read = -1;
        uid_read = -1;
        ret = (0);
        gid_t dummy;

        if (getpeereid (socket_fd, &uid_read, &dummy) == 0) {
                ret = (!(0));
        } else {
                g_log (((gchar*) 0), G_LOG_LEVEL_WARNING, "Failed to
getpeereid() credentials: %s\n", g_strerror ((* __error())));

        }




        if (pid != ((void *)0)) {
                *pid = pid_read;
        }

        if (uid != ((void *)0)) {
                *uid = uid_read;
        }

        return ret;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-gnome mailing list