1 |
commit: d80678329e6d5e54bd761638db1480698cb88210 |
2 |
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 6 15:48:20 2011 +0000 |
4 |
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 6 15:48:20 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=d8067832 |
7 |
|
8 |
[net-misc] Drop old stuff |
9 |
|
10 |
--- |
11 |
net-misc/modemmanager/metadata.xml | 13 - |
12 |
net-misc/modemmanager/modemmanager-0.4.997.ebuild | 76 --- |
13 |
net-misc/modemmanager/modemmanager-9999.ebuild | 76 --- |
14 |
.../networkmanager-openswan-0.8.999.ebuild | 52 -- |
15 |
.../networkmanager-openvpn-0.8.9997.ebuild | 50 -- |
16 |
.../networkmanager-pptp-0.8.999.ebuild | 54 --- |
17 |
.../networkmanager-vpnc-0.8.999.ebuild | 56 --- |
18 |
...auto-retries-counter-when-cable-is-replug.patch | 80 --- |
19 |
...ix-auto-connect-to-hidden-SSIDs-rh-707406.patch | 502 -------------------- |
20 |
...fix-crash-for-AddAndActivateConnection-D-.patch | 29 -- |
21 |
...ve-invalid-mark-for-failed-connections-af.patch | 109 ----- |
22 |
...tions-failed-due-to-missing-secrets-are-r.patch | 280 ----------- |
23 |
...-not-crash-on-GetSecrets-in-case-of-missi.patch | 29 -- |
24 |
...tinguish-better-between-string-x-int-list.patch | 70 --- |
25 |
...-integer-list-SSID-parsing-after-30c41a4b.patch | 211 -------- |
26 |
...default-to-allowing-IPv6-connections-to-f.patch | 32 -- |
27 |
.../files/networkmanager-fix-tests.patch | 18 - |
28 |
.../networkmanager/files/nm-system-settings.conf | 6 - |
29 |
.../files/nm-system-settings.conf-ifnet | 6 - |
30 |
net-misc/networkmanager/metadata.xml | 26 - |
31 |
.../networkmanager-0.8.9997-r1.ebuild | 138 ------ |
32 |
21 files changed, 0 insertions(+), 1913 deletions(-) |
33 |
|
34 |
diff --git a/net-misc/modemmanager/metadata.xml b/net-misc/modemmanager/metadata.xml |
35 |
deleted file mode 100644 |
36 |
index 8ea105f..0000000 |
37 |
--- a/net-misc/modemmanager/metadata.xml |
38 |
+++ /dev/null |
39 |
@@ -1,13 +0,0 @@ |
40 |
-<?xml version="1.0" encoding="UTF-8"?> |
41 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
42 |
-<pkgmetadata> |
43 |
- <herd>no-herd</herd> |
44 |
- <maintainer> |
45 |
- <email>dagger@g.o</email> |
46 |
- <name>Robert Piasek</name> |
47 |
- </maintainer> |
48 |
- <maintainer> |
49 |
- <email>nirbheek@g.o</email> |
50 |
- <name>Nirbheek Chauhan</name> |
51 |
- </maintainer> |
52 |
-</pkgmetadata> |
53 |
|
54 |
diff --git a/net-misc/modemmanager/modemmanager-0.4.997.ebuild b/net-misc/modemmanager/modemmanager-0.4.997.ebuild |
55 |
deleted file mode 100644 |
56 |
index 0531696..0000000 |
57 |
--- a/net-misc/modemmanager/modemmanager-0.4.997.ebuild |
58 |
+++ /dev/null |
59 |
@@ -1,76 +0,0 @@ |
60 |
-# Copyright 1999-2011 Gentoo Foundation |
61 |
-# Distributed under the terms of the GNU General Public License v2 |
62 |
-# $Header: $ |
63 |
- |
64 |
-EAPI="4" |
65 |
- |
66 |
-# ModemManager likes itself with capital letters |
67 |
-MY_PN="${PN/modemmanager/ModemManager}" |
68 |
-MY_P=${MY_PN}-${PV} |
69 |
- |
70 |
-if [[ ${PV} == *9999 ]]; then |
71 |
- git_eclass="git-2" |
72 |
- EGIT_REPO_URI="git://anongit.freedesktop.org/${MY_PN}/${MY_PN}" |
73 |
- KEYWORDS="" |
74 |
-else |
75 |
- SRC_URI="http://cgit.freedesktop.org/${MY_PN}/${MY_PN}/snapshot/${MY_P}.tar.bz2" |
76 |
- KEYWORDS="~amd64 ~arm ~x86" |
77 |
-fi |
78 |
- |
79 |
-inherit eutils autotools ${git_eclass} |
80 |
- |
81 |
-DESCRIPTION="Modem and mobile broadband management libraries" |
82 |
-HOMEPAGE="http://mail.gnome.org/archives/networkmanager-list/2008-July/msg00274.html" |
83 |
- |
84 |
-LICENSE="LGPL-2.1" |
85 |
-SLOT="0" |
86 |
-IUSE="doc policykit test" |
87 |
- |
88 |
-RDEPEND=">=dev-libs/glib-2.18 |
89 |
- >=sys-fs/udev-145[extras] |
90 |
- >=dev-libs/dbus-glib-0.86 |
91 |
- net-dialup/ppp |
92 |
- policykit? ( >=sys-auth/polkit-0.95 )" |
93 |
-DEPEND="${RDEPEND} |
94 |
- >=dev-util/intltool-0.35.0 |
95 |
- sys-devel/gettext |
96 |
- dev-util/pkgconfig" |
97 |
- |
98 |
-S="${WORKDIR}/${MY_PN}-${PV}" |
99 |
- |
100 |
-src_prepare() { |
101 |
- intltoolize --force --copy --automake || die |
102 |
- eautoreconf |
103 |
-} |
104 |
- |
105 |
-src_configure() { |
106 |
- # ppp-2.4.5 will change the plugin directory (not added to portage yet) |
107 |
- if has_version '=net-dialup/ppp-2.4.4*'; then |
108 |
- pppd_plugin_dir="pppd/2.4.4" |
109 |
- elif has_version '=net-dialup/ppp-2.4.5*'; then |
110 |
- pppd_plugin_dir="pppd/2.4.5" |
111 |
- fi |
112 |
- |
113 |
- econf \ |
114 |
- --disable-more-warnings \ |
115 |
- --with-udev-base-dir=/etc/udev/ \ |
116 |
- --disable-static \ |
117 |
- --with-dist-version=${PVR} \ |
118 |
- --with-pppd-plugin-dir="/usr/$(get_libdir)/${pppd_plugin_dir}" \ |
119 |
- $(use_with doc docs) \ |
120 |
- $(use_with policykit polkit) \ |
121 |
- $(use_with test tests) |
122 |
-} |
123 |
- |
124 |
-src_install() { |
125 |
- emake DESTDIR="${D}" install || die "emake install failed" |
126 |
- dodoc AUTHORS ChangeLog NEWS README |
127 |
- # Remove useless .la files |
128 |
- rm -vf "${D}"/usr/$(get_libdir)/{${MY_PN},${pppd_plugin_dir}}/*.la |
129 |
-} |
130 |
- |
131 |
-pkg_postinst() { |
132 |
- elog "If your USB modem shows up as a Flash drive when you plug it in," |
133 |
- elog "You should install sys-apps/usb_modeswitch which will automatically" |
134 |
- elog "switch it over to USB modem mode whenever you plug it in." |
135 |
-} |
136 |
|
137 |
diff --git a/net-misc/modemmanager/modemmanager-9999.ebuild b/net-misc/modemmanager/modemmanager-9999.ebuild |
138 |
deleted file mode 100644 |
139 |
index 0531696..0000000 |
140 |
--- a/net-misc/modemmanager/modemmanager-9999.ebuild |
141 |
+++ /dev/null |
142 |
@@ -1,76 +0,0 @@ |
143 |
-# Copyright 1999-2011 Gentoo Foundation |
144 |
-# Distributed under the terms of the GNU General Public License v2 |
145 |
-# $Header: $ |
146 |
- |
147 |
-EAPI="4" |
148 |
- |
149 |
-# ModemManager likes itself with capital letters |
150 |
-MY_PN="${PN/modemmanager/ModemManager}" |
151 |
-MY_P=${MY_PN}-${PV} |
152 |
- |
153 |
-if [[ ${PV} == *9999 ]]; then |
154 |
- git_eclass="git-2" |
155 |
- EGIT_REPO_URI="git://anongit.freedesktop.org/${MY_PN}/${MY_PN}" |
156 |
- KEYWORDS="" |
157 |
-else |
158 |
- SRC_URI="http://cgit.freedesktop.org/${MY_PN}/${MY_PN}/snapshot/${MY_P}.tar.bz2" |
159 |
- KEYWORDS="~amd64 ~arm ~x86" |
160 |
-fi |
161 |
- |
162 |
-inherit eutils autotools ${git_eclass} |
163 |
- |
164 |
-DESCRIPTION="Modem and mobile broadband management libraries" |
165 |
-HOMEPAGE="http://mail.gnome.org/archives/networkmanager-list/2008-July/msg00274.html" |
166 |
- |
167 |
-LICENSE="LGPL-2.1" |
168 |
-SLOT="0" |
169 |
-IUSE="doc policykit test" |
170 |
- |
171 |
-RDEPEND=">=dev-libs/glib-2.18 |
172 |
- >=sys-fs/udev-145[extras] |
173 |
- >=dev-libs/dbus-glib-0.86 |
174 |
- net-dialup/ppp |
175 |
- policykit? ( >=sys-auth/polkit-0.95 )" |
176 |
-DEPEND="${RDEPEND} |
177 |
- >=dev-util/intltool-0.35.0 |
178 |
- sys-devel/gettext |
179 |
- dev-util/pkgconfig" |
180 |
- |
181 |
-S="${WORKDIR}/${MY_PN}-${PV}" |
182 |
- |
183 |
-src_prepare() { |
184 |
- intltoolize --force --copy --automake || die |
185 |
- eautoreconf |
186 |
-} |
187 |
- |
188 |
-src_configure() { |
189 |
- # ppp-2.4.5 will change the plugin directory (not added to portage yet) |
190 |
- if has_version '=net-dialup/ppp-2.4.4*'; then |
191 |
- pppd_plugin_dir="pppd/2.4.4" |
192 |
- elif has_version '=net-dialup/ppp-2.4.5*'; then |
193 |
- pppd_plugin_dir="pppd/2.4.5" |
194 |
- fi |
195 |
- |
196 |
- econf \ |
197 |
- --disable-more-warnings \ |
198 |
- --with-udev-base-dir=/etc/udev/ \ |
199 |
- --disable-static \ |
200 |
- --with-dist-version=${PVR} \ |
201 |
- --with-pppd-plugin-dir="/usr/$(get_libdir)/${pppd_plugin_dir}" \ |
202 |
- $(use_with doc docs) \ |
203 |
- $(use_with policykit polkit) \ |
204 |
- $(use_with test tests) |
205 |
-} |
206 |
- |
207 |
-src_install() { |
208 |
- emake DESTDIR="${D}" install || die "emake install failed" |
209 |
- dodoc AUTHORS ChangeLog NEWS README |
210 |
- # Remove useless .la files |
211 |
- rm -vf "${D}"/usr/$(get_libdir)/{${MY_PN},${pppd_plugin_dir}}/*.la |
212 |
-} |
213 |
- |
214 |
-pkg_postinst() { |
215 |
- elog "If your USB modem shows up as a Flash drive when you plug it in," |
216 |
- elog "You should install sys-apps/usb_modeswitch which will automatically" |
217 |
- elog "switch it over to USB modem mode whenever you plug it in." |
218 |
-} |
219 |
|
220 |
diff --git a/net-misc/networkmanager-openswan/networkmanager-openswan-0.8.999.ebuild b/net-misc/networkmanager-openswan/networkmanager-openswan-0.8.999.ebuild |
221 |
deleted file mode 100644 |
222 |
index 3fe1c4d..0000000 |
223 |
--- a/net-misc/networkmanager-openswan/networkmanager-openswan-0.8.999.ebuild |
224 |
+++ /dev/null |
225 |
@@ -1,52 +0,0 @@ |
226 |
-# Copyright 1999-2011 Gentoo Foundation |
227 |
-# Distributed under the terms of the GNU General Public License v2 |
228 |
-# $Header: $ |
229 |
- |
230 |
-EAPI="4" |
231 |
-GNOME_TARBALL_SUFFIX="bz2" |
232 |
-GNOME_ORG_MODULE="NetworkManager-${PN##*-}" |
233 |
- |
234 |
-inherit gnome.org |
235 |
- |
236 |
-# NetworkManager likes itself with capital letters |
237 |
-MY_PN="${GNOME_ORG_MODULE}" |
238 |
- |
239 |
-DESCRIPTION="NetworkManager Openswan plugin" |
240 |
-HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" |
241 |
- |
242 |
-LICENSE="GPL-2" |
243 |
-SLOT="0" |
244 |
-KEYWORDS="~amd64 ~x86" |
245 |
-IUSE="gnome" |
246 |
- |
247 |
-RDEPEND=" |
248 |
- >=net-misc/networkmanager-${PV} |
249 |
- >=dev-libs/dbus-glib-0.74 |
250 |
- >=net-misc/vpnc-0.5 |
251 |
- gnome? ( |
252 |
- >=x11-libs/gtk+-3.0.0:3 |
253 |
- gnome-base/gnome-keyring |
254 |
- )" |
255 |
- |
256 |
-DEPEND="${RDEPEND} |
257 |
- sys-devel/gettext |
258 |
- dev-util/intltool |
259 |
- dev-util/pkgconfig" |
260 |
- |
261 |
-S="${WORKDIR}/${MY_PN}-${PV}" |
262 |
- |
263 |
-src_configure() { |
264 |
- ECONF="--disable-more-warnings |
265 |
- --disable-static |
266 |
- --with-dist-version=Gentoo |
267 |
- --with-gtkver=3.0 |
268 |
- $(use_with gnome)" |
269 |
- |
270 |
- econf ${ECONF} |
271 |
-} |
272 |
- |
273 |
-src_install() { |
274 |
- default |
275 |
- # Remove useless .la files |
276 |
- find "${D}" -name '*.la' -exec rm -f {} + |
277 |
-} |
278 |
|
279 |
diff --git a/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.8.9997.ebuild b/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.8.9997.ebuild |
280 |
deleted file mode 100644 |
281 |
index e4d0bdd..0000000 |
282 |
--- a/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.8.9997.ebuild |
283 |
+++ /dev/null |
284 |
@@ -1,50 +0,0 @@ |
285 |
-# Copyright 1999-2011 Gentoo Foundation |
286 |
-# Distributed under the terms of the GNU General Public License v2 |
287 |
-# $Header: $ |
288 |
- |
289 |
-EAPI="4" |
290 |
-GNOME_ORG_MODULE="NetworkManager-${PN##*-}" |
291 |
- |
292 |
-inherit gnome.org |
293 |
- |
294 |
-DESCRIPTION="NetworkManager OpenVPN plugin" |
295 |
-HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" |
296 |
- |
297 |
-LICENSE="GPL-2" |
298 |
-SLOT="0" |
299 |
-KEYWORDS="~amd64 ~x86" |
300 |
-IUSE="gnome test" |
301 |
- |
302 |
-RDEPEND=" |
303 |
- >=dev-libs/dbus-glib-0.74 |
304 |
- >=net-misc/networkmanager-${PV} |
305 |
- >=net-misc/openvpn-2.1_rc9 |
306 |
- gnome? ( |
307 |
- >=x11-libs/gtk+-2.91.4:3 |
308 |
- gnome-base/gnome-keyring |
309 |
- )" |
310 |
- |
311 |
-DEPEND="${RDEPEND} |
312 |
- sys-devel/gettext |
313 |
- >=dev-util/intltool-0.35 |
314 |
- dev-util/pkgconfig" |
315 |
- |
316 |
-# FAIL: (tls-import-data) unexpected 'ca' secret value |
317 |
-#RESTRICT="test" |
318 |
- |
319 |
-src_configure() { |
320 |
- ECONF="--disable-more-warnings |
321 |
- --disable-static |
322 |
- --with-dist-version=Gentoo |
323 |
- --with-gtkver=3.0 |
324 |
- $(use_with gnome) |
325 |
- $(use_with test tests)" |
326 |
- |
327 |
- econf ${ECONF} |
328 |
-} |
329 |
- |
330 |
-src_install() { |
331 |
- default |
332 |
- # Remove useless .la files |
333 |
- find "${D}" -name '*.la' -exec rm -f {} + |
334 |
-} |
335 |
|
336 |
diff --git a/net-misc/networkmanager-pptp/networkmanager-pptp-0.8.999.ebuild b/net-misc/networkmanager-pptp/networkmanager-pptp-0.8.999.ebuild |
337 |
deleted file mode 100644 |
338 |
index 8f5d0cb..0000000 |
339 |
--- a/net-misc/networkmanager-pptp/networkmanager-pptp-0.8.999.ebuild |
340 |
+++ /dev/null |
341 |
@@ -1,54 +0,0 @@ |
342 |
-# Copyright 1999-2011 Gentoo Foundation |
343 |
-# Distributed under the terms of the GNU General Public License v2 |
344 |
-# $Header: $ |
345 |
- |
346 |
-EAPI="4" |
347 |
-GNOME_TARBALL_SUFFIX="bz2" |
348 |
-GNOME_ORG_MODULE="NetworkManager-${PN##*-}" |
349 |
- |
350 |
-inherit gnome.org |
351 |
- |
352 |
-# NetworkManager likes itself with capital letters |
353 |
-MY_PN="${GNOME_ORG_MODULE}" |
354 |
- |
355 |
-DESCRIPTION="NetworkManager PPTP plugin" |
356 |
-HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" |
357 |
- |
358 |
-LICENSE="GPL-2" |
359 |
-SLOT="0" |
360 |
-KEYWORDS="~amd64 ~x86" |
361 |
-IUSE="gnome test" |
362 |
- |
363 |
-RDEPEND=" |
364 |
- >=net-misc/networkmanager-${PV} |
365 |
- >=dev-libs/dbus-glib-0.74 |
366 |
- net-dialup/ppp |
367 |
- net-dialup/pptpclient |
368 |
- gnome? ( |
369 |
- >=x11-libs/gtk+-2.91.4:3 |
370 |
- gnome-base/gnome-keyring |
371 |
- )" |
372 |
- |
373 |
-DEPEND="${RDEPEND} |
374 |
- sys-devel/gettext |
375 |
- dev-util/intltool |
376 |
- dev-util/pkgconfig" |
377 |
- |
378 |
-S="${WORKDIR}/${MY_PN}-${PV}" |
379 |
- |
380 |
-src_configure() { |
381 |
- ECONF="--disable-more-warnings |
382 |
- --disable-static |
383 |
- --with-dist-version=Gentoo |
384 |
- --with-gtkver=3.0 |
385 |
- $(use_with gnome) |
386 |
- $(use_with test tests)" |
387 |
- |
388 |
- econf ${ECONF} |
389 |
-} |
390 |
- |
391 |
-src_install() { |
392 |
- default |
393 |
- # Remove useless .la files |
394 |
- find "${D}" -name '*.la' -exec rm -f {} + |
395 |
-} |
396 |
|
397 |
diff --git a/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.8.999.ebuild b/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.8.999.ebuild |
398 |
deleted file mode 100644 |
399 |
index fa09413..0000000 |
400 |
--- a/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.8.999.ebuild |
401 |
+++ /dev/null |
402 |
@@ -1,56 +0,0 @@ |
403 |
-# Copyright 1999-2011 Gentoo Foundation |
404 |
-# Distributed under the terms of the GNU General Public License v2 |
405 |
-# $Header: $ |
406 |
- |
407 |
-EAPI="4" |
408 |
-GNOME_TARBALL_SUFFIX="bz2" |
409 |
-GNOME_ORG_MODULE="NetworkManager-${PN##*-}" |
410 |
- |
411 |
-inherit gnome.org |
412 |
- |
413 |
-# NetworkManager likes itself with capital letters |
414 |
-MY_PN="${GNOME_ORG_MODULE}" |
415 |
- |
416 |
-DESCRIPTION="NetworkManager VPNC plugin" |
417 |
-HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" |
418 |
- |
419 |
-LICENSE="GPL-2" |
420 |
-SLOT="0" |
421 |
-KEYWORDS="~amd64 ~x86" |
422 |
-IUSE="gnome test" |
423 |
- |
424 |
-RDEPEND=" |
425 |
- >=net-misc/networkmanager-${PV} |
426 |
- >=dev-libs/dbus-glib-0.74 |
427 |
- >=net-misc/vpnc-0.5 |
428 |
- gnome? ( |
429 |
- >=x11-libs/gtk+-2.91.4:3 |
430 |
- gnome-base/gnome-keyring |
431 |
- )" |
432 |
- |
433 |
-DEPEND="${RDEPEND} |
434 |
- sys-devel/gettext |
435 |
- dev-util/intltool |
436 |
- dev-util/pkgconfig" |
437 |
- |
438 |
-S="${WORKDIR}/${MY_PN}-${PV}" |
439 |
- |
440 |
-# XXX: https://bugzilla.gnome.org/show_bug.cgi?id=608348 |
441 |
-RESTRICT="test" |
442 |
- |
443 |
-src_configure() { |
444 |
- ECONF="--disable-more-warnings |
445 |
- --disable-static |
446 |
- --with-dist-version=Gentoo |
447 |
- --with-gtkver=3.0 |
448 |
- $(use_with gnome) |
449 |
- $(use_with test tests)" |
450 |
- |
451 |
- econf ${ECONF} |
452 |
-} |
453 |
- |
454 |
-src_install() { |
455 |
- default |
456 |
- # Remove useless .la files |
457 |
- find "${D}" -name '*.la' -exec rm -f {} + |
458 |
-} |
459 |
|
460 |
diff --git a/net-misc/networkmanager/files/0.8.9997/0001-core-reset-auto-retries-counter-when-cable-is-replug.patch b/net-misc/networkmanager/files/0.8.9997/0001-core-reset-auto-retries-counter-when-cable-is-replug.patch |
461 |
deleted file mode 100644 |
462 |
index f6eb6bc..0000000 |
463 |
--- a/net-misc/networkmanager/files/0.8.9997/0001-core-reset-auto-retries-counter-when-cable-is-replug.patch |
464 |
+++ /dev/null |
465 |
@@ -1,80 +0,0 @@ |
466 |
-From 9aa7efcf28a0230876fc6fc5be6dfee5f35d0630 Mon Sep 17 00:00:00 2001 |
467 |
-From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@××××××.com> |
468 |
-Date: Mon, 30 May 2011 12:07:41 +0100 |
469 |
-Subject: [PATCH] core: reset auto retries counter when cable is replugged |
470 |
- |
471 |
-When re-plugging we may be in a different network. So we should try the |
472 |
-compatible connections again. |
473 |
- |
474 |
-Based on a patch from Mikhail Efremov. |
475 |
---- |
476 |
- src/nm-policy.c | 21 +++++++++++++++------ |
477 |
- 1 files changed, 15 insertions(+), 6 deletions(-) |
478 |
- |
479 |
-diff --git a/src/nm-policy.c b/src/nm-policy.c |
480 |
-index 194d111..b98fe32 100644 |
481 |
---- a/src/nm-policy.c |
482 |
-+++ b/src/nm-policy.c |
483 |
-@@ -817,13 +817,17 @@ hostname_changed (NMManager *manager, GParamSpec *pspec, gpointer user_data) |
484 |
- } |
485 |
- |
486 |
- static void |
487 |
--reset_retries_all (NMSettings *settings) |
488 |
-+reset_retries_all (NMSettings *settings, NMDevice *device) |
489 |
- { |
490 |
- GSList *connections, *iter; |
491 |
-+ GError *error = NULL; |
492 |
- |
493 |
- connections = nm_settings_get_connections (settings); |
494 |
-- for (iter = connections; iter; iter = g_slist_next (iter)) |
495 |
-- set_connection_auto_retries (NM_CONNECTION (iter->data), RETRIES_DEFAULT); |
496 |
-+ for (iter = connections; iter; iter = g_slist_next (iter)) { |
497 |
-+ if (!device || nm_device_interface_check_connection_compatible (NM_DEVICE_INTERFACE (device), iter->data, &error)) |
498 |
-+ set_connection_auto_retries (NM_CONNECTION (iter->data), RETRIES_DEFAULT); |
499 |
-+ g_clear_error (&error); |
500 |
-+ } |
501 |
- g_slist_free (connections); |
502 |
- } |
503 |
- |
504 |
-@@ -838,7 +842,7 @@ sleeping_changed (NMManager *manager, GParamSpec *pspec, gpointer user_data) |
505 |
- |
506 |
- /* Reset retries on all connections so they'll checked on wakeup */ |
507 |
- if (sleeping || !enabled) |
508 |
-- reset_retries_all (policy->settings); |
509 |
-+ reset_retries_all (policy->settings, NULL); |
510 |
- } |
511 |
- |
512 |
- static void |
513 |
-@@ -932,6 +936,11 @@ device_state_changed (NMDevice *device, |
514 |
- update_routing_and_dns (policy, FALSE); |
515 |
- break; |
516 |
- case NM_DEVICE_STATE_DISCONNECTED: |
517 |
-+ /* Clear INVALID_TAG when carrier on. If cable was unplugged |
518 |
-+ * and plugged again, we should try to reconnect */ |
519 |
-+ if (reason == NM_DEVICE_STATE_REASON_CARRIER && old_state == NM_DEVICE_STATE_UNAVAILABLE) |
520 |
-+ reset_retries_all (policy->settings, device); |
521 |
-+ |
522 |
- /* Device is now available for auto-activation */ |
523 |
- update_routing_and_dns (policy, FALSE); |
524 |
- schedule_activate_check (policy, device, 0); |
525 |
-@@ -1058,7 +1067,7 @@ connections_loaded (NMSettings *settings, gpointer user_data) |
526 |
- // that by calling reset_retries_all() in nm_policy_new() |
527 |
- |
528 |
- /* Initialize connections' auto-retries */ |
529 |
-- reset_retries_all (settings); |
530 |
-+ reset_retries_all (settings, NULL); |
531 |
- |
532 |
- schedule_activate_all ((NMPolicy *) user_data); |
533 |
- } |
534 |
-@@ -1188,7 +1197,7 @@ nm_policy_new (NMManager *manager, |
535 |
- connection_visibility_changed); |
536 |
- |
537 |
- /* Initialize connections' auto-retries */ |
538 |
-- reset_retries_all (policy->settings); |
539 |
-+ reset_retries_all (policy->settings, NULL); |
540 |
- |
541 |
- initialized = TRUE; |
542 |
- return policy; |
543 |
--- |
544 |
-1.7.6 |
545 |
- |
546 |
|
547 |
diff --git a/net-misc/networkmanager/files/0.8.9997/0002-core-fix-auto-connect-to-hidden-SSIDs-rh-707406.patch b/net-misc/networkmanager/files/0.8.9997/0002-core-fix-auto-connect-to-hidden-SSIDs-rh-707406.patch |
548 |
deleted file mode 100644 |
549 |
index 565b01b..0000000 |
550 |
--- a/net-misc/networkmanager/files/0.8.9997/0002-core-fix-auto-connect-to-hidden-SSIDs-rh-707406.patch |
551 |
+++ /dev/null |
552 |
@@ -1,502 +0,0 @@ |
553 |
-From 9549c70d943e3709694c4b0eb2595af11962c0eb Mon Sep 17 00:00:00 2001 |
554 |
-From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@××××××.com> |
555 |
-Date: Fri, 27 May 2011 17:32:40 +0200 |
556 |
-Subject: [PATCH] core: fix auto-connect to hidden SSIDs (rh #707406) |
557 |
-MIME-Version: 1.0 |
558 |
-Content-Type: text/plain; charset=UTF-8 |
559 |
-Content-Transfer-Encoding: 8bit |
560 |
- |
561 |
-Previously (in NM 0.8.x) most WiFi connection were from user settings service. |
562 |
-And the service updated 'seen-bssids' property when got connected. |
563 |
-But the settings service in 0.9 don't do that. That inhibits auto-connecting to |
564 |
-hidden networks. This commit takes care of updating 'seen-bssids'. However, we |
565 |
-don't want to write out the conection each time it's activated (touching /etc). |
566 |
-So, seen BSSIDs are kept separately from the connection in a look-aside file. |
567 |
- |
568 |
-Signed-off-by: Jiřà Klimeš <jklimes@××××××.com> |
569 |
---- |
570 |
- src/nm-device-wifi.c | 30 +++++- |
571 |
- src/nm-manager.c | 44 ++----- |
572 |
- src/settings/nm-settings-connection.c | 216 +++++++++++++++++++++++++++++++-- |
573 |
- src/settings/nm-settings-connection.h | 9 ++ |
574 |
- src/settings/nm-settings.c | 3 + |
575 |
- 5 files changed, 256 insertions(+), 46 deletions(-) |
576 |
- |
577 |
-diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c |
578 |
-index 7a6e752..7f9b5d2 100644 |
579 |
---- a/src/nm-device-wifi.c |
580 |
-+++ b/src/nm-device-wifi.c |
581 |
-@@ -55,6 +55,7 @@ |
582 |
- #include "nm-setting-ip4-config.h" |
583 |
- #include "nm-setting-ip6-config.h" |
584 |
- #include "nm-system.h" |
585 |
-+#include "nm-settings-connection.h" |
586 |
- |
587 |
- static gboolean impl_device_get_access_points (NMDeviceWifi *device, |
588 |
- GPtrArray **aps, |
589 |
-@@ -978,6 +979,28 @@ get_active_ap (NMDeviceWifi *self, |
590 |
- } |
591 |
- |
592 |
- static void |
593 |
-+update_seen_bssids_cache (NMDeviceWifi *self, NMAccessPoint *ap) |
594 |
-+{ |
595 |
-+ NMActRequest *req; |
596 |
-+ NMConnection *connection; |
597 |
-+ |
598 |
-+ g_return_if_fail (ap != NULL); |
599 |
-+ |
600 |
-+ /* Don't cache the BSSID for Ad-Hoc APs */ |
601 |
-+ if (nm_ap_get_mode (ap) != NM_802_11_MODE_INFRA) |
602 |
-+ return; |
603 |
-+ |
604 |
-+ if (nm_device_get_state (NM_DEVICE (self)) == NM_DEVICE_STATE_ACTIVATED) { |
605 |
-+ req = nm_device_get_act_request (NM_DEVICE (self)); |
606 |
-+ if (req) { |
607 |
-+ connection = nm_act_request_get_connection (req); |
608 |
-+ nm_settings_connection_add_seen_bssid (NM_SETTINGS_CONNECTION (connection), |
609 |
-+ nm_ap_get_address (ap)); |
610 |
-+ } |
611 |
-+ } |
612 |
-+} |
613 |
-+ |
614 |
-+static void |
615 |
- set_current_ap (NMDeviceWifi *self, NMAccessPoint *new_ap) |
616 |
- { |
617 |
- NMDeviceWifiPrivate *priv; |
618 |
-@@ -1003,6 +1026,9 @@ set_current_ap (NMDeviceWifi *self, NMAccessPoint *new_ap) |
619 |
- */ |
620 |
- priv->ap_list = g_slist_remove (priv->ap_list, new_ap); |
621 |
- priv->ap_list = g_slist_prepend (priv->ap_list, new_ap); |
622 |
-+ |
623 |
-+ /* Update seen BSSIDs cache */ |
624 |
-+ update_seen_bssids_cache (self, priv->current_ap); |
625 |
- } |
626 |
- |
627 |
- /* Unref old AP here to ensure object lives if new_ap == old_ap */ |
628 |
-@@ -3436,11 +3462,13 @@ activation_success_handler (NMDevice *dev) |
629 |
- done: |
630 |
- periodic_update (self); |
631 |
- |
632 |
-+ /* Update seen BSSIDs cache with the connected AP */ |
633 |
-+ update_seen_bssids_cache (self, priv->current_ap); |
634 |
-+ |
635 |
- /* Reset scan interval to something reasonable */ |
636 |
- priv->scan_interval = SCAN_INTERVAL_MIN + (SCAN_INTERVAL_STEP * 2); |
637 |
- } |
638 |
- |
639 |
-- |
640 |
- static void |
641 |
- activation_failure_handler (NMDevice *dev) |
642 |
- { |
643 |
-diff --git a/src/nm-manager.c b/src/nm-manager.c |
644 |
-index 5a3f7f7..a15e4b7 100644 |
645 |
---- a/src/nm-manager.c |
646 |
-+++ b/src/nm-manager.c |
647 |
-@@ -63,6 +63,7 @@ |
648 |
- #include "nm-settings-connection.h" |
649 |
- #include "nm-manager-auth.h" |
650 |
- #include "NetworkManagerUtils.h" |
651 |
-+#include "nm-utils.h" |
652 |
- |
653 |
- #define NM_AUTOIP_DBUS_SERVICE "org.freedesktop.nm_avahi_autoipd" |
654 |
- #define NM_AUTOIP_DBUS_IFACE "org.freedesktop.nm_avahi_autoipd" |
655 |
-@@ -1040,52 +1041,27 @@ manager_hidden_ap_found (NMDeviceInterface *device, |
656 |
- { |
657 |
- NMManager *manager = NM_MANAGER (user_data); |
658 |
- NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager); |
659 |
-- const struct ether_addr *ap_addr; |
660 |
-- const GByteArray *ap_ssid; |
661 |
-+ const struct ether_addr *bssid; |
662 |
- GSList *iter; |
663 |
- GSList *connections; |
664 |
- gboolean done = FALSE; |
665 |
- |
666 |
-- ap_ssid = nm_ap_get_ssid (ap); |
667 |
-- if (ap_ssid && ap_ssid->len) |
668 |
-- return; |
669 |
-+ g_return_if_fail (nm_ap_get_ssid (ap) == NULL); |
670 |
- |
671 |
-- ap_addr = nm_ap_get_address (ap); |
672 |
-- g_assert (ap_addr); |
673 |
-+ bssid = nm_ap_get_address (ap); |
674 |
-+ g_assert (bssid); |
675 |
- |
676 |
- /* Look for this AP's BSSID in the seen-bssids list of a connection, |
677 |
- * and if a match is found, copy over the SSID */ |
678 |
- connections = nm_settings_get_connections (priv->settings); |
679 |
-- |
680 |
- for (iter = connections; iter && !done; iter = g_slist_next (iter)) { |
681 |
- NMConnection *connection = NM_CONNECTION (iter->data); |
682 |
-- NMSettingWireless *s_wireless; |
683 |
-- const GByteArray *ssid; |
684 |
-- guint32 num_bssids; |
685 |
-- guint32 i; |
686 |
-- |
687 |
-- s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS); |
688 |
-- if (!s_wireless) |
689 |
-- continue; |
690 |
-- |
691 |
-- num_bssids = nm_setting_wireless_get_num_seen_bssids (s_wireless); |
692 |
-- if (num_bssids < 1) |
693 |
-- continue; |
694 |
-- |
695 |
-- ssid = nm_setting_wireless_get_ssid (s_wireless); |
696 |
-- g_assert (ssid); |
697 |
-- |
698 |
-- for (i = 0; i < num_bssids && !done; i++) { |
699 |
-- const char *seen_bssid = nm_setting_wireless_get_seen_bssid (s_wireless, i); |
700 |
-- struct ether_addr seen_addr; |
701 |
-+ NMSettingWireless *s_wifi; |
702 |
- |
703 |
-- if (ether_aton_r (seen_bssid, &seen_addr)) { |
704 |
-- if (memcmp (ap_addr, &seen_addr, sizeof (struct ether_addr)) == 0) { |
705 |
-- /* Copy the SSID from the connection to the AP */ |
706 |
-- nm_ap_set_ssid (ap, ssid); |
707 |
-- done = TRUE; |
708 |
-- } |
709 |
-- } |
710 |
-+ s_wifi = nm_connection_get_setting_wireless (connection); |
711 |
-+ if (s_wifi) { |
712 |
-+ if (nm_settings_connection_has_seen_bssid (NM_SETTINGS_CONNECTION (connection), bssid)) |
713 |
-+ nm_ap_set_ssid (ap, nm_setting_wireless_get_ssid (s_wifi)); |
714 |
- } |
715 |
- } |
716 |
- g_slist_free (connections); |
717 |
-diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c |
718 |
-index 828a036..c20ba82 100644 |
719 |
---- a/src/settings/nm-settings-connection.c |
720 |
-+++ b/src/settings/nm-settings-connection.c |
721 |
-@@ -22,6 +22,7 @@ |
722 |
- #include "config.h" |
723 |
- |
724 |
- #include <string.h> |
725 |
-+#include <netinet/ether.h> |
726 |
- |
727 |
- #include <NetworkManager.h> |
728 |
- #include <dbus/dbus-glib-lowlevel.h> |
729 |
-@@ -38,8 +39,10 @@ |
730 |
- #include "nm-manager-auth.h" |
731 |
- #include "nm-marshal.h" |
732 |
- #include "nm-agent-manager.h" |
733 |
-+#include "NetworkManagerUtils.h" |
734 |
- |
735 |
- #define SETTINGS_TIMESTAMPS_FILE LOCALSTATEDIR"/lib/NetworkManager/timestamps" |
736 |
-+#define SETTINGS_SEEN_BSSIDS_FILE LOCALSTATEDIR"/lib/NetworkManager/seen-bssids" |
737 |
- |
738 |
- static void impl_settings_connection_get_settings (NMSettingsConnection *connection, |
739 |
- DBusGMethodInvocation *context); |
740 |
-@@ -91,7 +94,8 @@ typedef struct { |
741 |
- NMSessionMonitor *session_monitor; |
742 |
- guint session_changed_id; |
743 |
- |
744 |
-- guint64 timestamp; /* Up-to-date timestamp of connection use */ |
745 |
-+ guint64 timestamp; /* Up-to-date timestamp of connection use */ |
746 |
-+ GHashTable *seen_bssids; /* Up-to-date BSSIDs that's been seen for the connection */ |
747 |
- } NMSettingsConnectionPrivate; |
748 |
- |
749 |
- /**************************************************************/ |
750 |
-@@ -455,12 +459,20 @@ commit_changes (NMSettingsConnection *connection, |
751 |
- } |
752 |
- |
753 |
- static void |
754 |
--remove_timestamp_from_db (NMSettingsConnection *connection) |
755 |
-+remove_entry_from_db (NMSettingsConnection *connection, const char* db_name) |
756 |
- { |
757 |
-- GKeyFile *timestamps_file; |
758 |
-+ GKeyFile *key_file; |
759 |
-+ const char *db_file; |
760 |
- |
761 |
-- timestamps_file = g_key_file_new (); |
762 |
-- if (g_key_file_load_from_file (timestamps_file, SETTINGS_TIMESTAMPS_FILE, G_KEY_FILE_KEEP_COMMENTS, NULL)) { |
763 |
-+ if (strcmp (db_name, "timestamps") == 0) |
764 |
-+ db_file = SETTINGS_TIMESTAMPS_FILE; |
765 |
-+ else if (strcmp (db_name, "seen-bssids") == 0) |
766 |
-+ db_file = SETTINGS_SEEN_BSSIDS_FILE; |
767 |
-+ else |
768 |
-+ return; |
769 |
-+ |
770 |
-+ key_file = g_key_file_new (); |
771 |
-+ if (g_key_file_load_from_file (key_file, db_file, G_KEY_FILE_KEEP_COMMENTS, NULL)) { |
772 |
- const char *connection_uuid; |
773 |
- char *data; |
774 |
- gsize len; |
775 |
-@@ -468,18 +480,18 @@ remove_timestamp_from_db (NMSettingsConnection *connection) |
776 |
- |
777 |
- connection_uuid = nm_connection_get_uuid (NM_CONNECTION (connection)); |
778 |
- |
779 |
-- g_key_file_remove_key (timestamps_file, "timestamps", connection_uuid, NULL); |
780 |
-- data = g_key_file_to_data (timestamps_file, &len, &error); |
781 |
-+ g_key_file_remove_key (key_file, db_name, connection_uuid, NULL); |
782 |
-+ data = g_key_file_to_data (key_file, &len, &error); |
783 |
- if (data) { |
784 |
-- g_file_set_contents (SETTINGS_TIMESTAMPS_FILE, data, len, &error); |
785 |
-+ g_file_set_contents (db_file, data, len, &error); |
786 |
- g_free (data); |
787 |
- } |
788 |
- if (error) { |
789 |
-- nm_log_warn (LOGD_SETTINGS, "error writing timestamps file '%s': %s", SETTINGS_TIMESTAMPS_FILE, error->message); |
790 |
-+ nm_log_warn (LOGD_SETTINGS, "error writing %s file '%s': %s", db_name, db_file, error->message); |
791 |
- g_error_free (error); |
792 |
- } |
793 |
- } |
794 |
-- g_key_file_free (timestamps_file); |
795 |
-+ g_key_file_free (key_file); |
796 |
- } |
797 |
- |
798 |
- static void |
799 |
-@@ -499,7 +511,10 @@ do_delete (NMSettingsConnection *connection, |
800 |
- nm_agent_manager_delete_secrets (priv->agent_mgr, for_agents, FALSE, 0); |
801 |
- |
802 |
- /* Remove timestamp from timestamps database file */ |
803 |
-- remove_timestamp_from_db (connection); |
804 |
-+ remove_entry_from_db (connection, "timestamps"); |
805 |
-+ |
806 |
-+ /* Remove connection from seen-bssids database file */ |
807 |
-+ remove_entry_from_db (connection, "seen-bssids"); |
808 |
- |
809 |
- /* Signal the connection is removed and deleted */ |
810 |
- g_signal_emit (connection, signals[REMOVED], 0); |
811 |
-@@ -1440,6 +1455,181 @@ nm_settings_connection_read_and_fill_timestamp (NMSettingsConnection *connection |
812 |
- g_key_file_free (timestamps_file); |
813 |
- } |
814 |
- |
815 |
-+static guint |
816 |
-+mac_hash (gconstpointer v) |
817 |
-+{ |
818 |
-+ const guint8 *p = v; |
819 |
-+ guint32 i, h = 5381; |
820 |
-+ |
821 |
-+ for (i = 0; i < ETH_ALEN; i++) |
822 |
-+ h = (h << 5) + h + p[i]; |
823 |
-+ return h; |
824 |
-+} |
825 |
-+ |
826 |
-+static gboolean |
827 |
-+mac_equal (gconstpointer a, gconstpointer b) |
828 |
-+{ |
829 |
-+ return memcmp (a, b, ETH_ALEN) == 0; |
830 |
-+} |
831 |
-+ |
832 |
-+static guint8 * |
833 |
-+mac_dup (const struct ether_addr *old) |
834 |
-+{ |
835 |
-+ guint8 *new; |
836 |
-+ |
837 |
-+ g_return_val_if_fail (old != NULL, NULL); |
838 |
-+ |
839 |
-+ new = g_malloc0 (ETH_ALEN); |
840 |
-+ memcpy (new, old, ETH_ALEN); |
841 |
-+ return new; |
842 |
-+} |
843 |
-+ |
844 |
-+/** |
845 |
-+ * nm_settings_connection_has_seen_bssid: |
846 |
-+ * @connection: the #NMSettingsConnection |
847 |
-+ * @bssid: the BSSID to check the seen BSSID list for |
848 |
-+ * |
849 |
-+ * Returns: TRUE if the given @bssid is in the seen BSSIDs list |
850 |
-+ **/ |
851 |
-+gboolean |
852 |
-+nm_settings_connection_has_seen_bssid (NMSettingsConnection *connection, |
853 |
-+ const struct ether_addr *bssid) |
854 |
-+{ |
855 |
-+ g_return_val_if_fail (connection != NULL, FALSE); |
856 |
-+ g_return_val_if_fail (NM_IS_SETTINGS_CONNECTION (connection), FALSE); |
857 |
-+ g_return_val_if_fail (bssid != NULL, FALSE); |
858 |
-+ |
859 |
-+ return !!g_hash_table_lookup (NM_SETTINGS_CONNECTION_GET_PRIVATE (connection)->seen_bssids, bssid); |
860 |
-+} |
861 |
-+ |
862 |
-+/** |
863 |
-+ * nm_settings_connection_add_seen_bssid: |
864 |
-+ * @connection: the #NMSettingsConnection |
865 |
-+ * @seen_bssid: BSSID to set into the connection and to store into |
866 |
-+ * the seen-bssids database |
867 |
-+ * |
868 |
-+ * Updates the connection and seen-bssids database with the provided BSSID. |
869 |
-+ **/ |
870 |
-+void |
871 |
-+nm_settings_connection_add_seen_bssid (NMSettingsConnection *connection, |
872 |
-+ const struct ether_addr *seen_bssid) |
873 |
-+{ |
874 |
-+ NMSettingsConnectionPrivate *priv = NM_SETTINGS_CONNECTION_GET_PRIVATE (connection); |
875 |
-+ const char *connection_uuid; |
876 |
-+ GKeyFile *seen_bssids_file; |
877 |
-+ char *data, *bssid_str; |
878 |
-+ const char **list; |
879 |
-+ gsize len; |
880 |
-+ GError *error = NULL; |
881 |
-+ GHashTableIter iter; |
882 |
-+ guint n; |
883 |
-+ |
884 |
-+ g_return_if_fail (seen_bssid != NULL); |
885 |
-+ |
886 |
-+ if (g_hash_table_lookup (priv->seen_bssids, seen_bssid)) |
887 |
-+ return; /* Already in the list */ |
888 |
-+ |
889 |
-+ /* Add the new BSSID; let the hash take ownership of the allocated BSSID string */ |
890 |
-+ bssid_str = nm_ether_ntop (seen_bssid); |
891 |
-+ g_return_if_fail (bssid_str != NULL); |
892 |
-+ g_hash_table_insert (priv->seen_bssids, mac_dup (seen_bssid), bssid_str); |
893 |
-+ |
894 |
-+ /* Build up a list of all the BSSIDs in string form */ |
895 |
-+ n = 0; |
896 |
-+ list = g_malloc0 (g_hash_table_size (priv->seen_bssids) * sizeof (char *)); |
897 |
-+ g_hash_table_iter_init (&iter, priv->seen_bssids); |
898 |
-+ while (g_hash_table_iter_next (&iter, NULL, (gpointer) &bssid_str)) |
899 |
-+ list[n++] = bssid_str; |
900 |
-+ |
901 |
-+ /* Save BSSID to seen-bssids file */ |
902 |
-+ seen_bssids_file = g_key_file_new (); |
903 |
-+ g_key_file_set_list_separator (seen_bssids_file, ','); |
904 |
-+ if (!g_key_file_load_from_file (seen_bssids_file, SETTINGS_SEEN_BSSIDS_FILE, G_KEY_FILE_KEEP_COMMENTS, &error)) { |
905 |
-+ if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) { |
906 |
-+ nm_log_warn (LOGD_SETTINGS, "error parsing seen-bssids file '%s': %s", |
907 |
-+ SETTINGS_SEEN_BSSIDS_FILE, error->message); |
908 |
-+ } |
909 |
-+ g_clear_error (&error); |
910 |
-+ } |
911 |
-+ |
912 |
-+ connection_uuid = nm_connection_get_uuid (NM_CONNECTION (connection)); |
913 |
-+ g_key_file_set_string_list (seen_bssids_file, "seen-bssids", connection_uuid, list, n); |
914 |
-+ g_free (list); |
915 |
-+ |
916 |
-+ data = g_key_file_to_data (seen_bssids_file, &len, &error); |
917 |
-+ if (data) { |
918 |
-+ g_file_set_contents (SETTINGS_SEEN_BSSIDS_FILE, data, len, &error); |
919 |
-+ g_free (data); |
920 |
-+ } |
921 |
-+ g_key_file_free (seen_bssids_file); |
922 |
-+ |
923 |
-+ if (error) { |
924 |
-+ nm_log_warn (LOGD_SETTINGS, "error saving seen-bssids to file '%s': %s", |
925 |
-+ SETTINGS_SEEN_BSSIDS_FILE, error->message); |
926 |
-+ g_error_free (error); |
927 |
-+ } |
928 |
-+} |
929 |
-+ |
930 |
-+static void |
931 |
-+add_seen_bssid_string (NMSettingsConnection *self, const char *bssid) |
932 |
-+{ |
933 |
-+ struct ether_addr mac; |
934 |
-+ |
935 |
-+ g_return_if_fail (bssid != NULL); |
936 |
-+ if (ether_aton_r (bssid, &mac)) { |
937 |
-+ g_hash_table_insert (NM_SETTINGS_CONNECTION_GET_PRIVATE (self)->seen_bssids, |
938 |
-+ mac_dup (&mac), |
939 |
-+ g_strdup (bssid)); |
940 |
-+ } |
941 |
-+} |
942 |
-+ |
943 |
-+/** |
944 |
-+ * nm_settings_connection_read_and_fill_seen_bssids: |
945 |
-+ * @connection: the #NMSettingsConnection |
946 |
-+ * |
947 |
-+ * Retrieves seen BSSIDs of the connection from database file and stores then into the |
948 |
-+ * connection private data. |
949 |
-+ **/ |
950 |
-+void |
951 |
-+nm_settings_connection_read_and_fill_seen_bssids (NMSettingsConnection *connection) |
952 |
-+{ |
953 |
-+ NMSettingsConnectionPrivate *priv = NM_SETTINGS_CONNECTION_GET_PRIVATE (connection); |
954 |
-+ const char *connection_uuid; |
955 |
-+ GKeyFile *seen_bssids_file; |
956 |
-+ char **tmp_strv = NULL; |
957 |
-+ gsize i, len = 0; |
958 |
-+ NMSettingWireless *s_wifi; |
959 |
-+ |
960 |
-+ /* Get seen BSSIDs from database file */ |
961 |
-+ seen_bssids_file = g_key_file_new (); |
962 |
-+ g_key_file_set_list_separator (seen_bssids_file, ','); |
963 |
-+ if (g_key_file_load_from_file (seen_bssids_file, SETTINGS_SEEN_BSSIDS_FILE, G_KEY_FILE_KEEP_COMMENTS, NULL)) { |
964 |
-+ connection_uuid = nm_connection_get_uuid (NM_CONNECTION (connection)); |
965 |
-+ tmp_strv = g_key_file_get_string_list (seen_bssids_file, "seen-bssids", connection_uuid, &len, NULL); |
966 |
-+ } |
967 |
-+ g_key_file_free (seen_bssids_file); |
968 |
-+ |
969 |
-+ /* Update connection's seen-bssids */ |
970 |
-+ if (tmp_strv) { |
971 |
-+ g_hash_table_remove_all (priv->seen_bssids); |
972 |
-+ for (i = 0; i < len; i++) |
973 |
-+ add_seen_bssid_string (connection, tmp_strv[i]); |
974 |
-+ g_strfreev (tmp_strv); |
975 |
-+ } else { |
976 |
-+ /* If this connection didn't have an entry in the seen-bssids database, |
977 |
-+ * maybe this is the first time we've read it in, so populate the |
978 |
-+ * seen-bssids list from the deprecated seen-bssids property of the |
979 |
-+ * wifi setting. |
980 |
-+ */ |
981 |
-+ s_wifi = nm_connection_get_setting_wireless (NM_CONNECTION (connection)); |
982 |
-+ if (s_wifi) { |
983 |
-+ len = nm_setting_wireless_get_num_seen_bssids (s_wifi); |
984 |
-+ for (i = 0; i < len; i++) |
985 |
-+ add_seen_bssid_string (connection, nm_setting_wireless_get_seen_bssid (s_wifi, i)); |
986 |
-+ } |
987 |
-+ } |
988 |
-+} |
989 |
-+ |
990 |
- /**************************************************************/ |
991 |
- |
992 |
- static void |
993 |
-@@ -1463,6 +1653,8 @@ nm_settings_connection_init (NMSettingsConnection *self) |
994 |
- self); |
995 |
- |
996 |
- priv->agent_mgr = nm_agent_manager_get (); |
997 |
-+ |
998 |
-+ priv->seen_bssids = g_hash_table_new_full (mac_hash, mac_equal, g_free, g_free); |
999 |
- } |
1000 |
- |
1001 |
- static void |
1002 |
-@@ -1490,6 +1682,8 @@ dispose (GObject *object) |
1003 |
- nm_agent_manager_cancel_secrets (priv->agent_mgr, GPOINTER_TO_UINT (iter->data)); |
1004 |
- g_slist_free (priv->reqs); |
1005 |
- |
1006 |
-+ g_hash_table_destroy (priv->seen_bssids); |
1007 |
-+ |
1008 |
- set_visible (self, FALSE); |
1009 |
- |
1010 |
- if (priv->session_changed_id) |
1011 |
-diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h |
1012 |
-index 116bfdc..af90c51 100644 |
1013 |
---- a/src/settings/nm-settings-connection.h |
1014 |
-+++ b/src/settings/nm-settings-connection.h |
1015 |
-@@ -24,6 +24,7 @@ |
1016 |
- |
1017 |
- #include <nm-connection.h> |
1018 |
- #include "nm-settings-flags.h" |
1019 |
-+#include <net/ethernet.h> |
1020 |
- |
1021 |
- G_BEGIN_DECLS |
1022 |
- |
1023 |
-@@ -124,6 +125,14 @@ void nm_settings_connection_update_timestamp (NMSettingsConnection *connection, |
1024 |
- |
1025 |
- void nm_settings_connection_read_and_fill_timestamp (NMSettingsConnection *connection); |
1026 |
- |
1027 |
-+gboolean nm_settings_connection_has_seen_bssid (NMSettingsConnection *connection, |
1028 |
-+ const struct ether_addr *bssid); |
1029 |
-+ |
1030 |
-+void nm_settings_connection_add_seen_bssid (NMSettingsConnection *connection, |
1031 |
-+ const struct ether_addr *seen_bssid); |
1032 |
-+ |
1033 |
-+void nm_settings_connection_read_and_fill_seen_bssids (NMSettingsConnection *connection); |
1034 |
-+ |
1035 |
- G_END_DECLS |
1036 |
- |
1037 |
- #endif /* NM_SETTINGS_CONNECTION_H */ |
1038 |
-diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c |
1039 |
-index e23e8d1..8329780 100644 |
1040 |
---- a/src/settings/nm-settings.c |
1041 |
-+++ b/src/settings/nm-settings.c |
1042 |
-@@ -773,6 +773,9 @@ claim_connection (NMSettings *self, |
1043 |
- /* Read timestamp from look-aside file and put it into the connection's data */ |
1044 |
- nm_settings_connection_read_and_fill_timestamp (connection); |
1045 |
- |
1046 |
-+ /* Read seen-bssids from look-aside file and put it into the connection's data */ |
1047 |
-+ nm_settings_connection_read_and_fill_seen_bssids (connection); |
1048 |
-+ |
1049 |
- /* Ensure it's initial visibility is up-to-date */ |
1050 |
- nm_settings_connection_recheck_visibility (connection); |
1051 |
- |
1052 |
--- |
1053 |
-1.7.6 |
1054 |
- |
1055 |
|
1056 |
diff --git a/net-misc/networkmanager/files/0.8.9997/0003-libnm-glib-fix-crash-for-AddAndActivateConnection-D-.patch b/net-misc/networkmanager/files/0.8.9997/0003-libnm-glib-fix-crash-for-AddAndActivateConnection-D-.patch |
1057 |
deleted file mode 100644 |
1058 |
index 8cc16c4..0000000 |
1059 |
--- a/net-misc/networkmanager/files/0.8.9997/0003-libnm-glib-fix-crash-for-AddAndActivateConnection-D-.patch |
1060 |
+++ /dev/null |
1061 |
@@ -1,29 +0,0 @@ |
1062 |
-From b4a72d1ad794aef4c623fd530fc38ceb9b95456d Mon Sep 17 00:00:00 2001 |
1063 |
-From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@××××××.com> |
1064 |
-Date: Tue, 14 Jun 2011 19:39:23 +0200 |
1065 |
-Subject: [PATCH] libnm-glib: fix crash for AddAndActivateConnection() D-Bus |
1066 |
- call (bgo #652512) |
1067 |
- |
1068 |
-When a partial connection is passed to nm_client_add_and_activate_connection(), |
1069 |
-but it doesn't contain any settings, nm_connection_to_hash() returns NULL and |
1070 |
-there's a crash later on the NULL hash. |
1071 |
---- |
1072 |
- libnm-glib/nm-client.c | 2 +- |
1073 |
- 1 files changed, 1 insertions(+), 1 deletions(-) |
1074 |
- |
1075 |
-diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c |
1076 |
-index 644af3e..752510a 100644 |
1077 |
---- a/libnm-glib/nm-client.c |
1078 |
-+++ b/libnm-glib/nm-client.c |
1079 |
-@@ -763,7 +763,7 @@ nm_client_add_and_activate_connection (NMClient *client, |
1080 |
- |
1081 |
- if (partial) |
1082 |
- hash = nm_connection_to_hash (partial, NM_SETTING_HASH_FLAG_ALL); |
1083 |
-- else |
1084 |
-+ if (!hash) |
1085 |
- hash = g_hash_table_new (g_str_hash, g_str_equal); |
1086 |
- |
1087 |
- priv = NM_CLIENT_GET_PRIVATE (client); |
1088 |
--- |
1089 |
-1.7.6 |
1090 |
- |
1091 |
|
1092 |
diff --git a/net-misc/networkmanager/files/0.8.9997/0004-policy-remove-invalid-mark-for-failed-connections-af.patch b/net-misc/networkmanager/files/0.8.9997/0004-policy-remove-invalid-mark-for-failed-connections-af.patch |
1093 |
deleted file mode 100644 |
1094 |
index f2af25e..0000000 |
1095 |
--- a/net-misc/networkmanager/files/0.8.9997/0004-policy-remove-invalid-mark-for-failed-connections-af.patch |
1096 |
+++ /dev/null |
1097 |
@@ -1,109 +0,0 @@ |
1098 |
-From fdfbe00aac3f17b19bb8d84cba1c8f210d90e8a0 Mon Sep 17 00:00:00 2001 |
1099 |
-From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@××××××.com> |
1100 |
-Date: Fri, 17 Jun 2011 12:43:28 +0200 |
1101 |
-Subject: [PATCH] policy: remove "invalid mark" for failed connections after 5 |
1102 |
- mins |
1103 |
- |
1104 |
-If there is a temporary connection failure (e.g. due to unavailable DHCP), the |
1105 |
-connection is marked as invalid after several retries. Reset the flag after |
1106 |
-5 mins to allow next auto-reconnection. |
1107 |
---- |
1108 |
- src/nm-policy.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- |
1109 |
- 1 files changed, 45 insertions(+), 2 deletions(-) |
1110 |
- |
1111 |
-diff --git a/src/nm-policy.c b/src/nm-policy.c |
1112 |
-index 3eead41..e3c899f 100644 |
1113 |
---- a/src/nm-policy.c |
1114 |
-+++ b/src/nm-policy.c |
1115 |
-@@ -66,12 +66,16 @@ struct NMPolicy { |
1116 |
- |
1117 |
- HostnameThread *lookup; |
1118 |
- |
1119 |
-+ gint reset_retries_id; /* idle handler for resetting the retries count */ |
1120 |
-+ |
1121 |
- char *orig_hostname; /* hostname at NM start time */ |
1122 |
- char *cur_hostname; /* hostname we want to assign */ |
1123 |
- }; |
1124 |
- |
1125 |
- #define RETRIES_TAG "autoconnect-retries" |
1126 |
- #define RETRIES_DEFAULT 4 |
1127 |
-+#define RESET_RETRIES_TIMESTAMP_TAG "reset-retries-timestamp-tag" |
1128 |
-+#define RESET_RETRIES_TIMER 300 |
1129 |
- |
1130 |
- static NMDevice * |
1131 |
- get_best_ip4_device (NMManager *manager, NMActRequest **out_req) |
1132 |
-@@ -870,6 +874,37 @@ schedule_activate_check (NMPolicy *policy, NMDevice *device, guint delay_seconds |
1133 |
- } |
1134 |
- } |
1135 |
- |
1136 |
-+static gboolean |
1137 |
-+reset_connections_retries (gpointer user_data) |
1138 |
-+{ |
1139 |
-+ NMPolicy *policy = (NMPolicy *) user_data; |
1140 |
-+ GSList *connections, *iter; |
1141 |
-+ time_t con_stamp, min_stamp, now; |
1142 |
-+ |
1143 |
-+ policy->reset_retries_id = 0; |
1144 |
-+ |
1145 |
-+ min_stamp = now = time (NULL); |
1146 |
-+ connections = nm_settings_get_connections (policy->settings); |
1147 |
-+ for (iter = connections; iter; iter = g_slist_next (iter)) { |
1148 |
-+ con_stamp = GPOINTER_TO_SIZE (g_object_get_data (G_OBJECT (iter->data), RESET_RETRIES_TIMESTAMP_TAG)); |
1149 |
-+ if (con_stamp == 0) |
1150 |
-+ continue; |
1151 |
-+ if (con_stamp + RESET_RETRIES_TIMER <= now) { |
1152 |
-+ set_connection_auto_retries (NM_CONNECTION (iter->data), RETRIES_DEFAULT); |
1153 |
-+ g_object_set_data (G_OBJECT (iter->data), RESET_RETRIES_TIMESTAMP_TAG, GSIZE_TO_POINTER (0)); |
1154 |
-+ continue; |
1155 |
-+ } |
1156 |
-+ if (con_stamp < min_stamp) |
1157 |
-+ min_stamp = con_stamp; |
1158 |
-+ } |
1159 |
-+ g_slist_free (connections); |
1160 |
-+ |
1161 |
-+ /* Schedule the handler again if there are some stamps left */ |
1162 |
-+ if (min_stamp != now) |
1163 |
-+ policy->reset_retries_id = g_timeout_add_seconds (RESET_RETRIES_TIMER - (now - min_stamp), reset_connections_retries, policy); |
1164 |
-+ return FALSE; |
1165 |
-+} |
1166 |
-+ |
1167 |
- static NMConnection * |
1168 |
- get_device_connection (NMDevice *device) |
1169 |
- { |
1170 |
-@@ -914,8 +949,13 @@ device_state_changed (NMDevice *device, |
1171 |
- set_connection_auto_retries (connection, tries - 1); |
1172 |
- } |
1173 |
- |
1174 |
-- if (get_connection_auto_retries (connection) == 0) |
1175 |
-+ if (get_connection_auto_retries (connection) == 0) { |
1176 |
- nm_log_info (LOGD_DEVICE, "Marking connection '%s' invalid.", nm_connection_get_id (connection)); |
1177 |
-+ /* Schedule a handler to reset retries count */ |
1178 |
-+ g_object_set_data (G_OBJECT (connection), RESET_RETRIES_TIMESTAMP_TAG, GSIZE_TO_POINTER ((gsize) time (NULL))); |
1179 |
-+ if (!policy->reset_retries_id) |
1180 |
-+ policy->reset_retries_id = g_timeout_add_seconds (RESET_RETRIES_TIMER, reset_connections_retries, policy); |
1181 |
-+ } |
1182 |
- nm_connection_clear_secrets (connection); |
1183 |
- } |
1184 |
- schedule_activate_check (policy, device, 3); |
1185 |
-@@ -938,7 +978,7 @@ device_state_changed (NMDevice *device, |
1186 |
- update_routing_and_dns (policy, FALSE); |
1187 |
- break; |
1188 |
- case NM_DEVICE_STATE_DISCONNECTED: |
1189 |
-- /* Clear INVALID_TAG when carrier on. If cable was unplugged |
1190 |
-+ /* Reset RETRIES_TAG when carrier on. If cable was unplugged |
1191 |
- * and plugged again, we should try to reconnect */ |
1192 |
- if (reason == NM_DEVICE_STATE_REASON_CARRIER && old_state == NM_DEVICE_STATE_UNAVAILABLE) |
1193 |
- reset_retries_all (policy->settings, device); |
1194 |
-@@ -1246,6 +1286,9 @@ nm_policy_destroy (NMPolicy *policy) |
1195 |
- } |
1196 |
- g_slist_free (policy->dev_ids); |
1197 |
- |
1198 |
-+ if (policy->reset_retries_id) |
1199 |
-+ g_source_remove (policy->reset_retries_id); |
1200 |
-+ |
1201 |
- g_free (policy->orig_hostname); |
1202 |
- g_free (policy->cur_hostname); |
1203 |
- |
1204 |
--- |
1205 |
-1.7.6 |
1206 |
- |
1207 |
|
1208 |
diff --git a/net-misc/networkmanager/files/0.8.9997/0005-core-connections-failed-due-to-missing-secrets-are-r.patch b/net-misc/networkmanager/files/0.8.9997/0005-core-connections-failed-due-to-missing-secrets-are-r.patch |
1209 |
deleted file mode 100644 |
1210 |
index f43cf24..0000000 |
1211 |
--- a/net-misc/networkmanager/files/0.8.9997/0005-core-connections-failed-due-to-missing-secrets-are-r.patch |
1212 |
+++ /dev/null |
1213 |
@@ -1,280 +0,0 @@ |
1214 |
-From 69b767bbf0ef8e038dd8bd0bcb35586c0f91ade7 Mon Sep 17 00:00:00 2001 |
1215 |
-From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@××××××.com> |
1216 |
-Date: Tue, 28 Jun 2011 15:48:12 +0200 |
1217 |
-Subject: [PATCH] core: connections failed due to missing secrets are re-tried |
1218 |
- when an secret agent registers (rh #706204) |
1219 |
-MIME-Version: 1.0 |
1220 |
-Content-Type: text/plain; charset=UTF-8 |
1221 |
-Content-Transfer-Encoding: 8bit |
1222 |
- |
1223 |
-Use case: |
1224 |
-A user has an auto-activatable connection with secrets in a keyring. While |
1225 |
-booting NM starts and tries to activate the connection, but it fails because of |
1226 |
-missing secrets. Then the user logs in, but the connection is marked as invalid |
1227 |
-and is not tried again. |
1228 |
- |
1229 |
-This commit solves the issue by removing invalid flag and activating the |
1230 |
-connection when a secret agent registers. |
1231 |
- |
1232 |
-Signed-off-by: Jiřà Klimeš <jklimes@××××××.com> |
1233 |
---- |
1234 |
- src/nm-policy.c | 40 +++++++++++++++++++++++++++++++++++++++ |
1235 |
- src/settings/nm-agent-manager.c | 22 +++++++++++++++++++++ |
1236 |
- src/settings/nm-agent-manager.h | 4 +++ |
1237 |
- src/settings/nm-settings.c | 25 ++++++++++++++++++++++++ |
1238 |
- src/settings/nm-settings.h | 6 ++++- |
1239 |
- 5 files changed, 96 insertions(+), 1 deletions(-) |
1240 |
- |
1241 |
-diff --git a/src/nm-policy.c b/src/nm-policy.c |
1242 |
-index e3c899f..44f5e1f 100644 |
1243 |
---- a/src/nm-policy.c |
1244 |
-+++ b/src/nm-policy.c |
1245 |
-@@ -76,6 +76,7 @@ struct NMPolicy { |
1246 |
- #define RETRIES_DEFAULT 4 |
1247 |
- #define RESET_RETRIES_TIMESTAMP_TAG "reset-retries-timestamp-tag" |
1248 |
- #define RESET_RETRIES_TIMER 300 |
1249 |
-+#define FAILURE_REASON_TAG "failure-reason" |
1250 |
- |
1251 |
- static NMDevice * |
1252 |
- get_best_ip4_device (NMManager *manager, NMActRequest **out_req) |
1253 |
-@@ -838,6 +839,23 @@ reset_retries_all (NMSettings *settings, NMDevice *device) |
1254 |
- } |
1255 |
- |
1256 |
- static void |
1257 |
-+reset_retries_for_failed_secrets (NMSettings *settings) |
1258 |
-+{ |
1259 |
-+ GSList *connections, *iter; |
1260 |
-+ |
1261 |
-+ connections = nm_settings_get_connections (settings); |
1262 |
-+ for (iter = connections; iter; iter = g_slist_next (iter)) { |
1263 |
-+ NMDeviceStateReason reason = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (iter->data), FAILURE_REASON_TAG)); |
1264 |
-+ |
1265 |
-+ if (reason == NM_DEVICE_STATE_REASON_NO_SECRETS) { |
1266 |
-+ set_connection_auto_retries (NM_CONNECTION (iter->data), RETRIES_DEFAULT); |
1267 |
-+ g_object_set_data (G_OBJECT (iter->data), FAILURE_REASON_TAG, GUINT_TO_POINTER (0)); |
1268 |
-+ } |
1269 |
-+ } |
1270 |
-+ g_slist_free (connections); |
1271 |
-+} |
1272 |
-+ |
1273 |
-+static void |
1274 |
- sleeping_changed (NMManager *manager, GParamSpec *pspec, gpointer user_data) |
1275 |
- { |
1276 |
- NMPolicy *policy = user_data; |
1277 |
-@@ -927,6 +945,9 @@ device_state_changed (NMDevice *device, |
1278 |
- NMPolicy *policy = (NMPolicy *) user_data; |
1279 |
- NMConnection *connection = get_device_connection (device); |
1280 |
- |
1281 |
-+ if (connection) |
1282 |
-+ g_object_set_data (G_OBJECT (connection), FAILURE_REASON_TAG, GUINT_TO_POINTER (0)); |
1283 |
-+ |
1284 |
- switch (new_state) { |
1285 |
- case NM_DEVICE_STATE_FAILED: |
1286 |
- /* Mark the connection invalid if it failed during activation so that |
1287 |
-@@ -941,6 +962,11 @@ device_state_changed (NMDevice *device, |
1288 |
- * automatically retrying because it's just going to fail anyway. |
1289 |
- */ |
1290 |
- set_connection_auto_retries (connection, 0); |
1291 |
-+ |
1292 |
-+ /* Mark the connection as failed due to missing secrets so that we can reset |
1293 |
-+ * RETRIES_TAG and automatically re-try when an secret agent registers. |
1294 |
-+ */ |
1295 |
-+ g_object_set_data (G_OBJECT (connection), FAILURE_REASON_TAG, GUINT_TO_POINTER (NM_DEVICE_STATE_REASON_NO_SECRETS)); |
1296 |
- } else if (tries > 0) { |
1297 |
- /* Otherwise if it's a random failure, just decrease the number |
1298 |
- * of automatic retries so that the connection gets tried again |
1299 |
-@@ -1173,6 +1199,19 @@ connection_visibility_changed (NMSettings *settings, |
1300 |
- } |
1301 |
- |
1302 |
- static void |
1303 |
-+secret_agent_registered (NMSettings *settings, |
1304 |
-+ NMSecretAgent *agent, |
1305 |
-+ gpointer user_data) |
1306 |
-+{ |
1307 |
-+ /* The registered secret agent may provide some missing secrets. Thus we |
1308 |
-+ * reset retries count here and schedule activation, so that the |
1309 |
-+ * connections failed due to missing secrets may re-try auto-connection. |
1310 |
-+ */ |
1311 |
-+ reset_retries_for_failed_secrets (settings); |
1312 |
-+ schedule_activate_all ((NMPolicy *) user_data); |
1313 |
-+} |
1314 |
-+ |
1315 |
-+static void |
1316 |
- _connect_manager_signal (NMPolicy *policy, const char *name, gpointer callback) |
1317 |
- { |
1318 |
- guint id; |
1319 |
-@@ -1240,6 +1279,7 @@ nm_policy_new (NMManager *manager, |
1320 |
- _connect_settings_signal (policy, NM_SETTINGS_SIGNAL_CONNECTION_REMOVED, connection_removed); |
1321 |
- _connect_settings_signal (policy, NM_SETTINGS_SIGNAL_CONNECTION_VISIBILITY_CHANGED, |
1322 |
- connection_visibility_changed); |
1323 |
-+ _connect_settings_signal (policy, NM_SETTINGS_SIGNAL_AGENT_REGISTERED, secret_agent_registered); |
1324 |
- |
1325 |
- /* Initialize connections' auto-retries */ |
1326 |
- reset_retries_all (policy->settings, NULL); |
1327 |
-diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c |
1328 |
-index 9b9e189..1693ae2 100644 |
1329 |
---- a/src/settings/nm-agent-manager.c |
1330 |
-+++ b/src/settings/nm-agent-manager.c |
1331 |
-@@ -57,6 +57,14 @@ typedef struct { |
1332 |
- GHashTable *requests; |
1333 |
- } NMAgentManagerPrivate; |
1334 |
- |
1335 |
-+enum { |
1336 |
-+ AGENT_REGISTERED, |
1337 |
-+ |
1338 |
-+ LAST_SIGNAL |
1339 |
-+}; |
1340 |
-+static guint signals[LAST_SIGNAL] = { 0 }; |
1341 |
-+ |
1342 |
-+ |
1343 |
- typedef struct _Request Request; |
1344 |
- |
1345 |
- static void request_add_agent (Request *req, |
1346 |
-@@ -277,6 +285,9 @@ impl_agent_manager_register (NMAgentManager *self, |
1347 |
- nm_secret_agent_get_description (agent)); |
1348 |
- dbus_g_method_return (context); |
1349 |
- |
1350 |
-+ /* Signal an agent was registered */ |
1351 |
-+ g_signal_emit (self, signals[AGENT_REGISTERED], 0, agent); |
1352 |
-+ |
1353 |
- /* Add this agent to any in-progress secrets requests */ |
1354 |
- g_hash_table_iter_init (&iter, priv->requests); |
1355 |
- while (g_hash_table_iter_next (&iter, NULL, &data)) |
1356 |
-@@ -1363,6 +1374,17 @@ nm_agent_manager_class_init (NMAgentManagerClass *agent_manager_class) |
1357 |
- /* virtual methods */ |
1358 |
- object_class->dispose = dispose; |
1359 |
- |
1360 |
-+ /* Signals */ |
1361 |
-+ signals[AGENT_REGISTERED] = |
1362 |
-+ g_signal_new ("agent-registered", |
1363 |
-+ G_OBJECT_CLASS_TYPE (object_class), |
1364 |
-+ G_SIGNAL_RUN_FIRST, |
1365 |
-+ G_STRUCT_OFFSET (NMAgentManagerClass, agent_registered), |
1366 |
-+ NULL, NULL, |
1367 |
-+ g_cclosure_marshal_VOID__OBJECT, |
1368 |
-+ G_TYPE_NONE, 1, |
1369 |
-+ G_TYPE_OBJECT); |
1370 |
-+ |
1371 |
- dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (agent_manager_class), |
1372 |
- &dbus_glib_nm_agent_manager_object_info); |
1373 |
- |
1374 |
-diff --git a/src/settings/nm-agent-manager.h b/src/settings/nm-agent-manager.h |
1375 |
-index 788a917..287413a 100644 |
1376 |
---- a/src/settings/nm-agent-manager.h |
1377 |
-+++ b/src/settings/nm-agent-manager.h |
1378 |
-@@ -25,6 +25,7 @@ |
1379 |
- #include <glib-object.h> |
1380 |
- #include <nm-connection.h> |
1381 |
- #include "nm-settings-flags.h" |
1382 |
-+#include "nm-secret-agent.h" |
1383 |
- |
1384 |
- #define NM_TYPE_AGENT_MANAGER (nm_agent_manager_get_type ()) |
1385 |
- #define NM_AGENT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_AGENT_MANAGER, NMAgentManager)) |
1386 |
-@@ -39,6 +40,9 @@ typedef struct { |
1387 |
- |
1388 |
- typedef struct { |
1389 |
- GObjectClass parent; |
1390 |
-+ |
1391 |
-+ /* Signals */ |
1392 |
-+ void (*agent_registered) (NMAgentManager *agent_mgr, NMSecretAgent *agent); |
1393 |
- } NMAgentManagerClass; |
1394 |
- |
1395 |
- GType nm_agent_manager_get_type (void); |
1396 |
-diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c |
1397 |
-index 8329780..733e914 100644 |
1398 |
---- a/src/settings/nm-settings.c |
1399 |
-+++ b/src/settings/nm-settings.c |
1400 |
-@@ -135,6 +135,7 @@ enum { |
1401 |
- CONNECTION_REMOVED, |
1402 |
- CONNECTION_VISIBILITY_CHANGED, |
1403 |
- CONNECTIONS_LOADED, |
1404 |
-+ AGENT_REGISTERED, |
1405 |
- |
1406 |
- NEW_CONNECTION, /* exported, not used internally */ |
1407 |
- LAST_SIGNAL |
1408 |
-@@ -699,6 +700,18 @@ connection_visibility_changed (NMSettingsConnection *connection, |
1409 |
- connection); |
1410 |
- } |
1411 |
- |
1412 |
-+static void |
1413 |
-+secret_agent_registered (NMAgentManager *agent_mgr, |
1414 |
-+ NMSecretAgent *agent, |
1415 |
-+ gpointer user_data) |
1416 |
-+{ |
1417 |
-+ /* Re-emit for listeners like NMPolicy */ |
1418 |
-+ g_signal_emit (NM_SETTINGS (user_data), |
1419 |
-+ signals[AGENT_REGISTERED], |
1420 |
-+ 0, |
1421 |
-+ agent); |
1422 |
-+} |
1423 |
-+ |
1424 |
- #define NM_DBUS_SERVICE_OPENCONNECT "org.freedesktop.NetworkManager.openconnect" |
1425 |
- #define NM_OPENCONNECT_KEY_GATEWAY "gateway" |
1426 |
- #define NM_OPENCONNECT_KEY_COOKIE "cookie" |
1427 |
-@@ -1530,6 +1543,8 @@ nm_settings_init (NMSettings *self) |
1428 |
- * recreated often. |
1429 |
- */ |
1430 |
- priv->agent_mgr = nm_agent_manager_get (); |
1431 |
-+ |
1432 |
-+ g_signal_connect (priv->agent_mgr, "agent-registered", G_CALLBACK (secret_agent_registered), self); |
1433 |
- } |
1434 |
- |
1435 |
- static void |
1436 |
-@@ -1693,6 +1708,16 @@ nm_settings_class_init (NMSettingsClass *class) |
1437 |
- g_cclosure_marshal_VOID__VOID, |
1438 |
- G_TYPE_NONE, 0); |
1439 |
- |
1440 |
-+ signals[AGENT_REGISTERED] = |
1441 |
-+ g_signal_new (NM_SETTINGS_SIGNAL_AGENT_REGISTERED, |
1442 |
-+ G_OBJECT_CLASS_TYPE (object_class), |
1443 |
-+ G_SIGNAL_RUN_FIRST, |
1444 |
-+ G_STRUCT_OFFSET (NMSettingsClass, agent_registered), |
1445 |
-+ NULL, NULL, |
1446 |
-+ g_cclosure_marshal_VOID__OBJECT, |
1447 |
-+ G_TYPE_NONE, 1, G_TYPE_OBJECT); |
1448 |
-+ |
1449 |
-+ |
1450 |
- signals[NEW_CONNECTION] = |
1451 |
- g_signal_new ("new-connection", |
1452 |
- G_OBJECT_CLASS_TYPE (object_class), |
1453 |
-diff --git a/src/settings/nm-settings.h b/src/settings/nm-settings.h |
1454 |
-index a5cb4d7..66d41cc 100644 |
1455 |
---- a/src/settings/nm-settings.h |
1456 |
-+++ b/src/settings/nm-settings.h |
1457 |
-@@ -19,7 +19,7 @@ |
1458 |
- * with this program; if not, write to the Free Software Foundation, Inc., |
1459 |
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
1460 |
- * |
1461 |
-- * (C) Copyright 2007 - 2010 Red Hat, Inc. |
1462 |
-+ * (C) Copyright 2007 - 2011 Red Hat, Inc. |
1463 |
- * (C) Copyright 2008 Novell, Inc. |
1464 |
- */ |
1465 |
- |
1466 |
-@@ -31,6 +31,7 @@ |
1467 |
- #include "nm-settings-connection.h" |
1468 |
- #include "nm-system-config-interface.h" |
1469 |
- #include "nm-device.h" |
1470 |
-+#include "nm-secret-agent.h" |
1471 |
- |
1472 |
- #define NM_TYPE_SETTINGS (nm_settings_get_type ()) |
1473 |
- #define NM_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTINGS, NMSettings)) |
1474 |
-@@ -48,6 +49,7 @@ |
1475 |
- #define NM_SETTINGS_SIGNAL_CONNECTION_REMOVED "connection-removed" |
1476 |
- #define NM_SETTINGS_SIGNAL_CONNECTION_VISIBILITY_CHANGED "connection-visibility-changed" |
1477 |
- #define NM_SETTINGS_SIGNAL_CONNECTIONS_LOADED "connections-loaded" |
1478 |
-+#define NM_SETTINGS_SIGNAL_AGENT_REGISTERED "agent-registered" |
1479 |
- |
1480 |
- typedef struct { |
1481 |
- GObject parent_instance; |
1482 |
-@@ -68,6 +70,8 @@ typedef struct { |
1483 |
- void (*connection_visibility_changed) (NMSettings *self, NMSettingsConnection *connection); |
1484 |
- |
1485 |
- void (*connections_loaded) (NMSettings *self); |
1486 |
-+ |
1487 |
-+ void (*agent_registered) (NMSettings *self, NMSecretAgent *agent); |
1488 |
- } NMSettingsClass; |
1489 |
- |
1490 |
- GType nm_settings_get_type (void); |
1491 |
--- |
1492 |
-1.7.6 |
1493 |
- |
1494 |
|
1495 |
diff --git a/net-misc/networkmanager/files/0.8.9997/0006-settings-do-not-crash-on-GetSecrets-in-case-of-missi.patch b/net-misc/networkmanager/files/0.8.9997/0006-settings-do-not-crash-on-GetSecrets-in-case-of-missi.patch |
1496 |
deleted file mode 100644 |
1497 |
index b01842f..0000000 |
1498 |
--- a/net-misc/networkmanager/files/0.8.9997/0006-settings-do-not-crash-on-GetSecrets-in-case-of-missi.patch |
1499 |
+++ /dev/null |
1500 |
@@ -1,29 +0,0 @@ |
1501 |
-From 5b650f9ae3c5a2972b0b018b8b75d02d815f2c3a Mon Sep 17 00:00:00 2001 |
1502 |
-From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@××××××.com> |
1503 |
-Date: Thu, 7 Jul 2011 12:51:22 +0200 |
1504 |
-Subject: [PATCH] settings: do not crash on GetSecrets() in case of missing |
1505 |
- secrets |
1506 |
- |
1507 |
-When secrets are flagged as agent-owned in a connection configuration file, but |
1508 |
-actually not available, we have to return an empty hash (nm_connection_to_hash() |
1509 |
-returns NULL). |
1510 |
---- |
1511 |
- src/settings/nm-settings-connection.c | 2 ++ |
1512 |
- 1 files changed, 2 insertions(+), 0 deletions(-) |
1513 |
- |
1514 |
-diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c |
1515 |
-index a14b159..f0f9c1a 100644 |
1516 |
---- a/src/settings/nm-settings-connection.c |
1517 |
-+++ b/src/settings/nm-settings-connection.c |
1518 |
-@@ -1339,6 +1339,8 @@ dbus_get_agent_secrets_cb (NMSettingsConnection *self, |
1519 |
- update_secrets_cache (self); |
1520 |
- |
1521 |
- hash = nm_connection_to_hash (NM_CONNECTION (self), NM_SETTING_HASH_FLAG_ONLY_SECRETS); |
1522 |
-+ if (!hash) |
1523 |
-+ hash = g_hash_table_new (NULL, NULL); |
1524 |
- dbus_g_method_return (context, hash); |
1525 |
- g_hash_table_destroy (hash); |
1526 |
- } |
1527 |
--- |
1528 |
-1.7.6 |
1529 |
- |
1530 |
|
1531 |
diff --git a/net-misc/networkmanager/files/0.8.9997/0007-keyfile-distinguish-better-between-string-x-int-list.patch b/net-misc/networkmanager/files/0.8.9997/0007-keyfile-distinguish-better-between-string-x-int-list.patch |
1532 |
deleted file mode 100644 |
1533 |
index 4206df1..0000000 |
1534 |
--- a/net-misc/networkmanager/files/0.8.9997/0007-keyfile-distinguish-better-between-string-x-int-list.patch |
1535 |
+++ /dev/null |
1536 |
@@ -1,70 +0,0 @@ |
1537 |
-From 30c41a4b800408150edcca9047a3996fa1d6ae68 Mon Sep 17 00:00:00 2001 |
1538 |
-From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@××××××.com> |
1539 |
-Date: Thu, 7 Jul 2011 15:25:11 +0200 |
1540 |
-Subject: [PATCH] keyfile: distinguish better between string x int list |
1541 |
- formats (bgo #649422) |
1542 |
- |
1543 |
-This commit enhances get_uchar_array() to better differentiate between string |
1544 |
-ad integer list formats. This allows using ';' character in SSIDs. |
1545 |
---- |
1546 |
- src/settings/plugins/keyfile/reader.c | 28 +++++++++++++--------------- |
1547 |
- 1 files changed, 13 insertions(+), 15 deletions(-) |
1548 |
- |
1549 |
-diff --git a/src/settings/plugins/keyfile/reader.c b/src/settings/plugins/keyfile/reader.c |
1550 |
-index 4b28965..7da6e1a 100644 |
1551 |
---- a/src/settings/plugins/keyfile/reader.c |
1552 |
-+++ b/src/settings/plugins/keyfile/reader.c |
1553 |
-@@ -16,7 +16,7 @@ |
1554 |
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
1555 |
- * |
1556 |
- * Copyright (C) 2008 - 2009 Novell, Inc. |
1557 |
-- * Copyright (C) 2008 - 2010 Red Hat, Inc. |
1558 |
-+ * Copyright (C) 2008 - 2011 Red Hat, Inc. |
1559 |
- */ |
1560 |
- |
1561 |
- #include <errno.h> |
1562 |
-@@ -736,29 +736,27 @@ get_uchar_array (GKeyFile *keyfile, |
1563 |
- const char *key) |
1564 |
- { |
1565 |
- GByteArray *array = NULL; |
1566 |
-- char *p, *tmp_string; |
1567 |
-+ char *tmp_string; |
1568 |
- gint *tmp_list; |
1569 |
- gsize length; |
1570 |
- int i; |
1571 |
- |
1572 |
-- /* New format: just a string. We try parsing the new format if there are |
1573 |
-- * no ';' in the string or it's not just numbers. |
1574 |
-+ /* New format: just a string |
1575 |
-+ * Old format: integer list; e.g. 11;25;38 |
1576 |
- */ |
1577 |
-- p = tmp_string = g_key_file_get_string (keyfile, setting_name, key, NULL); |
1578 |
-+ tmp_string = g_key_file_get_string (keyfile, setting_name, key, NULL); |
1579 |
- if (tmp_string) { |
1580 |
- gboolean new_format = FALSE; |
1581 |
-+ GRegex *regex; |
1582 |
-+ GMatchInfo *match_info; |
1583 |
-+ const char *pattern = "^[[:space:]]*[[:digit:]]+[[:space:]]*(;[[:space:]]*[[:digit:]]+[[:space:]]*)*(;[[:space:]]*)?$"; |
1584 |
- |
1585 |
-- if (strchr (p, ';') == NULL) |
1586 |
-- new_format = TRUE; |
1587 |
-- else { |
1588 |
-+ regex = g_regex_new (pattern, 0, 0, NULL); |
1589 |
-+ g_regex_match (regex, tmp_string, 0, &match_info); |
1590 |
-+ if (!g_match_info_matches (match_info)) |
1591 |
- new_format = TRUE; |
1592 |
-- while (p && *p) { |
1593 |
-- if (!isdigit (*p++)) { |
1594 |
-- new_format = FALSE; |
1595 |
-- break; |
1596 |
-- } |
1597 |
-- } |
1598 |
-- } |
1599 |
-+ g_match_info_free (match_info); |
1600 |
-+ g_regex_unref (regex); |
1601 |
- |
1602 |
- if (new_format) { |
1603 |
- array = g_byte_array_sized_new (strlen (tmp_string)); |
1604 |
--- |
1605 |
-1.7.6 |
1606 |
- |
1607 |
|
1608 |
diff --git a/net-misc/networkmanager/files/0.8.9997/0008-keyfile-fix-integer-list-SSID-parsing-after-30c41a4b.patch b/net-misc/networkmanager/files/0.8.9997/0008-keyfile-fix-integer-list-SSID-parsing-after-30c41a4b.patch |
1609 |
deleted file mode 100644 |
1610 |
index b4e0ef0..0000000 |
1611 |
--- a/net-misc/networkmanager/files/0.8.9997/0008-keyfile-fix-integer-list-SSID-parsing-after-30c41a4b.patch |
1612 |
+++ /dev/null |
1613 |
@@ -1,211 +0,0 @@ |
1614 |
-From 9cdc5021ab0b94dbf1a0d1994bc2e5ba4049caf9 Mon Sep 17 00:00:00 2001 |
1615 |
-From: Dan Williams <dcbw@××××××.com> |
1616 |
-Date: Wed, 20 Jul 2011 17:44:14 -0500 |
1617 |
-Subject: [PATCH 1/2] keyfile: fix integer list SSID parsing after |
1618 |
- 30c41a4b800408150edcca9047a3996fa1d6ae68 |
1619 |
- |
1620 |
-The regex was capturing integers larger than 3 digits, which aren't |
1621 |
-valid SSID integer list items because each byte of the SSID cannot be |
1622 |
-larger than 255. Add an explicit testcase for intlist SSIDs too. |
1623 |
-The previous regex was causing a testcase failure with an SSID of |
1624 |
-'1337' which it was interpreting as a single element intlist, but |
1625 |
-should have been interpreted as a string since it's clear > 255. |
1626 |
---- |
1627 |
- src/settings/plugins/keyfile/reader.c | 2 +- |
1628 |
- .../plugins/keyfile/tests/keyfiles/Makefile.am | 1 + |
1629 |
- .../keyfile/tests/keyfiles/Test_Intlist_SSID | 11 ++ |
1630 |
- src/settings/plugins/keyfile/tests/test-keyfile.c | 128 ++++++++++++++++++++ |
1631 |
- 4 files changed, 141 insertions(+), 1 deletions(-) |
1632 |
- create mode 100644 src/settings/plugins/keyfile/tests/keyfiles/Test_Intlist_SSID |
1633 |
- |
1634 |
-diff --git a/src/settings/plugins/keyfile/reader.c b/src/settings/plugins/keyfile/reader.c |
1635 |
-index 7da6e1a..c4136e0 100644 |
1636 |
---- a/src/settings/plugins/keyfile/reader.c |
1637 |
-+++ b/src/settings/plugins/keyfile/reader.c |
1638 |
-@@ -749,7 +749,7 @@ get_uchar_array (GKeyFile *keyfile, |
1639 |
- gboolean new_format = FALSE; |
1640 |
- GRegex *regex; |
1641 |
- GMatchInfo *match_info; |
1642 |
-- const char *pattern = "^[[:space:]]*[[:digit:]]+[[:space:]]*(;[[:space:]]*[[:digit:]]+[[:space:]]*)*(;[[:space:]]*)?$"; |
1643 |
-+ const char *pattern = "^[[:space:]]*[[:digit:]]{1,3}[[:space:]]*(;[[:space:]]*[[:digit:]]{1,3}[[:space:]]*)*(;[[:space:]]*)?$"; |
1644 |
- |
1645 |
- regex = g_regex_new (pattern, 0, 0, NULL); |
1646 |
- g_regex_match (regex, tmp_string, 0, &match_info); |
1647 |
-diff --git a/src/settings/plugins/keyfile/tests/keyfiles/Makefile.am b/src/settings/plugins/keyfile/tests/keyfiles/Makefile.am |
1648 |
-index ce5ff99..302db86 100644 |
1649 |
---- a/src/settings/plugins/keyfile/tests/keyfiles/Makefile.am |
1650 |
-+++ b/src/settings/plugins/keyfile/tests/keyfiles/Makefile.am |
1651 |
-@@ -7,6 +7,7 @@ KEYFILES = \ |
1652 |
- ATT_Data_Connect_BT \ |
1653 |
- ATT_Data_Connect_Plain \ |
1654 |
- Test_String_SSID \ |
1655 |
-+ Test_Intlist_SSID \ |
1656 |
- Test_Wired_TLS_Old \ |
1657 |
- Test_Wired_TLS_New \ |
1658 |
- Test_Wired_TLS_Blob \ |
1659 |
-diff --git a/src/settings/plugins/keyfile/tests/keyfiles/Test_Intlist_SSID b/src/settings/plugins/keyfile/tests/keyfiles/Test_Intlist_SSID |
1660 |
-new file mode 100644 |
1661 |
-index 0000000..6d2bc0f |
1662 |
---- /dev/null |
1663 |
-+++ b/src/settings/plugins/keyfile/tests/keyfiles/Test_Intlist_SSID |
1664 |
-@@ -0,0 +1,11 @@ |
1665 |
-+[connection] |
1666 |
-+id=Test |
1667 |
-+uuid=2f962388-e5f3-45af-a62c-ac220b8f7baa |
1668 |
-+type=802-11-wireless |
1669 |
-+ |
1670 |
-+[802-11-wireless] |
1671 |
-+ssid=98;108;97;104;49;50;51;52; |
1672 |
-+ |
1673 |
-+[ipv4] |
1674 |
-+method=auto |
1675 |
-+ |
1676 |
-diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c |
1677 |
-index 6cdd198..3bbaaae 100644 |
1678 |
---- a/src/settings/plugins/keyfile/tests/test-keyfile.c |
1679 |
-+++ b/src/settings/plugins/keyfile/tests/test-keyfile.c |
1680 |
-@@ -1438,6 +1438,131 @@ test_write_string_ssid (void) |
1681 |
- g_object_unref (connection); |
1682 |
- } |
1683 |
- |
1684 |
-+#define TEST_INTLIST_SSID_FILE TEST_KEYFILES_DIR"/Test_Intlist_SSID" |
1685 |
-+ |
1686 |
-+static void |
1687 |
-+test_read_intlist_ssid (void) |
1688 |
-+{ |
1689 |
-+ NMConnection *connection; |
1690 |
-+ NMSettingWireless *s_wifi; |
1691 |
-+ GError *error = NULL; |
1692 |
-+ gboolean success; |
1693 |
-+ const GByteArray *array; |
1694 |
-+ const char *expected_ssid = "blah1234"; |
1695 |
-+ |
1696 |
-+ connection = nm_keyfile_plugin_connection_from_file (TEST_INTLIST_SSID_FILE, &error); |
1697 |
-+ g_assert_no_error (error); |
1698 |
-+ g_assert (connection); |
1699 |
-+ |
1700 |
-+ success = nm_connection_verify (connection, &error); |
1701 |
-+ g_assert_no_error (error); |
1702 |
-+ g_assert (success); |
1703 |
-+ |
1704 |
-+ /* SSID */ |
1705 |
-+ s_wifi = nm_connection_get_setting_wireless (connection); |
1706 |
-+ g_assert (s_wifi); |
1707 |
-+ |
1708 |
-+ array = nm_setting_wireless_get_ssid (s_wifi); |
1709 |
-+ g_assert (array != NULL); |
1710 |
-+ g_assert_cmpint (array->len, ==, strlen (expected_ssid)); |
1711 |
-+ g_assert_cmpint (memcmp (array->data, expected_ssid, strlen (expected_ssid)), ==, 0); |
1712 |
-+ |
1713 |
-+ g_object_unref (connection); |
1714 |
-+} |
1715 |
-+ |
1716 |
-+static void |
1717 |
-+test_write_intlist_ssid (void) |
1718 |
-+{ |
1719 |
-+ NMConnection *connection; |
1720 |
-+ NMSettingConnection *s_con; |
1721 |
-+ NMSettingWireless *s_wifi; |
1722 |
-+ NMSettingIP4Config *s_ip4; |
1723 |
-+ char *uuid, *testfile = NULL; |
1724 |
-+ GByteArray *ssid; |
1725 |
-+ unsigned char tmpssid[] = { 65, 49, 50, 51, 0, 50, 50 }; |
1726 |
-+ gboolean success; |
1727 |
-+ NMConnection *reread; |
1728 |
-+ GError *error = NULL; |
1729 |
-+ pid_t owner_grp; |
1730 |
-+ uid_t owner_uid; |
1731 |
-+ GKeyFile *keyfile; |
1732 |
-+ gint *intlist; |
1733 |
-+ gsize len = 0, i; |
1734 |
-+ |
1735 |
-+ connection = nm_connection_new (); |
1736 |
-+ g_assert (connection); |
1737 |
-+ |
1738 |
-+ /* Connection setting */ |
1739 |
-+ |
1740 |
-+ s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ()); |
1741 |
-+ g_assert (s_con); |
1742 |
-+ nm_connection_add_setting (connection, NM_SETTING (s_con)); |
1743 |
-+ |
1744 |
-+ uuid = nm_utils_uuid_generate (); |
1745 |
-+ g_object_set (s_con, |
1746 |
-+ NM_SETTING_CONNECTION_ID, "Intlist SSID Test", |
1747 |
-+ NM_SETTING_CONNECTION_UUID, uuid, |
1748 |
-+ NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME, |
1749 |
-+ NULL); |
1750 |
-+ g_free (uuid); |
1751 |
-+ |
1752 |
-+ /* Wireless setting */ |
1753 |
-+ s_wifi = NM_SETTING_WIRELESS (nm_setting_wireless_new ()); |
1754 |
-+ g_assert (s_wifi); |
1755 |
-+ nm_connection_add_setting (connection, NM_SETTING (s_wifi)); |
1756 |
-+ |
1757 |
-+ ssid = g_byte_array_sized_new (sizeof (tmpssid)); |
1758 |
-+ g_byte_array_append (ssid, &tmpssid[0], sizeof (tmpssid)); |
1759 |
-+ g_object_set (s_wifi, NM_SETTING_WIRELESS_SSID, ssid, NULL); |
1760 |
-+ g_byte_array_free (ssid, TRUE); |
1761 |
-+ |
1762 |
-+ /* IP4 setting */ |
1763 |
-+ s_ip4 = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new ()); |
1764 |
-+ g_assert (s_ip4); |
1765 |
-+ nm_connection_add_setting (connection, NM_SETTING (s_ip4)); |
1766 |
-+ g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); |
1767 |
-+ |
1768 |
-+ /* Write out the connection */ |
1769 |
-+ owner_uid = geteuid (); |
1770 |
-+ owner_grp = getegid (); |
1771 |
-+ success = nm_keyfile_plugin_write_test_connection (connection, TEST_SCRATCH_DIR, owner_uid, owner_grp, &testfile, &error); |
1772 |
-+ g_assert_no_error (error); |
1773 |
-+ g_assert (success); |
1774 |
-+ g_assert (testfile != NULL); |
1775 |
-+ |
1776 |
-+ /* Ensure the SSID was written out as an int list */ |
1777 |
-+ keyfile = g_key_file_new (); |
1778 |
-+ success = g_key_file_load_from_file (keyfile, testfile, 0, &error); |
1779 |
-+ g_assert_no_error (error); |
1780 |
-+ g_assert (success); |
1781 |
-+ |
1782 |
-+ intlist = g_key_file_get_integer_list (keyfile, NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_SSID, &len, &error); |
1783 |
-+ g_assert_no_error (error); |
1784 |
-+ g_assert (intlist); |
1785 |
-+ g_assert_cmpint (len, ==, sizeof (tmpssid)); |
1786 |
-+ |
1787 |
-+ for (i = 0; i < len; i++) |
1788 |
-+ g_assert_cmpint (intlist[i], ==, tmpssid[i]); |
1789 |
-+ g_free (intlist); |
1790 |
-+ |
1791 |
-+ g_key_file_free (keyfile); |
1792 |
-+ |
1793 |
-+ /* Read the connection back in and compare it to the one we just wrote out */ |
1794 |
-+ reread = nm_keyfile_plugin_connection_from_file (testfile, &error); |
1795 |
-+ g_assert_no_error (error); |
1796 |
-+ g_assert (reread); |
1797 |
-+ |
1798 |
-+ success = nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT); |
1799 |
-+ g_assert (success); |
1800 |
-+ |
1801 |
-+ g_clear_error (&error); |
1802 |
-+ unlink (testfile); |
1803 |
-+ g_free (testfile); |
1804 |
-+ |
1805 |
-+ g_object_unref (reread); |
1806 |
-+ g_object_unref (connection); |
1807 |
-+} |
1808 |
-+ |
1809 |
- #define TEST_BT_DUN_FILE TEST_KEYFILES_DIR"/ATT_Data_Connect_BT" |
1810 |
- |
1811 |
- static void |
1812 |
-@@ -2488,6 +2613,9 @@ int main (int argc, char **argv) |
1813 |
- test_read_string_ssid (); |
1814 |
- test_write_string_ssid (); |
1815 |
- |
1816 |
-+ test_read_intlist_ssid (); |
1817 |
-+ test_write_intlist_ssid (); |
1818 |
-+ |
1819 |
- test_read_bt_dun_connection (); |
1820 |
- test_write_bt_dun_connection (); |
1821 |
- |
1822 |
--- |
1823 |
-1.7.6 |
1824 |
- |
1825 |
|
1826 |
diff --git a/net-misc/networkmanager/files/0.8.9997/0009-libnm-util-default-to-allowing-IPv6-connections-to-f.patch b/net-misc/networkmanager/files/0.8.9997/0009-libnm-util-default-to-allowing-IPv6-connections-to-f.patch |
1827 |
deleted file mode 100644 |
1828 |
index 4a3c6fc..0000000 |
1829 |
--- a/net-misc/networkmanager/files/0.8.9997/0009-libnm-util-default-to-allowing-IPv6-connections-to-f.patch |
1830 |
+++ /dev/null |
1831 |
@@ -1,32 +0,0 @@ |
1832 |
-From 36db194ae95e35cc7b8f431ab984780dea24656d Mon Sep 17 00:00:00 2001 |
1833 |
-From: Mathieu Trudel-Lapierre <mathieu.tl@×××××.com> |
1834 |
-Date: Wed, 20 Jul 2011 23:56:48 -0500 |
1835 |
-Subject: [PATCH 2/2] libnm-util: default to allowing IPv6 connections to fail |
1836 |
- |
1837 |
-Allow IPv6 connections to fail by changing the default value of the may-fail |
1838 |
-property for ipv6 settings to TRUE. |
1839 |
- |
1840 |
-This makes sure connections created manually using nm-connection-editor |
1841 |
-will default to having the "Require ..." checkbox unchecked; in other words, |
1842 |
-IPv6 timing out will still allow the interface to be configured if |
1843 |
-IPv4 succeeds. |
1844 |
---- |
1845 |
- libnm-util/nm-setting-ip6-config.c | 2 +- |
1846 |
- 1 files changed, 1 insertions(+), 1 deletions(-) |
1847 |
- |
1848 |
-diff --git a/libnm-util/nm-setting-ip6-config.c b/libnm-util/nm-setting-ip6-config.c |
1849 |
-index e911639..4dc8f46 100644 |
1850 |
---- a/libnm-util/nm-setting-ip6-config.c |
1851 |
-+++ b/libnm-util/nm-setting-ip6-config.c |
1852 |
-@@ -1056,7 +1056,7 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class) |
1853 |
- "this property to TRUE allows the overall network " |
1854 |
- "configuration to succeed if IPv6 configuration " |
1855 |
- "fails but IPv4 configuration completes successfully.", |
1856 |
-- FALSE, |
1857 |
-+ TRUE, |
1858 |
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE)); |
1859 |
- } |
1860 |
- |
1861 |
--- |
1862 |
-1.7.6 |
1863 |
- |
1864 |
|
1865 |
diff --git a/net-misc/networkmanager/files/networkmanager-fix-tests.patch b/net-misc/networkmanager/files/networkmanager-fix-tests.patch |
1866 |
deleted file mode 100644 |
1867 |
index 7bd8a2b..0000000 |
1868 |
--- a/net-misc/networkmanager/files/networkmanager-fix-tests.patch |
1869 |
+++ /dev/null |
1870 |
@@ -1,18 +0,0 @@ |
1871 |
---- configure.ac |
1872 |
-+++ configure.ac |
1873 |
-@@ -577,7 +577,6 @@ |
1874 |
- src/settings/plugins/ifupdown/Makefile |
1875 |
- src/settings/plugins/ifupdown/tests/Makefile |
1876 |
- src/settings/plugins/ifnet/Makefile |
1877 |
--src/settings/plugins/ifnet/tests/Makefile |
1878 |
- src/settings/plugins/ifcfg-rh/Makefile |
1879 |
- src/settings/plugins/ifcfg-rh/tests/Makefile |
1880 |
- src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile |
1881 |
---- src/settings/plugins/ifnet/Makefile.am |
1882 |
-+++ src/settings/plugins/ifnet/Makefile.am |
1883 |
-@@ -1,4 +1,4 @@ |
1884 |
--SUBDIRS = . tests |
1885 |
-+SUBDIRS = . |
1886 |
- INCLUDES = \ |
1887 |
- -I$(top_srcdir)/src/settings \ |
1888 |
- -I$(top_srcdir)/include \ |
1889 |
|
1890 |
diff --git a/net-misc/networkmanager/files/nm-system-settings.conf b/net-misc/networkmanager/files/nm-system-settings.conf |
1891 |
deleted file mode 100644 |
1892 |
index 4d14ee7..0000000 |
1893 |
--- a/net-misc/networkmanager/files/nm-system-settings.conf |
1894 |
+++ /dev/null |
1895 |
@@ -1,6 +0,0 @@ |
1896 |
-[main] |
1897 |
-plugins=ifnet,keyfile |
1898 |
- |
1899 |
-[ifnet] |
1900 |
-managed=true |
1901 |
-auto_refresh=false |
1902 |
|
1903 |
diff --git a/net-misc/networkmanager/files/nm-system-settings.conf-ifnet b/net-misc/networkmanager/files/nm-system-settings.conf-ifnet |
1904 |
deleted file mode 100644 |
1905 |
index 4d14ee7..0000000 |
1906 |
--- a/net-misc/networkmanager/files/nm-system-settings.conf-ifnet |
1907 |
+++ /dev/null |
1908 |
@@ -1,6 +0,0 @@ |
1909 |
-[main] |
1910 |
-plugins=ifnet,keyfile |
1911 |
- |
1912 |
-[ifnet] |
1913 |
-managed=true |
1914 |
-auto_refresh=false |
1915 |
|
1916 |
diff --git a/net-misc/networkmanager/metadata.xml b/net-misc/networkmanager/metadata.xml |
1917 |
deleted file mode 100644 |
1918 |
index 7d32aff..0000000 |
1919 |
--- a/net-misc/networkmanager/metadata.xml |
1920 |
+++ /dev/null |
1921 |
@@ -1,26 +0,0 @@ |
1922 |
-<?xml version="1.0" encoding="UTF-8"?> |
1923 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
1924 |
-<pkgmetadata> |
1925 |
- <herd>no-herd</herd> |
1926 |
- <maintainer> |
1927 |
- <email>steev@g.o</email> |
1928 |
- <name>Stephen Klimaszewski</name> |
1929 |
- </maintainer> |
1930 |
- <maintainer> |
1931 |
- <email>rbu@g.o</email> |
1932 |
- <name>Robert Buchholz</name> |
1933 |
- </maintainer> |
1934 |
- <maintainer> |
1935 |
- <email>dagger@g.o</email> |
1936 |
- <name>Robert Piasek</name> |
1937 |
- </maintainer> |
1938 |
- <use> |
1939 |
- <flag name="ppp">Enable support for mobile broadband and PPPoE connections using <pkg>net-dialup/ppp</pkg>.</flag> |
1940 |
- <flag name="dhclient">Use dhclient from <pkg>net-misc/dhcp</pkg> for getting ip.</flag> |
1941 |
- <flag name="dhcpcd">Use <pkg>net-misc/dhcpcd</pkg> for getting ip.</flag> |
1942 |
- <flag name="nss">Use <pkg>dev-libs/nss</pkg> for cryptography.</flag> |
1943 |
- <flag name="resolvconf">Use <pkg>net-dns/openresolv</pkg> for managing DNS information</flag> |
1944 |
- <flag name="connection-sharing">Use <pkg>net-dns/dnsmasq</pkg> and <pkg>net-firewall/iptables</pkg> for connection sharing </flag> |
1945 |
- <flag name="wimax">Enable WiMAX support. Requires <pkg>net-wireless/wimax</pkg>.</flag> |
1946 |
- </use> |
1947 |
-</pkgmetadata> |
1948 |
|
1949 |
diff --git a/net-misc/networkmanager/networkmanager-0.8.9997-r1.ebuild b/net-misc/networkmanager/networkmanager-0.8.9997-r1.ebuild |
1950 |
deleted file mode 100644 |
1951 |
index 0a1b561..0000000 |
1952 |
--- a/net-misc/networkmanager/networkmanager-0.8.9997-r1.ebuild |
1953 |
+++ /dev/null |
1954 |
@@ -1,138 +0,0 @@ |
1955 |
-# Copyright 1999-2011 Gentoo Foundation |
1956 |
-# Distributed under the terms of the GNU General Public License v2 |
1957 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.8.995.ebuild,v 1.1 2011/03/09 07:56:21 qiaomuf Exp $ |
1958 |
- |
1959 |
-EAPI="4" |
1960 |
-GNOME_ORG_MODULE="NetworkManager" |
1961 |
- |
1962 |
-inherit autotools eutils gnome.org linux-info systemd |
1963 |
- |
1964 |
-DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent." |
1965 |
-HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" |
1966 |
- |
1967 |
-LICENSE="GPL-2" |
1968 |
-SLOT="0" |
1969 |
-IUSE="avahi bluetooth doc +nss gnutls dhclient +dhcpcd +introspection |
1970 |
-kernel_linux +ppp resolvconf connection-sharing wimax" |
1971 |
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" |
1972 |
- |
1973 |
-REQUIRED_USE=" |
1974 |
- ^^ ( nss gnutls ) |
1975 |
- ^^ ( dhclient dhcpcd )" |
1976 |
- |
1977 |
-# gobject-introspection-0.10.3 is needed due to gnome bug 642300 |
1978 |
-# wpa_supplicant-0.7.3-r3 is needed due to bug 359271 |
1979 |
-# make consolekit and/or polkit support optional ? |
1980 |
-COMMON_DEPEND=">=sys-apps/dbus-1.2 |
1981 |
- >=dev-libs/dbus-glib-0.75 |
1982 |
- >=net-wireless/wireless-tools-28_pre9 |
1983 |
- || ( >=sys-fs/udev-171[gudev] >=sys-fs/udev-147[extras] ) |
1984 |
- >=dev-libs/glib-2.26 |
1985 |
- >=sys-auth/polkit-0.97 |
1986 |
- >=dev-libs/libnl-1.1 |
1987 |
- >=net-misc/modemmanager-0.4 |
1988 |
- >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] |
1989 |
- bluetooth? ( >=net-wireless/bluez-4.82 ) |
1990 |
- avahi? ( net-dns/avahi[autoipd] ) |
1991 |
- gnutls? ( |
1992 |
- dev-libs/libgcrypt |
1993 |
- net-libs/gnutls ) |
1994 |
- nss? ( >=dev-libs/nss-3.11 ) |
1995 |
- dhclient? ( net-misc/dhcp ) |
1996 |
- dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 ) |
1997 |
- introspection? ( >=dev-libs/gobject-introspection-0.10.3 ) |
1998 |
- ppp? ( >=net-dialup/ppp-2.4.5 ) |
1999 |
- resolvconf? ( net-dns/openresolv ) |
2000 |
- connection-sharing? ( |
2001 |
- net-dns/dnsmasq |
2002 |
- net-firewall/iptables ) |
2003 |
- wimax? ( >=net-wireless/wimax-1.5.1 )" |
2004 |
- |
2005 |
-RDEPEND="${COMMON_DEPEND} |
2006 |
- sys-auth/consolekit" |
2007 |
- |
2008 |
-DEPEND="${COMMON_DEPEND} |
2009 |
- dev-util/pkgconfig |
2010 |
- >=dev-util/intltool-0.40 |
2011 |
- >=sys-devel/gettext-0.17 |
2012 |
- doc? ( >=dev-util/gtk-doc-1.8 )" |
2013 |
- |
2014 |
-sysfs_deprecated_check() { |
2015 |
- ebegin "Checking for SYSFS_DEPRECATED support" |
2016 |
- |
2017 |
- if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then |
2018 |
- eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel" |
2019 |
- eerror "or NetworkManager will not work correctly." |
2020 |
- eerror "See http://bugs.gentoo.org/333639 for more info." |
2021 |
- die "CONFIG_SYSFS_DEPRECATED_V2 support detected!" |
2022 |
- fi |
2023 |
- eend $? |
2024 |
-} |
2025 |
- |
2026 |
-pkg_pretend() { |
2027 |
- if use kernel_linux; then |
2028 |
- get_version |
2029 |
- if linux_config_exists; then |
2030 |
- sysfs_deprecated_check |
2031 |
- else |
2032 |
- ewarn "Was unable to determine your kernel .config" |
2033 |
- ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly." |
2034 |
- ewarn "See http://bugs.gentoo.org/333639 for more info." |
2035 |
- fi |
2036 |
- |
2037 |
- fi |
2038 |
-} |
2039 |
- |
2040 |
-src_prepare() { |
2041 |
- # Add useful patches from upstream git (fixing crashes, SSID parsing bugs, |
2042 |
- # and significant usability problems). |
2043 |
- epatch "${FILESDIR}/${PV}/"*.patch |
2044 |
- |
2045 |
- # Don't build tests |
2046 |
- epatch "${FILESDIR}/${PN}-fix-tests.patch" |
2047 |
- eautoreconf |
2048 |
- default |
2049 |
-} |
2050 |
- |
2051 |
-src_configure() { |
2052 |
- ECONF="--disable-more-warnings |
2053 |
- --localstatedir=/var |
2054 |
- --with-distro=gentoo |
2055 |
- --with-dbus-sys-dir=/etc/dbus-1/system.d |
2056 |
- --with-udev-dir=/lib/udev |
2057 |
- --with-iptables=/sbin/iptables |
2058 |
- $(use_enable doc gtk-doc) |
2059 |
- $(use_enable introspection) |
2060 |
- $(use_enable ppp) |
2061 |
- $(use_enable wimax) |
2062 |
- $(use_with dhclient) |
2063 |
- $(use_with dhcpcd) |
2064 |
- $(use_with doc docs) |
2065 |
- $(use_with resolvconf) |
2066 |
- $(systemd_with_unitdir)" |
2067 |
- |
2068 |
- if use nss ; then |
2069 |
- ECONF="${ECONF} $(use_with nss crypto=nss)" |
2070 |
- else |
2071 |
- ECONF="${ECONF} $(use_with gnutls crypto=gnutls)" |
2072 |
- fi |
2073 |
- |
2074 |
- econf ${ECONF} |
2075 |
-} |
2076 |
- |
2077 |
-src_install() { |
2078 |
- default |
2079 |
- # Need to keep the /var/run/NetworkManager directory |
2080 |
- keepdir /var/run/NetworkManager |
2081 |
- |
2082 |
- # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts |
2083 |
- keepdir /etc/NetworkManager/dispatcher.d |
2084 |
- |
2085 |
- # Add keyfile plugin support |
2086 |
- keepdir /etc/NetworkManager/system-connections |
2087 |
- insinto /etc/NetworkManager |
2088 |
- newins "${FILESDIR}/nm-system-settings.conf-ifnet" nm-system-settings.conf |
2089 |
- |
2090 |
- # Remove useless .la files |
2091 |
- find "${D}" -name '*.la' -exec rm -f {} + |
2092 |
-} |