Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 250946
Collapse All | Expand All

(-)a/src/nm-vpnc-service.c (+3 lines)
Lines 58-63 Link Here
58
	/* Ignored option for internal use */
58
	/* Ignored option for internal use */
59
	{ NM_VPNC_KEY_SECRET_TYPE,           G_TYPE_NONE, 0, 0 },
59
	{ NM_VPNC_KEY_SECRET_TYPE,           G_TYPE_NONE, 0, 0 },
60
	{ NM_VPNC_KEY_XAUTH_PASSWORD_TYPE,   G_TYPE_NONE, 0, 0 },
60
	{ NM_VPNC_KEY_XAUTH_PASSWORD_TYPE,   G_TYPE_NONE, 0, 0 },
61
 	/* Hybrid auth */
62
 	{ NM_VPNC_KEY_AUTHMODE,              G_TYPE_STRING, 0, 0 },
63
 	{ NM_VPNC_KEY_CA_FILE,               G_TYPE_STRING, 0, 0 },
61
	/* Legacy options that are ignored */
64
	/* Legacy options that are ignored */
62
	{ LEGACY_NAT_KEEPALIVE,              G_TYPE_STRING, 0, 0 },
65
	{ LEGACY_NAT_KEEPALIVE,              G_TYPE_STRING, 0, 0 },
63
	{ NULL,                              G_TYPE_NONE, 0, 0 }
66
	{ NULL,                              G_TYPE_NONE, 0, 0 }
(-)a/properties/nm-vpnc-dialog.glade (-82 / +129 lines)
Lines 40-98 Link Here
40
                      <placeholder/>
40
                      <placeholder/>
41
                    </child>
41
                    </child>
42
                    <child>
42
                    <child>
43
                      <widget class="GtkCheckButton" id="show_passwords_checkbutton">
43
                      <widget class="GtkEntry" id="user_password_entry">
44
                        <property name="visible">True</property>
44
                        <property name="visible">True</property>
45
                        <property name="can_focus">True</property>
45
                        <property name="can_focus">True</property>
46
                        <property name="label" translatable="yes">Show passwords</property>
46
                        <property name="visibility">False</property>
47
                        <property name="response_id">0</property>
48
                        <property name="draw_indicator">True</property>
49
                      </widget>
47
                      </widget>
50
                      <packing>
48
                      <packing>
51
                        <property name="left_attach">1</property>
49
                        <property name="left_attach">1</property>
52
                        <property name="right_attach">2</property>
50
                        <property name="right_attach">2</property>
53
                        <property name="top_attach">4</property>
51
                        <property name="top_attach">2</property>
54
                        <property name="bottom_attach">5</property>
52
                        <property name="bottom_attach">3</property>
53
                        <property name="y_options"></property>
55
                      </packing>
54
                      </packing>
56
                    </child>
55
                    </child>
57
                    <child>
56
                    <child>
58
                      <widget class="GtkEntry" id="group_password_entry">
57
                      <widget class="GtkLabel" id="label3">
59
                        <property name="visible">True</property>
58
                        <property name="visible">True</property>
60
                        <property name="can_focus">True</property>
59
                        <property name="xalign">0</property>
61
                        <property name="visibility">False</property>
60
                        <property name="label" translatable="yes">_User password:</property>
61
                        <property name="use_underline">True</property>
62
                        <property name="mnemonic_widget">group_entry</property>
62
                      </widget>
63
                      </widget>
63
                      <packing>
64
                      <packing>
64
                        <property name="left_attach">1</property>
65
                        <property name="top_attach">2</property>
65
                        <property name="right_attach">2</property>
66
                        <property name="bottom_attach">3</property>
66
                        <property name="top_attach">3</property>
67
                        <property name="x_options">GTK_FILL</property>
67
                        <property name="bottom_attach">4</property>
68
                        <property name="y_options"></property>
68
                        <property name="y_options"></property>
69
                      </packing>
69
                      </packing>
70
                    </child>
70
                    </child>
71
                    <child>
71
                    <child>
72
                      <widget class="GtkLabel" id="label4">
72
                      <widget class="GtkEntry" id="group_entry">
