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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Thu Mar 28 23:08:07 2013 UTC (21 months ago) by pacho
Branch: MAIN
Version bump for Gnome 3.8

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

1 pacho 1.1 From 75c944a788beb749a28086025876406b7864baf5 Mon Sep 17 00:00:00 2001
2     From: Sobhan Mohammadpour <sobhanmohammadpour1@yahoo.fr>
3     Date: Tue, 19 Feb 2013 16:40:37 +0330
4     Subject: [PATCH] gnome-control-center-3.7.4-optional-kerberos
5     originaly by Priit Laes <pleas@plaes.org>
6     Crappy patch to allow disabling kerberos requirement
7     https://bugzilla.gnome.org/show_bug.cgi?id=686840
8     ---
9     panels/user-accounts/um-account-dialog.c | 30 ++++++++++++++++++++++++++----
10     panels/user-accounts/um-realm-manager.c | 2 ++
11     2 files changed, 28 insertions(+), 4 deletions(-)
12    
13     diff --git a/panels/user-accounts/um-account-dialog.c b/panels/user-accounts/um-account-dialog.c
14     index 88dff99..5f50087 100644
15     --- a/panels/user-accounts/um-account-dialog.c
16     +++ b/panels/user-accounts/um-account-dialog.c
17     @@ -27,9 +27,12 @@
18     #include <act/act.h>
19    
20     #include "um-account-dialog.h"
21     -#include "um-realm-manager.h"
22     #include "um-utils.h"
23    
24     +#ifdef KERBEROS
25     +#include "um-realm-manager.h"
26     +#endif
27     +
28     typedef enum {
29     UM_LOCAL,
30     UM_ENTERPRISE,
31     @@ -41,6 +44,7 @@ static void mode_change (UmAccountDialog *self,
32    
33     static void dialog_validate (UmAccountDialog *self);
34    
35     +#ifdef KERBEROS
36     static void on_join_login (GObject *source,
37     GAsyncResult *result,
38     gpointer user_data);
39     @@ -48,6 +52,7 @@ static void on_join_login (GObject *source,
40     static void on_realm_joined (GObject *source,
41     GAsyncResult *result,
42     gpointer user_data);
43     +#endif
44    
45     #define UM_ACCOUNT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UM_TYPE_ACCOUNT_DIALOG, \
46     UmAccountDialogClass))
47     @@ -83,6 +88,7 @@ struct _UmAccountDialog {
48     gboolean enterprise_domain_chosen;
49     GtkEntry *enterprise_login;
50     GtkEntry *enterprise_password;
51     +#ifdef KERBEROS
52     UmRealmManager *realm_manager;
53     UmRealmObject *selected_realm;
54    
55     @@ -92,6 +98,7 @@ struct _UmAccountDialog {
56     GtkEntry *join_name;
57     GtkEntry *join_password;
58     gboolean join_prompted;
59     +#endif
60     };
61    
62     struct _UmAccountDialogClass {
63     @@ -300,6 +307,7 @@ local_prepare (UmAccountDialog *self)
64     gtk_combo_box_set_active (GTK_COMBO_BOX (self->local_account_type), 0);
65     }
66    
67     +#ifdef KERBEROS
68     static gboolean
69     enterprise_validate (UmAccountDialog *self)
70     {
71     @@ -504,7 +512,6 @@ on_join_response (GtkDialog *dialog,
72     on_join_login,
73     g_object_ref (self));
74     }
75     -
76     static void
77     join_show_prompt (UmAccountDialog *self,
78     GError *error)
79     @@ -892,6 +899,7 @@ enterprise_prepare (UmAccountDialog *self)
80     gtk_entry_set_text (GTK_ENTRY (self->enterprise_login), "");
81     gtk_entry_set_text (GTK_ENTRY (self->enterprise_password), "");
82     }
83     +#endif
84    
85     static void
86     dialog_validate (UmAccountDialog *self)
87     @@ -902,9 +910,11 @@ dialog_validate (UmAccountDialog *self)
88     case UM_LOCAL:
89     valid = local_validate (self);
90     break;
91     +#ifdef KERBEROS
92     case UM_ENTERPRISE:
93     valid = enterprise_validate (self);
94     break;
95     +#endif
96     default:
97     valid = FALSE;
98     break;
99     @@ -990,12 +1000,14 @@ on_local_toggle (GtkToggleButton *toggle,
100     mode_toggled (UM_ACCOUNT_DIALOG (user_data), toggle, UM_LOCAL);
101     }
102    
103     +#ifdef KERBEROS
104     static void
105     on_enterprise_toggle (GtkToggleButton *toggle,
106     gpointer user_data)
107     {
108     mode_toggled (UM_ACCOUNT_DIALOG (user_data), toggle, UM_ENTERPRISE);
109     }
110     +#endif
111    
112     static void
113     mode_init (UmAccountDialog *self,
114     @@ -1007,15 +1019,18 @@ mode_init (UmAccountDialog *self,
115    
116     widget = (GtkWidget *) gtk_builder_get_object (builder, "local-area");
117     self->mode_areas[UM_LOCAL] = widget;
118     +#ifdef KERBEROS
119     widget = (GtkWidget *) gtk_builder_get_object (builder, "enterprise-area");
120     self->mode_areas[UM_ENTERPRISE] = widget;
121     -
122     +#endif
123     widget = (GtkWidget *) gtk_builder_get_object (builder, "local-button");
124     g_signal_connect (widget, "toggled", G_CALLBACK (on_local_toggle), self);
125     self->mode_buttons[UM_LOCAL] = widget;
126     +#ifdef KERBEROS
127     widget = (GtkWidget *) gtk_builder_get_object (builder, "enterprise-button");
128     g_signal_connect (widget, "toggled", G_CALLBACK (on_enterprise_toggle), self);
129     self->mode_buttons[UM_ENTERPRISE] = widget;
130     +#endif
131     }
132    
133     static void
134     @@ -1073,8 +1088,10 @@ um_account_dialog_init (UmAccountDialog *self)
135     self->container_widget = widget;
136    
137     local_init (self, builder);
138     +#ifdef KERBEROS
139     enterprise_init (self, builder);
140     join_init (self, builder);
141     +#endif
142     mode_init (self, builder);
143    
144     g_object_unref (builder);
145     @@ -1092,9 +1109,11 @@ um_account_dialog_response (GtkDialog *dialog,
146     case UM_LOCAL:
147     local_create_user (self);
148     break;
149     +#ifdef KERBEROS
150     case UM_ENTERPRISE:
151     enterprise_add_user (self);
152     break;
153     +#endif
154     default:
155     g_assert_not_reached ();
156     }
157     @@ -1115,6 +1134,7 @@ um_account_dialog_dispose (GObject *obj)
158     if (self->cancellable)
159     g_cancellable_cancel (self->cancellable);
160    
161     +#ifdef KERBEROS
162     if (self->realmd_watch)
163     g_bus_unwatch_name (self->realmd_watch);
164     self->realmd_watch = 0;
165     @@ -1126,7 +1146,7 @@ um_account_dialog_dispose (GObject *obj)
166     g_object_unref (self->realm_manager);
167     self->realm_manager = NULL;
168     }
169     -
170     +#endif
171     G_OBJECT_CLASS (um_account_dialog_parent_class)->dispose (obj);
172     }
173    
174     @@ -1179,7 +1199,9 @@ um_account_dialog_show (UmAccountDialog *self,
175     self->cancellable = g_cancellable_new ();
176    
177     local_prepare (self);
178     +#ifdef KERBEROS
179     enterprise_prepare (self);
180     +#endif
181     mode_change (self, UM_LOCAL);
182     dialog_validate (self);
183    
184     diff --git a/panels/user-accounts/um-realm-manager.c b/panels/user-accounts/um-realm-manager.c
185     index 59d57b3..d3390f4 100644
186     --- a/panels/user-accounts/um-realm-manager.c
187     +++ b/panels/user-accounts/um-realm-manager.c
188     @@ -21,6 +21,7 @@
189    
190     #include "config.h"
191    
192     +#ifdef KERBEROS
193     #include "um-realm-manager.h"
194    
195     #include <krb5/krb5.h>
196     @@ -899,3 +900,4 @@ um_realm_login_finish (GAsyncResult *result,
197    
198     return TRUE;
199     }
200     +#endif
201     --
202     1.8.1.2

  ViewVC Help
Powered by ViewVC 1.1.20