Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/smb4k/, net-misc/smb4k/files/
Date: Thu, 31 Aug 2017 22:31:11
Message-Id: 1504218658.abd1f610e45b582298f73a9f127ec941ee3fca7f.asturm@gentoo
1 commit: abd1f610e45b582298f73a9f127ec941ee3fca7f
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 31 22:04:01 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 31 22:30:58 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abd1f610
7
8 net-misc/smb4k: Drop old
9
10 Package-Manager: Portage-2.3.8, Repoman-2.3.3
11
12 net-misc/smb4k/Manifest | 1 -
13 net-misc/smb4k/files/smb4k-1.9.90-po2.patch | 10 -
14 .../smb4k/files/smb4k-2.0.0-CVE-2017-8849.patch | 361 ---------------------
15 net-misc/smb4k/smb4k-2.0.0-r1.ebuild | 50 ---
16 4 files changed, 422 deletions(-)
17
18 diff --git a/net-misc/smb4k/Manifest b/net-misc/smb4k/Manifest
19 index aac9c949a05..658d681ba84 100644
20 --- a/net-misc/smb4k/Manifest
21 +++ b/net-misc/smb4k/Manifest
22 @@ -1,3 +1,2 @@
23 DIST smb4k-1.2.3.tar.xz 3942852 SHA256 e751ae0f6b86c532a7e3796ae9c4590f46009075938afecb5ddd0c7421cf08ef SHA512 2066439ddda9abfb3649a1f53097637490b2187543a0cff32ad6b2ff6b250c9e3bb7b910f718a4c77761d064db8cbac7e0db2e9cf5f6ef5faf6a244fb070301b WHIRLPOOL f70b6ebb192888039844036b5798726f95c13ae5592220043c615e5378a04eb6073520ebb4b612248dd34096c17e7054db8ea11f1ed6fa6d6fad2dc6b73d410c
24 -DIST smb4k-2.0.0.tar.xz 3594964 SHA256 8a9f9bbfc9876816393d9f269952ddfe896c540e2de26b634b8e709a13ceca95 SHA512 2fb2123a6be888b2d75f3ebb155e021aa85fa6e9c3ec7c0092ef2c40f938e09a1b9e7c1608ecc457760ad37d9faf93c2ddba0b8e5afcf4b1ed1c61b2d9c702f2 WHIRLPOOL 07c2b289f4da54d01a9b6a87dfda7992ed056d1ef29819302391632898ce16aa307cdfdb1342168f4866f44974d788680017e1f763a6fa85b43fc5af68364174
25 DIST smb4k-2.0.2.tar.xz 3588608 SHA256 01cbd10fe7a293243a65333baa65871eec8de007d0110639498fc1e4c190a199 SHA512 de210b059757525c6e5b6db733c70f43f62ba14cdc447848c84325d3b838d2ac6d8aa591ef67881decb39801b9519ef05fc805e94bc02b93c629457194e1a974 WHIRLPOOL 3855c915319d017a5cb667c1f7b59357a2aa86586635a1ca4e80820dd695922fe54889dbd12f6b27d39cbbb767b313b680ac76069e3562791cd962e2ec3c880a
26
27 diff --git a/net-misc/smb4k/files/smb4k-1.9.90-po2.patch b/net-misc/smb4k/files/smb4k-1.9.90-po2.patch
28 deleted file mode 100644
29 index 11549ed4b9f..00000000000
30 --- a/net-misc/smb4k/files/smb4k-1.9.90-po2.patch
31 +++ /dev/null
32 @@ -1,10 +0,0 @@
33 ---- a/CMakeLists.txt 2017-02-05 20:23:51.000000000 +0100
34 -+++ b/CMakeLists.txt 2017-02-07 01:55:44.766375980 +0100
35 -@@ -94,7 +94,3 @@
36 - ########### install files ###############
37 -
38 - feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
39 --find_package(KF5I18n CONFIG REQUIRED)
40 --ki18n_install(po)
41 --find_package(KF5DocTools CONFIG REQUIRED)
42 --kdoctools_install(po)
43
44 diff --git a/net-misc/smb4k/files/smb4k-2.0.0-CVE-2017-8849.patch b/net-misc/smb4k/files/smb4k-2.0.0-CVE-2017-8849.patch
45 deleted file mode 100644
46 index caef19445c5..00000000000
47 --- a/net-misc/smb4k/files/smb4k-2.0.0-CVE-2017-8849.patch
48 +++ /dev/null
49 @@ -1,361 +0,0 @@
50 -From a90289b0962663bc1d247bbbd31b9e65b2ca000e Mon Sep 17 00:00:00 2001
51 -From: Albert Astals Cid <aacid@×××.org>
52 -Date: Wed, 10 May 2017 10:21:02 +0200
53 -Subject: Find the mount/umount commands in the helper
54 -
55 -Instead of trusting what we get passed in
56 -
57 -CVE-2017-8849
58 ----
59 - core/smb4kglobal.cpp | 32 +++++++++++++++++++
60 - core/smb4kglobal.h | 14 +++++++++
61 - core/smb4kmounter.cpp | 42 +++----------------------
62 - helpers/CMakeLists.txt | 7 +++++
63 - helpers/smb4kmounthelper.cpp | 75 ++++++++++++++++++++++++++++++++++++++++----
64 - helpers/smb4kmounthelper.h | 2 +-
65 - 6 files changed, 127 insertions(+), 45 deletions(-)
66 -
67 -diff --git a/core/smb4kglobal.cpp b/core/smb4kglobal.cpp
68 -index 765203d..cfa7ba5 100644
69 ---- a/core/smb4kglobal.cpp
70 -+++ b/core/smb4kglobal.cpp
71 -@@ -864,3 +864,35 @@ QStringList Smb4KGlobal::whitelistedMountArguments()
72 - #endif
73 -
74 -
75 -+const QString Smb4KGlobal::findMountExecutable()
76 -+{
77 -+ QStringList paths;
78 -+ paths << "/bin";
79 -+ paths << "/sbin";
80 -+ paths << "/usr/bin";
81 -+ paths << "/usr/sbin";
82 -+ paths << "/usr/local/bin";
83 -+ paths << "/usr/local/sbin";
84 -+
85 -+#if defined(Q_OS_LINUX)
86 -+ return QStandardPaths::findExecutable("mount.cifs", paths);
87 -+#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD)
88 -+ return QStandardPaths::findExecutable("mount_smbfs", paths);
89 -+#else
90 -+ return QString();
91 -+#endif
92 -+}
93 -+
94 -+
95 -+const QString Smb4KGlobal::findUmountExecutable()
96 -+{
97 -+ QStringList paths;
98 -+ paths << "/bin";
99 -+ paths << "/sbin";
100 -+ paths << "/usr/bin";
101 -+ paths << "/usr/sbin";
102 -+ paths << "/usr/local/bin";
103 -+ paths << "/usr/local/sbin";
104 -+
105 -+ return QStandardPaths::findExecutable("umount", paths);
106 -+}
107 -diff --git a/core/smb4kglobal.h b/core/smb4kglobal.h
108 -index 63b6294..f29e342 100644
109 ---- a/core/smb4kglobal.h
110 -+++ b/core/smb4kglobal.h
111 -@@ -454,6 +454,20 @@ namespace Smb4KGlobal
112 - */
113 - Q_DECL_EXPORT QStringList whitelistedMountArguments();
114 - #endif
115 -+
116 -+ /**
117 -+ * Find the mount executable on the system.
118 -+ *
119 -+ * @returns the path of the mount executable.
120 -+ */
121 -+ Q_DECL_EXPORT const QString findMountExecutable();
122 -+
123 -+ /**
124 -+ * Find the umount executable on the system.
125 -+ *
126 -+ * @returns the path of the umount executable.
127 -+ */
128 -+ Q_DECL_EXPORT const QString findUmountExecutable();
129 - };
130 -
131 - #endif
132 -diff --git a/core/smb4kmounter.cpp b/core/smb4kmounter.cpp
133 -index 91f3863..0bc71aa 100644
134 ---- a/core/smb4kmounter.cpp
135 -+++ b/core/smb4kmounter.cpp
136 -@@ -1104,16 +1104,7 @@ void Smb4KMounter::timerEvent(QTimerEvent *)
137 - bool Smb4KMounter::fillMountActionArgs(Smb4KShare *share, QVariantMap& map)
138 - {
139 - // Find the mount program.
140 -- QString mount;
141 -- QStringList paths;
142 -- paths << "/bin";
143 -- paths << "/sbin";
144 -- paths << "/usr/bin";
145 -- paths << "/usr/sbin";
146 -- paths << "/usr/local/bin";
147 -- paths << "/usr/local/sbin";
148 --
149 -- mount = QStandardPaths::findExecutable("mount.cifs", paths);
150 -+ const QString mount = findMountExecutable();
151 -
152 - if (!mount.isEmpty())
153 - {
154 -@@ -1645,16 +1636,7 @@ bool Smb4KMounter::fillMountActionArgs(Smb4KShare *share, QVariantMap& map)
155 - bool Smb4KMounter::fillMountActionArgs(Smb4KShare *share, QVariantMap& map)
156 - {
157 - // Find the mount program.
158 -- QString mount;
159 -- QStringList paths;
160 -- paths << "/bin";
161 -- paths << "/sbin";
162 -- paths << "/usr/bin";
163 -- paths << "/usr/sbin";
164 -- paths << "/usr/local/bin";
165 -- paths << "/usr/local/sbin";
166 --
167 -- mount = QStandardPaths::findExecutable("mount_smbfs", paths);
168 -+ const QString mount = findMountExecutable();
169 -
170 - if (!mount.isEmpty())
171 - {
172 -@@ -1823,15 +1805,7 @@ bool Smb4KMounter::fillUnmountActionArgs(Smb4KShare *share, bool force, bool sil
173 - //
174 - // The umount program
175 - //
176 -- QStringList paths;
177 -- paths << "/bin";
178 -- paths << "/sbin";
179 -- paths << "/usr/bin";
180 -- paths << "/usr/sbin";
181 -- paths << "/usr/local/bin";
182 -- paths << "/usr/local/sbin";
183 --
184 -- QString umount = QStandardPaths::findExecutable("umount", paths);
185 -+ const QString umount = findUmountExecutable();
186 -
187 - if (umount.isEmpty() && !silent)
188 - {
189 -@@ -1884,15 +1858,7 @@ bool Smb4KMounter::fillUnmountActionArgs(Smb4KShare *share, bool force, bool sil
190 - //
191 - // The umount program
192 - //
193 -- QStringList paths;
194 -- paths << "/bin";
195 -- paths << "/sbin";
196 -- paths << "/usr/bin";
197 -- paths << "/usr/sbin";
198 -- paths << "/usr/local/bin";
199 -- paths << "/usr/local/sbin";
200 --
201 -- QString umount = QStandardPaths::findExecutable("umount", paths);
202 -+ const QString umount = findUmountExecutable();
203 -
204 - if (umount.isEmpty() && !silent)
205 - {
206 -diff --git a/helpers/CMakeLists.txt b/helpers/CMakeLists.txt
207 -index 77bb3a5..015c8b6 100644
208 ---- a/helpers/CMakeLists.txt
209 -+++ b/helpers/CMakeLists.txt
210 -@@ -1,8 +1,15 @@
211 -+include_directories(
212 -+ ${CMAKE_CURRENT_SOURCE_DIR}
213 -+ ${CMAKE_CURRENT_BINARY_DIR}
214 -+ ${CMAKE_SOURCE_DIR}/core
215 -+ ${CMAKE_BINARY_DIR}/core)
216 -+
217 - set(smb4kmounthelper_SRCS smb4kmounthelper.cpp)
218 -
219 - add_executable(mounthelper ${smb4kmounthelper_SRCS})
220 -
221 - target_link_libraries(mounthelper
222 -+ smb4kcore
223 - Qt5::Core
224 - KF5::Auth
225 - KF5::CoreAddons
226 -diff --git a/helpers/smb4kmounthelper.cpp b/helpers/smb4kmounthelper.cpp
227 -index 641530e..0a1e215 100644
228 ---- a/helpers/smb4kmounthelper.cpp
229 -+++ b/helpers/smb4kmounthelper.cpp
230 -@@ -2,7 +2,7 @@
231 - The helper that mounts and unmounts shares.
232 - -------------------
233 - begin : Sa Okt 16 2010
234 -- copyright : (C) 2010-2016 by Alexander Reinholdt
235 -+ copyright : (C) 2010-2017 by Alexander Reinholdt
236 - email : alexander.reinholdt@×××××××.net
237 - ***************************************************************************/
238 -
239 -@@ -29,6 +29,7 @@
240 -
241 - // application specific includes
242 - #include "smb4kmounthelper.h"
243 -+#include "../core/smb4kglobal.h"
244 -
245 - // Qt includes
246 - #include <QProcessEnvironment>
247 -@@ -42,14 +43,24 @@
248 - #include <KI18n/KLocalizedString>
249 - #include <KIOCore/KMountPoint>
250 -
251 -+using namespace Smb4KGlobal;
252 -+
253 - KAUTH_HELPER_MAIN("org.kde.smb4k.mounthelper", Smb4KMountHelper);
254 -
255 -
256 - ActionReply Smb4KMountHelper::mount(const QVariantMap &args)
257 - {
258 -+ //
259 -+ // The action reply
260 -+ //
261 - ActionReply reply;
262 -
263 - //
264 -+ // Get the mount executable
265 -+ //
266 -+ const QString mount = findMountExecutable();
267 -+
268 -+ //
269 - // Iterate through the entries.
270 - //
271 - QMapIterator<QString, QVariant> it(args);
272 -@@ -61,6 +72,20 @@ ActionReply Smb4KMountHelper::mount(const QVariantMap &args)
273 - QVariantMap entry = it.value().toMap();
274 -
275 - //
276 -+ // Check the executable
277 -+ //
278 -+ if (mount != entry["mh_command"].toString())
279 -+ {
280 -+ // Something weird is going on, bail out.
281 -+ reply.setType(ActionReply::HelperErrorType);
282 -+ return reply;
283 -+ }
284 -+ else
285 -+ {
286 -+ // Do nothing
287 -+ }
288 -+
289 -+ //
290 - // The process
291 - //
292 - KProcess proc(this);
293 -@@ -87,12 +112,12 @@ ActionReply Smb4KMountHelper::mount(const QVariantMap &args)
294 - //
295 - QStringList command;
296 - #if defined(Q_OS_LINUX)
297 -- command << entry["mh_command"].toString();
298 -+ command << mount;
299 - command << entry["mh_unc"].toString();
300 - command << entry["mh_mountpoint"].toString();
301 - command << entry["mh_options"].toStringList();
302 - #elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD)
303 -- command << entry["mh_command"].toString();
304 -+ command << mount;
305 - command << entry["mh_options"].toStringList();
306 - command << entry["mh_unc"].toString();
307 - command << entry["mh_mountpoint"].toString();
308 -@@ -208,6 +233,11 @@ ActionReply Smb4KMountHelper::unmountOneByOne(const QVariantMap& args)
309 - ActionReply reply;
310 -
311 - //
312 -+ // Get the mount executable
313 -+ //
314 -+ const QString umount = findUmountExecutable();
315 -+
316 -+ //
317 - // Iterate through the entries.
318 - //
319 - QMapIterator<QString, QVariant> it(args);
320 -@@ -217,6 +247,20 @@ ActionReply Smb4KMountHelper::unmountOneByOne(const QVariantMap& args)
321 - it.next();
322 - QString index = it.key();
323 - QVariantMap entry = it.value().toMap();
324 -+
325 -+ //
326 -+ // Check the executable
327 -+ //
328 -+ if (umount != entry["mh_command"].toString())
329 -+ {
330 -+ // Something weird is going on, bail out.
331 -+ reply.setType(ActionReply::HelperErrorType);
332 -+ return reply;
333 -+ }
334 -+ else
335 -+ {
336 -+ // Do nothing
337 -+ }
338 -
339 - //
340 - // Check if the mountpoint is valid and the filesystem is correct.
341 -@@ -261,7 +305,7 @@ ActionReply Smb4KMountHelper::unmountOneByOne(const QVariantMap& args)
342 - // The command
343 - //
344 - QStringList command;
345 -- command << entry["mh_command"].toString();
346 -+ command << umount;
347 - command << entry["mh_options"].toStringList();
348 - command << entry["mh_mountpoint"].toString();
349 -
350 -@@ -342,6 +386,11 @@ ActionReply Smb4KMountHelper::unmountAtOnce(const QVariantMap& args)
351 - ActionReply reply;
352 -
353 - //
354 -+ // Get the mount executable
355 -+ //
356 -+ const QString umount = findUmountExecutable();
357 -+
358 -+ //
359 - // Check the mountpoints and put the valid ones into a string list
360 - //
361 - QStringList validMountPoints;
362 -@@ -351,7 +400,7 @@ ActionReply Smb4KMountHelper::unmountAtOnce(const QVariantMap& args)
363 - {
364 - it.next();
365 - QVariantMap entry = it.value().toMap();
366 --
367 -+
368 - bool mountPointOk = false;
369 - KMountPoint::List mountPoints = KMountPoint::currentMountPoints(KMountPoint::BasicInfoNeeded|KMountPoint::NeedMountOptions);
370 -
371 -@@ -399,9 +448,23 @@ ActionReply Smb4KMountHelper::unmountAtOnce(const QVariantMap& args)
372 -
373 - if (!validMountPoints.isEmpty())
374 - {
375 -+ //
376 -+ // Check the executable
377 -+ //
378 -+ if (umount != args.first().toMap().value("mh_command").toString())
379 -+ {
380 -+ // Something weird is going on, bail output
381 -+ reply.setType(ActionReply::HelperErrorType);
382 -+ return reply;
383 -+ }
384 -+ else
385 -+ {
386 -+ // Do nothing
387 -+ }
388 -+
389 - // The command
390 - QStringList command;
391 -- command << args.first().toMap().value("mh_command").toString();
392 -+ command << umount;
393 - command << args.first().toMap().value("mh_options").toStringList();
394 - command << validMountPoints;
395 -
396 -diff --git a/helpers/smb4kmounthelper.h b/helpers/smb4kmounthelper.h
397 -index f3bc573..4b735af 100644
398 ---- a/helpers/smb4kmounthelper.h
399 -+++ b/helpers/smb4kmounthelper.h
400 -@@ -2,7 +2,7 @@
401 - The helper that mounts and unmounts shares.
402 - -------------------
403 - begin : Sa Okt 16 2010
404 -- copyright : (C) 2010-2016 by Alexander Reinholdt
405 -+ copyright : (C) 2010-2017 by Alexander Reinholdt
406 - email : alexander.reinholdt@×××××××.net
407 - ***************************************************************************/
408 -
409 ---
410 -cgit v0.11.2
411
412 diff --git a/net-misc/smb4k/smb4k-2.0.0-r1.ebuild b/net-misc/smb4k/smb4k-2.0.0-r1.ebuild
413 deleted file mode 100644
414 index 42121154749..00000000000
415 --- a/net-misc/smb4k/smb4k-2.0.0-r1.ebuild
416 +++ /dev/null
417 @@ -1,50 +0,0 @@
418 -# Copyright 1999-2017 Gentoo Foundation
419 -# Distributed under the terms of the GNU General Public License v2
420 -
421 -EAPI=6
422 -
423 -KDE_HANDBOOK="forceoptional"
424 -inherit kde5
425 -
426 -DESCRIPTION="Advanced network neighborhood browser"
427 -HOMEPAGE="https://sourceforge.net/p/smb4k/home/Home/"
428 -[[ ${PV} != 9999 ]] && SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
429 -
430 -[[ ${PV} != 9999 ]] && KEYWORDS="~amd64 ~x86"
431 -LICENSE="GPL-2"
432 -IUSE=""
433 -
434 -DEPEND="
435 - $(add_frameworks_dep kauth)
436 - $(add_frameworks_dep kcompletion)
437 - $(add_frameworks_dep kconfig)
438 - $(add_frameworks_dep kconfigwidgets)
439 - $(add_frameworks_dep kcoreaddons)
440 - $(add_frameworks_dep kdbusaddons)
441 - $(add_frameworks_dep ki18n)
442 - $(add_frameworks_dep kiconthemes)
443 - $(add_frameworks_dep kio)
444 - $(add_frameworks_dep kjobwidgets)
445 - $(add_frameworks_dep knotifications)
446 - $(add_frameworks_dep kparts)
447 - $(add_frameworks_dep kwallet)
448 - $(add_frameworks_dep kwidgetsaddons)
449 - $(add_frameworks_dep kwindowsystem)
450 - $(add_frameworks_dep kxmlgui)
451 - $(add_frameworks_dep solid)
452 - $(add_qt_dep qtdeclarative)
453 - $(add_qt_dep qtgui)
454 - $(add_qt_dep qtnetwork)
455 - $(add_qt_dep qtprintsupport)
456 - $(add_qt_dep qttest)
457 - $(add_qt_dep qtwidgets)
458 -"
459 -RDEPEND="${DEPEND}
460 - !net-misc/smb4k:4
461 - >=net-fs/samba-3.4.2[cups]
462 -"
463 -
464 -PATCHES=(
465 - "${FILESDIR}"/${PN}-1.9.90-po2.patch
466 - "${FILESDIR}"/${P}-CVE-2017-8849.patch
467 -)