73
                        <property name="visible">True</property>
73
                        <property name="visible">True</property>
74
                        <property name="xalign">0</property>
74
                        <property name="can_focus">True</property>
75
                        <property name="label" translatable="yes">Gro_up password:</property>
76
                        <property name="use_underline">True</property>
77
                        <property name="mnemonic_widget">group_entry</property>
78
                      </widget>
75
                      </widget>
79
                      <packing>
76
                      <packing>
80
                        <property name="top_attach">3</property>
77
                        <property name="left_attach">1</property>
81
                        <property name="bottom_attach">4</property>
78
                        <property name="right_attach">2</property>
82
                        <property name="x_options">GTK_FILL</property>
79
                        <property name="top_attach">1</property>
80
                        <property name="bottom_attach">2</property>
83
                        <property name="y_options"></property>
81
                        <property name="y_options"></property>
84
                      </packing>
82
                      </packing>
85
                    </child>
83
                    </child>
86
                    <child>
84
                    <child>
87
                      <widget class="GtkLabel" id="label23">
85
                      <widget class="GtkEntry" id="gateway_entry">
88
                        <property name="visible">True</property>
86
                        <property name="visible">True</property>
89
                        <property name="xalign">0</property>
87
                        <property name="can_focus">True</property>
90
                        <property name="label" translatable="yes">_Gateway:</property>
91
                        <property name="use_underline">True</property>
92
                        <property name="mnemonic_widget">gateway_entry</property>
93
                      </widget>
88
                      </widget>
94
                      <packing>
89
                      <packing>
95
                        <property name="x_options">GTK_FILL</property>
90
                        <property name="left_attach">1</property>
91
                        <property name="right_attach">2</property>
96
                        <property name="y_options"></property>
92
                        <property name="y_options"></property>
97
                      </packing>
93
                      </packing>
98
                    </child>
94
                    </child>
Lines 112-167 Link Here
112
                      </packing>
108
                      </packing>
113
                    </child>
109
                    </child>
114
                    <child>
110
                    <child>
115
                      <widget class="GtkEntry" id="gateway_entry">
111
                      <widget class="GtkLabel" id="label23">
116
                        <property name="visible">True</property>
112
                        <property name="visible">True</property>
117
                        <property name="can_focus">True</property>
113
                        <property name="xalign">0</property>
114
                        <property name="label" translatable="yes">_Gateway:</property>
115
                        <property name="use_underline">True</property>
116
                        <property name="mnemonic_widget">gateway_entry</property>
118
                      </widget>
117
                      </widget>
119
                      <packing>
118
                      <packing>
120
                        <property name="left_attach">1</property>
119
                        <property name="x_options">GTK_FILL</property>
121
                        <property name="right_attach">2</property>
122
                        <property name="y_options"></property>
120
                        <property name="y_options"></property>
123
                      </packing>
121
                      </packing>
124
                    </child>
122
                    </child>
125
                    <child>
123
                    <child>
126
                      <widget class="GtkEntry" id="group_entry">
124
                      <widget class="GtkLabel" id="label4">
127
                        <property name="visible">True</property>
125
                        <property name="visible">True</property>
128
                        <property name="can_focus">True</property>
126
                        <property name="xalign">0</property>
127
                        <property name="label" translatable="yes">Gro_up password:</property>
128
                        <property name="use_underline">True</property>
129
                        <property name="mnemonic_widget">group_entry</property>
129
                      </widget>
130
                      </widget>
130
                      <packing>
131
                      <packing>
131
                        <property name="left_attach">1</property>
132
                        <property name="top_attach">3</property>
132
                        <property name="right_attach">2</property>
133
                        <property name="bottom_attach">4</property>
133
                        <property name="top_attach">1</property>
134
                        <property name="x_options">GTK_FILL</property>
134
                        <property name="bottom_attach">2</property>
135
                        <property name="y_options"></property>
135
                        <property name="y_options"></property>
136
                      </packing>
136
                      </packing>
137
                    </child>
137
                    </child>
138
                    <child>
138
                    <child>
139
                      <widget class="GtkLabel" id="label3">
