Patches committed upstream.
Make gdm_login() / gdm_logout() static.
This commit is contained in:
parent
08b966b87e
commit
442d588c67
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.189 2014/01/30 16:58:58 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.190 2014/03/09 21:56:20 ajacoutot Exp $
|
||||
|
||||
# XXX configuring GDM from gnome-cc does not work
|
||||
|
||||
@ -8,7 +8,7 @@ COMMENT= GNOME display manager
|
||||
|
||||
GNOME_PROJECT= gdm
|
||||
GNOME_VERSION= 3.10.0.1
|
||||
REVISION= 13
|
||||
REVISION= 14
|
||||
|
||||
SHARED_LIBS += gdm 0.0 # 1.0
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
$OpenBSD: patch-daemon_Makefile_in,v 1.9 2013/09/27 10:16:55 ajacoutot Exp $
|
||||
$OpenBSD: patch-daemon_Makefile_in,v 1.10 2014/03/09 21:56:20 ajacoutot Exp $
|
||||
|
||||
undefined reference to `logwtmp'...
|
||||
From 2d025255ab783208af98d848cca7b5e1bb4e44ef Mon Sep 17 00:00:00 2001
|
||||
From: Ting-Wei Lan <lantw44@gmail.com>
|
||||
Date: Mon, 20 Jan 2014 10:15:35 +0000
|
||||
Subject: Fix build problem on FreeBSD
|
||||
|
||||
--- daemon/Makefile.in.orig Mon Sep 23 23:33:27 2013
|
||||
+++ daemon/Makefile.in Fri Sep 27 11:51:15 2013
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-daemon_gdm-session-record_c,v 1.3 2014/01/21 17:39:30 ajacoutot Exp $
|
||||
$OpenBSD: patch-daemon_gdm-session-record_c,v 1.4 2014/03/09 21:56:20 ajacoutot Exp $
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=722482
|
||||
|
||||
--- daemon/gdm-session-record.c.orig Wed Oct 16 15:59:56 2013
|
||||
+++ daemon/gdm-session-record.c Sat Jan 18 09:56:47 2014
|
||||
+++ daemon/gdm-session-record.c Fri Feb 21 11:04:16 2014
|
||||
@@ -33,6 +33,16 @@
|
||||
#include <utmp.h>
|
||||
#endif
|
||||
@ -21,11 +21,22 @@ https://bugzilla.gnome.org/show_bug.cgi?id=722482
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <glib/gstdio.h>
|
||||
@@ -196,6 +206,84 @@ record_set_line (UTMP *u,
|
||||
@@ -43,6 +53,9 @@
|
||||
#define GDM_BAD_SESSION_RECORDS_FILE "/var/log/btmp"
|
||||
#endif
|
||||
|
||||
+static void write_utmp_login_manually (struct utmp *ut);
|
||||
+static void write_utmp_logout_manually (char *);
|
||||
+
|
||||
#if !defined(GDM_NEW_SESSION_RECORDS_FILE)
|
||||
# if defined(WTMPX_FILE)
|
||||
# define GDM_NEW_SESSION_RECORDS_FILE WTMPX_FILE
|
||||
@@ -195,6 +208,84 @@ record_set_line (UTMP *u,
|
||||
g_debug ("using ut_line %.*s", (int) sizeof (u->ut_line), u->ut_line);
|
||||
}
|
||||
|
||||
void
|
||||
+gdm_login (struct utmp *ut)
|
||||
+static void
|
||||
+write_utmp_login_manually (struct utmp *ut)
|
||||
+{
|
||||
+#if defined(HAVE_GETTTYENT) && defined(HAVE_UTMP_H)
|
||||
+ UTMP ubuf;
|
||||
@ -71,8 +82,8 @@ https://bugzilla.gnome.org/show_bug.cgi?id=722482
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+gdm_logout (char *line)
|
||||
+static void
|
||||
+write_utmp_logout_manually (char *line)
|
||||
+{
|
||||
+#if defined(HAVE_GETTTYENT) && defined(HAVE_UTMP_H)
|
||||
+ int rval = 1;
|
||||
@ -102,11 +113,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=722482
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+void
|
||||
void
|
||||
gdm_session_record_login (GPid session_pid,
|
||||
const char *user_name,
|
||||
const char *host_name,
|
||||
@@ -261,8 +349,9 @@ gdm_session_record_login (GPid sessio
|
||||
@@ -261,8 +352,9 @@ gdm_session_record_login (GPid sessio
|
||||
g_debug ("Adding new utmp record");
|
||||
pututxline (&session_record);
|
||||
}
|
||||
@ -114,18 +124,18 @@ https://bugzilla.gnome.org/show_bug.cgi?id=722482
|
||||
- login (&session_record);
|
||||
+#else
|
||||
+ if (strcmp (session_record.ut_name, "(unknown)") != 0)
|
||||
+ gdm_login (&session_record);
|
||||
+ write_utmp_login_manually (&session_record);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -333,8 +422,8 @@ gdm_session_record_logout (GPid sessi
|
||||
@@ -333,8 +425,8 @@ gdm_session_record_logout (GPid sessi
|
||||
}
|
||||
|
||||
endutxent ();
|
||||
-#elif defined(HAVE_LOGOUT)
|
||||
- logout (session_record.ut_line);
|
||||
+#else
|
||||
+ gdm_logout (session_record.ut_line);
|
||||
+ write_utmp_logout_manually (session_record.ut_line);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
$OpenBSD: patch-daemon_gdm-session-record_h,v 1.1 2014/01/21 17:39:30 ajacoutot Exp $
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=722482
|
||||
|
||||
--- daemon/gdm-session-record.h.orig Tue Sep 17 23:33:48 2013
|
||||
+++ daemon/gdm-session-record.h Fri Jan 17 18:25:36 2014
|
||||
@@ -43,7 +43,10 @@ gdm_session_record_failed (GPid sessi
|
||||
const char *host_name,
|
||||
const char *x11_display_name,
|
||||
const char *display_device);
|
||||
-
|
||||
+void
|
||||
+gdm_login (struct utmp *ut);
|
||||
+void
|
||||
+gdm_logout (char *);
|
||||
|
||||
G_END_DECLS
|
||||
|
17
x11/gnome/gdm/patches/patch-daemon_gdm-session_h
Normal file
17
x11/gnome/gdm/patches/patch-daemon_gdm-session_h
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-daemon_gdm-session_h,v 1.1 2014/03/09 21:56:20 ajacoutot Exp $
|
||||
|
||||
From 2d025255ab783208af98d848cca7b5e1bb4e44ef Mon Sep 17 00:00:00 2001
|
||||
From: Ting-Wei Lan <lantw44@gmail.com>
|
||||
Date: Mon, 20 Jan 2014 10:15:35 +0000
|
||||
Subject: Fix build problem on FreeBSD
|
||||
|
||||
--- daemon/gdm-session.h.orig Mon Mar 3 09:06:14 2014
|
||||
+++ daemon/gdm-session.h Mon Mar 3 09:06:21 2014
|
||||
@@ -22,6 +22,7 @@
|
||||
#define __GDM_SESSION_H
|
||||
|
||||
#include <glib-object.h>
|
||||
+#include <sys/types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@ -1,6 +1,17 @@
|
||||
$OpenBSD: patch-daemon_gdm-xdmcp-display-factory_c,v 1.4 2012/10/10 12:34:35 ajacoutot Exp $
|
||||
--- daemon/gdm-xdmcp-display-factory.c.orig Thu Sep 6 20:33:20 2012
|
||||
+++ daemon/gdm-xdmcp-display-factory.c Wed Oct 10 15:55:48 2012
|
||||
$OpenBSD: patch-daemon_gdm-xdmcp-display-factory_c,v 1.5 2014/03/09 21:56:20 ajacoutot Exp $
|
||||
|
||||
From 2d025255ab783208af98d848cca7b5e1bb4e44ef Mon Sep 17 00:00:00 2001
|
||||
From: Ting-Wei Lan <lantw44@gmail.com>
|
||||
Date: Mon, 20 Jan 2014 10:15:35 +0000
|
||||
Subject: Fix build problem on FreeBSD
|
||||
|
||||
From 262e075827c4b9a7fad866bde43953b5760360b1 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@gnome.org>
|
||||
Date: Mon, 03 Mar 2014 08:16:52 +0000
|
||||
Subject: xdmcp: unbreak build on OpenBSD
|
||||
|
||||
--- daemon/gdm-xdmcp-display-factory.c.orig Tue Sep 17 23:33:48 2013
|
||||
+++ daemon/gdm-xdmcp-display-factory.c Mon Mar 3 09:12:17 2014
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <netdb.h>
|
||||
#include <arpa/inet.h>
|
||||
@ -9,14 +20,16 @@ $OpenBSD: patch-daemon_gdm-xdmcp-display-factory_c,v 1.4 2012/10/10 12:34:35 aja
|
||||
#ifdef HAVE_SYS_SOCKIO_H
|
||||
#include <sys/sockio.h>
|
||||
#endif
|
||||
@@ -376,12 +377,14 @@ ai_flags_str (struct addrinfo *ai)
|
||||
@@ -376,12 +377,16 @@ ai_flags_str (struct addrinfo *ai)
|
||||
if (ai->ai_flags & AI_NUMERICSERV) {
|
||||
g_string_append (str, "numserv ");
|
||||
}
|
||||
+#ifndef __OpenBSD__
|
||||
+#ifdef AI_V4MAPPEP
|
||||
if (ai->ai_flags & AI_V4MAPPED) {
|
||||
g_string_append (str, "v4mapped ");
|
||||
}
|
||||
+#endif
|
||||
+#ifdef AI_ALL
|
||||
if (ai->ai_flags & AI_ALL) {
|
||||
g_string_append (str, "all ");
|
||||
}
|
||||
@ -24,23 +37,21 @@ $OpenBSD: patch-daemon_gdm-xdmcp-display-factory_c,v 1.4 2012/10/10 12:34:35 aja
|
||||
}
|
||||
return g_string_free (str, FALSE);
|
||||
}
|
||||
@@ -1526,8 +1529,10 @@ create_address_from_request (ARRAY8 *req_addr,
|
||||
|
||||
@@ -1527,7 +1532,9 @@ create_address_from_request (ARRAY8 *req_addr,
|
||||
memset (&hints, 0, sizeof (hints));
|
||||
hints.ai_family = family;
|
||||
+#ifndef __OpenBSD__
|
||||
/* this should convert IPv4 address to IPv6 if needed */
|
||||
+#ifdef AI_V4MAPPED
|
||||
hints.ai_flags = AI_V4MAPPED;
|
||||
+#endif
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
|
||||
if ((gaierr = getaddrinfo (host, serv, &hints, &ai_list)) != 0) {
|
||||
@@ -2009,8 +2014,10 @@ on_hostname_selected (GdmXdmcpChooserDisplay *display,
|
||||
|
||||
@@ -2010,7 +2017,9 @@ on_hostname_selected (GdmXdmcpChooserDisplay *display,
|
||||
memset (&hints, 0, sizeof (hints));
|
||||
hints.ai_family = gdm_address_get_family_type (address);
|
||||
+#ifndef __OpenBSD__
|
||||
/* this should convert IPv4 address to IPv6 if needed */
|
||||
+#ifdef AI_V4MAPPED
|
||||
hints.ai_flags = AI_V4MAPPED;
|
||||
+#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user