/[gentoo-x86]/gnome-base/gnome-control-center/files/gnome-control-center-3.8.4-optional-kerberos.patch
Gentoo

Contents of /gnome-base/gnome-control-center/files/gnome-control-center-3.8.4-optional-kerberos.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Nov 10 08:59:08 2013 UTC (9 months, 3 weeks ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Version bump, drop old

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)

1 From fd99663ac20c7c09517a316197f16fc1e2564d1b Mon Sep 17 00:00:00 2001
2 From: Alexandre Rostovtsev <tetromino@gentoo.org>
3 Date: Sun, 28 Jul 2013 14:23:39 -0400
4 Subject: [PATCH] Make kerberos optional
5
6 https://bugzilla.gnome.org/show_bug.cgi?id=686840
7 ---
8 configure.ac | 24 +++++++++++++++---------
9 panels/user-accounts/um-realm-manager.c | 9 +++++++++
10 2 files changed, 24 insertions(+), 9 deletions(-)
11
12 diff --git a/configure.ac b/configure.ac
13 index 0c0098c..7d09daf 100644
14 --- a/configure.ac
15 +++ b/configure.ac
16 @@ -312,16 +312,22 @@ esac
17 AM_CONDITIONAL(BUILD_WACOM, [test x"$have_wacom" = x"yes"])
18
19 # Kerberos kerberos support
20 -AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
21 -if test "$KRB5_CONFIG" = "no"; then
22 - AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
23 -fi
24 -
25 -AC_MSG_CHECKING(for krb5 libraries and flags)
26 -KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
27 -KRB5_LIBS="`$KRB5_CONFIG --libs`"
28 -AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
29 +AC_ARG_ENABLE([kerberos],
30 + AS_HELP_STRING([--disable-kerberos], [disable kerberos support (default: enabled)]),,
31 + [enable_kerberos=yes])
32 +
33 +if test x"$enable_kerberos" != x"no" ; then
34 + AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
35 + if test "$KRB5_CONFIG" = "no"; then
36 + AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
37 + fi
38
39 + AC_MSG_CHECKING(for krb5 libraries and flags)
40 + KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
41 + KRB5_LIBS="`$KRB5_CONFIG --libs`"
42 + AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
43 + AC_DEFINE(HAVE_KERBEROS, 1, [defined if krb5 is available])
44 +fi
45 AC_SUBST(KRB5_CFLAGS)
46 AC_SUBST(KRB5_LIBS)
47
48 diff --git a/panels/user-accounts/um-realm-manager.c b/panels/user-accounts/um-realm-manager.c
49 index 1fd41ad..ce0988e 100644
50 --- a/panels/user-accounts/um-realm-manager.c
51 +++ b/panels/user-accounts/um-realm-manager.c
52 @@ -23,7 +23,9 @@
53
54 #include "um-realm-manager.h"
55
56 +#ifdef HAVE_KERBEROS
57 #include <krb5/krb5.h>
58 +#endif
59
60 #include <glib.h>
61 #include <glib/gi18n.h>
62 @@ -697,6 +699,7 @@ login_closure_free (gpointer data)
63 g_slice_free (LoginClosure, login);
64 }
65
66 +#ifdef HAVE_KERBEROS
67 static krb5_error_code
68 login_perform_kinit (krb5_context k5,
69 const gchar *realm,
70 @@ -760,12 +763,14 @@ login_perform_kinit (krb5_context k5,
71
72 return code;
73 }
74 +#endif /* HAVE_KERBEROS */
75
76 static void
77 kinit_thread_func (GSimpleAsyncResult *async,
78 GObject *object,
79 GCancellable *cancellable)
80 {
81 +#ifdef HAVE_KERBEROS
82 LoginClosure *login = g_simple_async_result_get_op_res_gpointer (async);
83 krb5_context k5 = NULL;
84 krb5_error_code code;
85 @@ -843,6 +848,10 @@ kinit_thread_func (GSimpleAsyncResult *async,
86
87 if (k5)
88 krb5_free_context (k5);
89 +#else /* HAVE_KERBEROS */
90 + g_simple_async_result_set_error (async, UM_REALM_ERROR, UM_REALM_ERROR_GENERIC,
91 + _("gnome-control-center was built without kerberos support"));
92 +#endif
93 }
94
95 void
96 --
97 1.8.3.2

  ViewVC Help
Powered by ViewVC 1.1.20