139
                      <widget class="GtkEntry" id="group_password_entry">
140
                        <property name="visible">True</property>
140
                        <property name="visible">True</property>
141
                        <property name="xalign">0</property>
141
                        <property name="can_focus">True</property>
142
                        <property name="label" translatable="yes">_User password:</property>
142
                        <property name="visibility">False</property>
143
                        <property name="use_underline">True</property>
144
                        <property name="mnemonic_widget">group_entry</property>
145
                      </widget>
143
                      </widget>
146
                      <packing>
144
                      <packing>
147
                        <property name="top_attach">2</property>
145
                        <property name="left_attach">1</property>
148
                        <property name="bottom_attach">3</property>
146
                        <property name="right_attach">2</property>
149
                        <property name="x_options">GTK_FILL</property>
147
                        <property name="top_attach">3</property>
148
                        <property name="bottom_attach">4</property>
150
                        <property name="y_options"></property>
149
                        <property name="y_options"></property>
151
                      </packing>
150
                      </packing>
152
                    </child>
151
                    </child>
153
                    <child>
152
                    <child>
154
                      <widget class="GtkEntry" id="user_password_entry">
153
                      <widget class="GtkCheckButton" id="show_passwords_checkbutton">
155
                        <property name="visible">True</property>
154
                        <property name="visible">True</property>
156
                        <property name="can_focus">True</property>
155
                        <property name="can_focus">True</property>
157
                        <property name="visibility">False</property>
156
                        <property name="label" translatable="yes">Show passwords</property>
157
                        <property name="response_id">0</property>
158
                        <property name="draw_indicator">True</property>
158
                      </widget>
159
                      </widget>
159
                      <packing>
160
                      <packing>
160
                        <property name="left_attach">1</property>
161
                        <property name="left_attach">1</property>
161
                        <property name="right_attach">2</property>
162
                        <property name="right_attach">2</property>
162
                        <property name="top_attach">2</property>
163
                        <property name="top_attach">4</property>
163
                        <property name="bottom_attach">3</property>
164
                        <property name="bottom_attach">5</property>
164
                        <property name="y_options"></property>
165
                      </packing>
165
                      </packing>
166
                    </child>
166
                    </child>
167
                  </widget>
167
                  </widget>
Lines 199-268 Link Here
199
                <child>
199
                <child>
200
                  <widget class="GtkTable" id="table3">
200
                  <widget class="GtkTable" id="table3">
201
                    <property name="visible">True</property>
201
                    <property name="visible">True</property>
202
                    <property name="n_rows">5</property>
202
                    <property name="n_rows">7</property>
203
                    <property name="n_columns">2</property>
203
                    <property name="n_columns">2</property>
204
                    <property name="column_spacing">6</property>
204
                    <property name="column_spacing">6</property>
205
                    <property name="row_spacing">6</property>
205
                    <property name="row_spacing">6</property>
206
                    <child>
206
                    <child>
207
                      <placeholder/>
207
                      <widget class="GtkEntry" id="ca_file_entry">
208
                        <property name="visible">True</property>
209
                        <property name="can_focus">True</property>
210
                      </widget>
211
                      <packing>
212
                        <property name="left_attach">1</property>
213
                        <property name="right_attach">2</property>
214
                        <property name="top_attach">6</property>
215
                        <property name="bottom_attach">7</property>
216
                      </packing>
208
                    </child>
217
                    </child>
209
                    <child>
218
                    <child>
210
                      <widget class="GtkCheckButton" id="disable_dpd_checkbutton">
219
                      <widget class="GtkLabel" id="label6">
220
                        <property name="visible">True</property>
221
                        <property name="label" translatable="yes">Location of CA File</property>
222
                      </widget>
223
                      <packing>
224
                        <property name="top_attach">6</property>
225
                        <property name="bottom_attach">7</property>
226
                      </packing>
227
                    </child>
228
                    <child>
229
                      <widget class="GtkCheckButton" id="enable_hybrid_checkbutton">
211
                        <property name="visible">True</property>
230
                        <property name="visible">True</property>
212
                        <property name="can_focus">True</property>
231
                        <property name="can_focus">True</property>
