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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Dec 25 22:01:01 2012 UTC (19 months, 3 weeks ago) by eva
Branch: MAIN
Version bump for Gnome 3.6. Switch to EAPI=5. Clean up old revisions.

(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key C6085806)

1 From 88e3f2146b0740161dc3b2095dcf05c538b67e36 Mon Sep 17 00:00:00 2001
2 From: Priit Laes <plaes@plaes.org>
3 Date: Mon, 10 Sep 2012 18:49:43 +0300
4 Subject: [PATCH] Crappy patch to allow disabling kerberos requirement
5
6 https://bugzilla.gnome.org/show_bug.cgi?id=686840
7 ---
8 configure.ac | 22 ++++++++++++++--------
9 panels/user-accounts/um-account-dialog.c | 30 ++++++++++++++++++++++++++----
10 panels/user-accounts/um-realm-manager.c | 2 ++
11 3 files changed, 42 insertions(+), 12 deletions(-)
12
13 diff --git a/configure.ac b/configure.ac
14 index fa4b12f..c1e188f 100644
15 --- a/configure.ac
16 +++ b/configure.ac
17 @@ -321,16 +321,22 @@ AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes
18 ISO_CODES=iso-codes
19
20 # Kerberos kerberos support
21 -AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
22 -if test "$KRB5_CONFIG" = "no"; then
23 - AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
24 -fi
25
26 -AC_MSG_CHECKING(for krb5 libraries and flags)
27 -KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
28 -KRB5_LIBS="`$KRB5_CONFIG --libs`"
29 -AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
30 +AC_ARG_ENABLE([kerberos],
31 + AS_HELP_STRING([--disable-kerberos], [disable kerberos support (default: enabled)]),,
32 + [enable_kerberos=yes])
33 +
34 +if test x"$enable_kerberos" != x"no" ; then
35 + AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
36 + if test "$KRB5_CONFIG" = "no"; then
37 + AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
38 + fi
39
40 + AC_MSG_CHECKING(for krb5 libraries and flags)
41 + KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
42 + KRB5_LIBS="`$KRB5_CONFIG --libs`"
43 + AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
44 +fi
45 AC_SUBST(KRB5_CFLAGS)
46 AC_SUBST(KRB5_LIBS)
47
48 diff --git a/panels/user-accounts/um-account-dialog.c b/panels/user-accounts/um-account-dialog.c
49 index 9dbda5c..6b82980 100644
50 --- a/panels/user-accounts/um-account-dialog.c
51 +++ b/panels/user-accounts/um-account-dialog.c
52 @@ -26,10 +26,13 @@
53 #include <gtk/gtk.h>
54
55 #include "um-account-dialog.h"
56 -#include "um-realm-manager.h"
57 #include "um-user-manager.h"
58 #include "um-utils.h"
59
60 +#ifdef KERBEROS
61 +#include "um-realm-manager.h"
62 +#endif
63 +
64 typedef enum {
65 UM_LOCAL,
66 UM_ENTERPRISE,
67 @@ -41,6 +44,7 @@ static void mode_change (UmAccountDialog *self,
68
69 static void dialog_validate (UmAccountDialog *self);
70
71 +#ifdef KERBEROS
72 static void on_join_login (GObject *source,
73 GAsyncResult *result,
74 gpointer user_data);
75 @@ -48,6 +52,7 @@ static void on_join_login (GObject *source,
76 static void on_realm_joined (GObject *source,
77 GAsyncResult *result,
78 gpointer user_data);
79 +#endif
80
81 #define UM_ACCOUNT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UM_TYPE_ACCOUNT_DIALOG, \
82 UmAccountDialogClass))
83 @@ -83,6 +88,7 @@ struct _UmAccountDialog {
84 gboolean enterprise_domain_chosen;
85 GtkEntry *enterprise_login;
86 GtkEntry *enterprise_password;
87 +#ifdef KERBEROS
88 UmRealmManager *realm_manager;
89 UmRealmObject *selected_realm;
90
91 @@ -92,6 +98,7 @@ struct _UmAccountDialog {
92 GtkEntry *join_name;
93 GtkEntry *join_password;
94 gboolean join_prompted;
95 +#endif
96 };
97
98 struct _UmAccountDialogClass {
99 @@ -292,6 +299,7 @@ local_prepare (UmAccountDialog *self)
100 gtk_combo_box_set_active (GTK_COMBO_BOX (self->local_account_type), 0);
101 }
102
103 +#ifdef KERBEROS
104 static gboolean
105 enterprise_validate (UmAccountDialog *self)
106 {
107 @@ -461,7 +469,6 @@ on_join_response (GtkDialog *dialog,
108 on_join_login,
109 g_object_ref (self));
110 }
111 -
112 static void
113 join_show_prompt (UmAccountDialog *self,
114 GError *error)
115 @@ -839,6 +846,7 @@ enterprise_prepare (UmAccountDialog *self)
116 gtk_entry_set_text (GTK_ENTRY (self->enterprise_login), "");
117 gtk_entry_set_text (GTK_ENTRY (self->enterprise_password), "");
118 }
119 +#endif
120
121 static void
122 dialog_validate (UmAccountDialog *self)
123 @@ -849,9 +857,11 @@ dialog_validate (UmAccountDialog *self)
124 case UM_LOCAL:
125 valid = local_validate (self);
126 break;
127 +#ifdef KERBEROS
128 case UM_ENTERPRISE:
129 valid = enterprise_validate (self);
130 break;
131 +#endif
132 default:
133 valid = FALSE;
134 break;
135 @@ -937,12 +947,14 @@ on_local_toggle (GtkToggleButton *toggle,
136 mode_toggled (UM_ACCOUNT_DIALOG (user_data), toggle, UM_LOCAL);
137 }
138
139 +#ifdef KERBEROS
140 static void
141 on_enterprise_toggle (GtkToggleButton *toggle,
142 gpointer user_data)
143 {
144 mode_toggled (UM_ACCOUNT_DIALOG (user_data), toggle, UM_ENTERPRISE);
145 }
146 +#endif
147
148 static void
149 mode_init (UmAccountDialog *self,
150 @@ -954,15 +966,18 @@ mode_init (UmAccountDialog *self,
151
152 widget = (GtkWidget *) gtk_builder_get_object (builder, "local-area");
153 self->mode_areas[UM_LOCAL] = widget;
154 +#ifdef KERBEROS
155 widget = (GtkWidget *) gtk_builder_get_object (builder, "enterprise-area");
156 self->mode_areas[UM_ENTERPRISE] = widget;
157 -
158 +#endif
159 widget = (GtkWidget *) gtk_builder_get_object (builder, "local-button");
160 g_signal_connect (widget, "toggled", G_CALLBACK (on_local_toggle), self);
161 self->mode_buttons[UM_LOCAL] = widget;
162 +#ifdef KERBEROS
163 widget = (GtkWidget *) gtk_builder_get_object (builder, "enterprise-button");
164 g_signal_connect (widget, "toggled", G_CALLBACK (on_enterprise_toggle), self);
165 self->mode_buttons[UM_ENTERPRISE] = widget;
166 +#endif
167 }
168
169 static void
170 @@ -1022,8 +1037,10 @@ um_account_dialog_init (UmAccountDialog *self)
171 self->container_widget = widget;
172
173 local_init (self, builder);
174 +#ifdef KERBEROS
175 enterprise_init (self, builder);
176 join_init (self, builder);
177 +#endif
178 mode_init (self, builder);
179
180 g_object_unref (builder);
181 @@ -1041,9 +1058,11 @@ um_account_dialog_response (GtkDialog *dialog,
182 case UM_LOCAL:
183 local_create_user (self);
184 break;
185 +#ifdef KERBEROS
186 case UM_ENTERPRISE:
187 enterprise_add_user (self);
188 break;
189 +#endif
190 default:
191 g_assert_not_reached ();
192 }
193 @@ -1064,6 +1083,7 @@ um_account_dialog_dispose (GObject *obj)
194 if (self->cancellable)
195 g_cancellable_cancel (self->cancellable);
196
197 +#ifdef KERBEROS
198 if (self->realmd_watch)
199 g_bus_unwatch_name (self->realmd_watch);
200 self->realmd_watch = 0;
201 @@ -1075,7 +1095,7 @@ um_account_dialog_dispose (GObject *obj)
202 g_object_unref (self->realm_manager);
203 self->realm_manager = NULL;
204 }
205 -
206 +#endif
207 G_OBJECT_CLASS (um_account_dialog_parent_class)->dispose (obj);
208 }
209
210 @@ -1128,7 +1148,9 @@ um_account_dialog_show (UmAccountDialog *self,
211 self->cancellable = g_cancellable_new ();
212
213 local_prepare (self);
214 +#ifdef KERBEROS
215 enterprise_prepare (self);
216 +#endif
217 mode_change (self, UM_LOCAL);
218 dialog_validate (self);
219
220 diff --git a/panels/user-accounts/um-realm-manager.c b/panels/user-accounts/um-realm-manager.c
221 index 301c905..25c055c 100644
222 --- a/panels/user-accounts/um-realm-manager.c
223 +++ b/panels/user-accounts/um-realm-manager.c
224 @@ -22,6 +22,7 @@
225
226 #include "config.h"
227
228 +#ifdef KERBEROS
229 #include "um-realm-manager.h"
230
231 #include <krb5/krb5.h>
232 @@ -826,3 +827,4 @@ um_realm_login_finish (GAsyncResult *result,
233
234 return TRUE;
235 }
236 +#endif
237 --
238 1.7.12

  ViewVC Help
Powered by ViewVC 1.1.20