213
                        <property name="label" translatable="yes">Disable Dead Peer Detection</property>
232
                        <property name="label" translatable="yes">Enable Hybrid Authentication</property>
214
                        <property name="response_id">0</property>
233
                        <property name="response_id">0</property>
215
                        <property name="draw_indicator">True</property>
234
                        <property name="draw_indicator">True</property>
216
                      </widget>
235
                      </widget>
217
                      <packing>
236
                      <packing>
218
                        <property name="left_attach">1</property>
237
                        <property name="left_attach">1</property>
219
                        <property name="right_attach">2</property>
238
                        <property name="right_attach">2</property>
220
                        <property name="top_attach">4</property>
239
                        <property name="top_attach">5</property>
221
                        <property name="bottom_attach">5</property>
240
                        <property name="bottom_attach">6</property>
222
                      </packing>
241
                      </packing>
223
                    </child>
242
                    </child>
224
                    <child>
243
                    <child>
225
                      <widget class="GtkComboBox" id="encryption_combo">
244
                      <widget class="GtkLabel" id="label5">
226
                        <property name="visible">True</property>
245
                        <property name="visible">True</property>
227
                        <property name="items" translatable="yes"> </property>
246
                        <property name="label" translatable="yes">Hybrid Authentication</property>
228
                      </widget>
247
                      </widget>
229
                      <packing>
248
                      <packing>
230
                        <property name="left_attach">1</property>
249
                        <property name="top_attach">5</property>
231
                        <property name="right_attach">2</property>
250
                        <property name="bottom_attach">6</property>
232
                        <property name="top_attach">2</property>
233
                        <property name="bottom_attach">3</property>
234
                      </packing>
251
                      </packing>
235
                    </child>
252
                    </child>
236
                    <child>
253
                    <child>
237
                      <widget class="GtkLabel" id="label1">
254
                      <placeholder/>
255
                    </child>
256
                    <child>
257
                      <widget class="GtkComboBox" id="natt_combo">
238
                        <property name="visible">True</property>
258
                        <property name="visible">True</property>
239
                        <property name="xalign">0</property>
259
                        <property name="items" translatable="yes"> </property>
240
                        <property name="label" translatable="yes">Encryption method:</property>
241
                      </widget>
260
                      </widget>
242
                      <packing>
261
                      <packing>
243
                        <property name="top_attach">2</property>
262
                        <property name="left_attach">1</property>
244
                        <property name="bottom_attach">3</property>
263
                        <property name="right_attach">2</property>
264
                        <property name="top_attach">3</property>
265
                        <property name="bottom_attach">4</property>
245
                      </packing>
266
                      </packing>
246
                    </child>
267
                    </child>
247
                    <child>
268
                    <child>
248
                      <widget class="GtkLabel" id="label26">
269
                      <widget class="GtkLabel" id="label2">
249
                        <property name="visible">True</property>
270
                        <property name="visible">True</property>
250
                        <property name="xalign">0</property>
271
                        <property name="xalign">0</property>
251
                        <property name="label" translatable="yes">User name:</property>
272
                        <property name="label" translatable="yes">NAT traversal:</property>
252
                      </widget>
273
                      </widget>
253
                      <packing>
274
                      <packing>
254
                        <property name="x_options">GTK_FILL</property>
275
                        <property name="top_attach">3</property>
255
                        <property name="y_options"></property>
276
                        <property name="bottom_attach">4</property>
256
                      </packing>
277
                      </packing>
257
                    </child>
278
                    </child>
258
                    <child>
279
                    <child>
259
                      <widget class="GtkEntry" id="user_entry">
280
                      <widget class="GtkEntry" id="domain_entry">
260
                        <property name="visible">True</property>
281
                        <property name="visible">True</property>
261
                        <property name="can_focus">True</property>
282
                        <property name="can_focus">True</property>
262
                      </widget>
283
                      </widget>
263
                      <packing>
284
                      <packing>
264
                        <property name="left_attach">1</property>
285
                        <property name="left_attach">1</property>
265
                        <property name="right_attach">2</property>
286
                        <property name="right_attach">2</property>
287
                        <property name="top_attach">1</property>
288
                        <property name="bottom_attach">2</property>
266
                        <property name="y_options"></property>
289
                        <property name="y_options"></property>
267
                      </packing>
290
                      </packing>
268
                    </child>
291
                    </child>
Lines 280-318 Link Here
280
                      </packing>
303
                      </packing>
281
                    </child>
304
                    </child>
282
                    <child>
305
                    <child>
283
                      <widget class="GtkEntry" id="domain_entry">
306
                      <widget class="GtkEntry" id="user_entry">
284
                        <property name="visible">True</property>
307
                        <property name="visible">True</property>
285
                        <property name="can_focus">True</property>
308
                        <property name="can_focus">True</property>
286
                      </widget>
309
                      </widget>
287
                      <packing>
310
                      <packing>
288
                        <property name="left_attach">1</property>
311
                        <property name="left_attach">1</property>
289
                        <property name="right_attach">2</property>
312
                        <property name="right_attach">2</property>
290
                        <property name="top_attach">1</property>
291
                        <property name="bottom_attach">2</property>
292
                        <property name="y_options"></property>
313
                        <property name="y_options"></property>
293
                      </packing>
314
                      </packing>
294
                    </child>
315
                    </child>
295
                    <child>
316
                    <child>
296
                      <widget class="GtkLabel" id="label2">
317
                      <widget class="GtkLabel" id="label26">
297
                        <property name="visible">True</property>
318
                        <property name="visible">True</property>
298
                        <property name="xalign">0</property>
319
                        <property name="xalign">0</property>
299
                        <property name="label" translatable="yes">NAT traversal:</property>
320
                        <property name="label" translatable="yes">User name:</property>
300
                      </widget>
321
                      </widget>
301
                      <packing>
322
                      <packing>
302
                        <property name="top_attach">3</property>
323
                        <property name="x_options">GTK_FILL</property>
303
                        <property name="bottom_attach">4</property>
324
                        <property name="y_options"></property>
304
                      </packing>
325
                      </packing>
305
                    </child>
326
                    </child>
306
                    <child>
327
                    <child>
307
                      <widget class="GtkComboBox" id="natt_combo">
328
                      <widget class="GtkLabel" id="label1">
329
                        <property name="visible">True</property>
330
                        <property name="xalign">0</property>
331
                        <property name="label" translatable="yes">Encryption method:</property>
332
                      </widget>
333
                      <packing>
334
                        <property name="top_attach">2</property>
335
                        <property name="bottom_attach">3</property>
336
                      </packing>
337
                    </child>
338
                    <child>
339
                      <widget class="GtkComboBox" id="encryption_combo">
308
                        <property name="visible">True</property>
340
                        <property name="visible">True</property>
309
                        <property name="items" translatable="yes"> </property>
341
                        <property name="items" translatable="yes"> </property>
310
                      </widget>
342
                      </widget>
311
                      <packing>
343
                      <packing>
312
                        <property name="left_attach">1</property>
344
                        <property name="left_attach">1</property>
313
                        <property name="right_attach">2</property>
345
                        <property name="right_attach">2</property>
314
                        <property name="top_attach">3</property>
346
                        <property name="top_attach">2</property>
315
                        <property name="bottom_attach">4</property>
347
                        <property name="bottom_attach">3</property>
348
                      </packing>
349
                    </child>
350
                    <child>
351
                      <widget class="GtkCheckButton" id="disable_dpd_checkbutton">
352
                        <property name="visible">True</property>
353
                        <property name="can_focus">True</property>
354
                        <property name="label" translatable="yes">Disable Dead Peer Detection</property>
355
                        <property name="response_id">0</property>
356
                        <property name="draw_indicator">True</property>
357
                      </widget>
358
                      <packing>
359
                        <property name="left_attach">1</property>
360
                        <property name="right_attach">2</property>
361
                        <property name="top_attach">4</property>
362
                        <property name="bottom_attach">5</property>
316
                      </packing>
363
                      </packing>
317
                    </child>
364
                    </child>
318
                  </widget>
365
                  </widget>
(-)a/properties/nm-vpnc.c (+37 lines)
Lines 500-506 Link Here
500
	g_signal_connect (G_OBJECT (widget), "toggled",
500
	g_signal_connect (G_OBJECT (widget), "toggled",
501
	                  (GCallback) show_toggled_cb,
501
	                  (GCallback) show_toggled_cb,
502
	                  self);
502
	                  self);
503
	
504
	/* hybrid auth */
503
505
506
	widget = glade_xml_get_widget (priv->xml, "enable_hybrid_checkbutton");
507
	g_return_val_if_fail (widget != NULL, FALSE);
508
	if (s_vpn) {
509
		value = nm_setting_vpn_get_data_item (s_vpn, NM_VPNC_KEY_AUTHMODE);
510
		if (value && !strcmp("hybrid",value))
511
			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
512
	}
513
	g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (stuff_changed_cb), self);
514
515
	widget = glade_xml_get_widget (priv->xml, "ca_file_entry");
516
	g_return_val_if_fail (widget != NULL, FALSE);
517
	gtk_size_group_add_widget (priv->group, GTK_WIDGET (widget));
518
	if (s_vpn) {
519
		value = nm_setting_vpn_get_data_item (s_vpn, NM_VPNC_KEY_CA_FILE);
520
		if (value && strlen (value))
521
			gtk_entry_set_text (GTK_ENTRY (widget), value);
522
	}
523
	g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
524
504
	return TRUE;
525
	return TRUE;
505
}
526
}
506
527
Lines 640-646 Link Here
640
		if (str && strlen (str) && (gpw_type != PW_TYPE_UNUSED))
661
		if (str && strlen (str) && (gpw_type != PW_TYPE_UNUSED))
641
			nm_setting_vpn_add_secret (s_vpn, NM_VPNC_KEY_SECRET, str);
662
			nm_setting_vpn_add_secret (s_vpn, NM_VPNC_KEY_SECRET, str);
642
	}
663
	}
664
	
665
	/* hybrid auth */
666
	widget = glade_xml_get_widget (priv->xml, "enable_hybrid_checkbutton");
667
	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
668
		nm_setting_vpn_add_data_item (s_vpn,
669
				g_strdup (NM_VPNC_KEY_AUTHMODE),
670
				g_strdup ("hybrid"));
671
	}
643
672
673
	widget = glade_xml_get_widget (priv->xml, "ca_file_entry");
674
	str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
675
	if (str && strlen (str)) {
676
		nm_setting_vpn_add_data_item (s_vpn,
677
		                     g_strdup (NM_VPNC_KEY_CA_FILE),
678
		                     g_strdup (str));
679
	}
680
644
	nm_connection_add_setting (connection, NM_SETTING (s_vpn));
681
	nm_connection_add_setting (connection, NM_SETTING (s_vpn));
645
	return TRUE;
682
	return TRUE;
646
}
683
}
(-)a/src/nm-vpnc-service.h (+2 lines)
Lines 34-39 Link Here
34
#define NM_VPNC_KEY_NAT_TRAVERSAL_MODE "NAT Traversal Mode"
34
#define NM_VPNC_KEY_NAT_TRAVERSAL_MODE "NAT Traversal Mode"
35
#define NM_VPNC_KEY_DPD_IDLE_TIMEOUT "DPD idle timeout (our side)"
35
#define NM_VPNC_KEY_DPD_IDLE_TIMEOUT "DPD idle timeout (our side)"
36
#define NM_VPNC_KEY_CISCO_UDP_ENCAPS_PORT "Cisco UDP Encapsulation Port"
36
#define NM_VPNC_KEY_CISCO_UDP_ENCAPS_PORT "Cisco UDP Encapsulation Port"
37
#define NM_VPNC_KEY_AUTHMODE "IKE Authmode"
38
#define NM_VPNC_KEY_CA_FILE "CA-File"
37
39
38
#define NM_VPNC_NATT_MODE_NATT "natt"
40
#define NM_VPNC_NATT_MODE_NATT "natt"
39
#define NM_VPNC_NATT_MODE_NONE "none"
41
#define NM_VPNC_NATT_MODE_NONE "none"

Return to bug 250946