1 |
commit: e65961b54b0a29c4138b82104cda1e958ba91c84 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 3 08:11:58 2017 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 3 08:12:30 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e65961b5 |
7 |
|
8 |
net-misc/smb4k: Drop slot 4 |
9 |
|
10 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
11 |
|
12 |
net-misc/smb4k/Manifest | 1 - |
13 |
.../smb4k/files/smb4k-1.2.3-CVE-2017-8849.patch | 365 --------------------- |
14 |
net-misc/smb4k/smb4k-1.2.3-r1.ebuild | 29 -- |
15 |
3 files changed, 395 deletions(-) |
16 |
|
17 |
diff --git a/net-misc/smb4k/Manifest b/net-misc/smb4k/Manifest |
18 |
index 658d681ba84..a1576c5916e 100644 |
19 |
--- a/net-misc/smb4k/Manifest |
20 |
+++ b/net-misc/smb4k/Manifest |
21 |
@@ -1,2 +1 @@ |
22 |
-DIST smb4k-1.2.3.tar.xz 3942852 SHA256 e751ae0f6b86c532a7e3796ae9c4590f46009075938afecb5ddd0c7421cf08ef SHA512 2066439ddda9abfb3649a1f53097637490b2187543a0cff32ad6b2ff6b250c9e3bb7b910f718a4c77761d064db8cbac7e0db2e9cf5f6ef5faf6a244fb070301b WHIRLPOOL f70b6ebb192888039844036b5798726f95c13ae5592220043c615e5378a04eb6073520ebb4b612248dd34096c17e7054db8ea11f1ed6fa6d6fad2dc6b73d410c |
23 |
DIST smb4k-2.0.2.tar.xz 3588608 SHA256 01cbd10fe7a293243a65333baa65871eec8de007d0110639498fc1e4c190a199 SHA512 de210b059757525c6e5b6db733c70f43f62ba14cdc447848c84325d3b838d2ac6d8aa591ef67881decb39801b9519ef05fc805e94bc02b93c629457194e1a974 WHIRLPOOL 3855c915319d017a5cb667c1f7b59357a2aa86586635a1ca4e80820dd695922fe54889dbd12f6b27d39cbbb767b313b680ac76069e3562791cd962e2ec3c880a |
24 |
|
25 |
diff --git a/net-misc/smb4k/files/smb4k-1.2.3-CVE-2017-8849.patch b/net-misc/smb4k/files/smb4k-1.2.3-CVE-2017-8849.patch |
26 |
deleted file mode 100644 |
27 |
index b4f619ffb67..00000000000 |
28 |
--- a/net-misc/smb4k/files/smb4k-1.2.3-CVE-2017-8849.patch |
29 |
+++ /dev/null |
30 |
@@ -1,365 +0,0 @@ |
31 |
-From 71554140bdaede27b95dbe4c9b5a028a83c83cce Mon Sep 17 00:00:00 2001 |
32 |
-From: Alexander Reinholdt <alexander.reinholdt@×××××××.net> |
33 |
-Date: Wed, 10 May 2017 10:23:34 +0200 |
34 |
-Subject: Find the mount/umount commands in the helper |
35 |
- |
36 |
-Instead of trusting what we get passed in |
37 |
-CVE-2017-8849 |
38 |
---- |
39 |
- core/smb4kglobal.cpp | 65 +++++++++++++++++++++++++++++++++++- |
40 |
- core/smb4kglobal.h | 16 ++++++++- |
41 |
- core/smb4kmounter_p.cpp | 78 ++++---------------------------------------- |
42 |
- helpers/CMakeLists.txt | 6 +++- |
43 |
- helpers/smb4kmounthelper.cpp | 51 +++++++++++++++++++++++++++-- |
44 |
- 5 files changed, 139 insertions(+), 77 deletions(-) |
45 |
- |
46 |
-diff --git a/core/smb4kglobal.cpp b/core/smb4kglobal.cpp |
47 |
-index 172016f..818a78a 100644 |
48 |
---- a/core/smb4kglobal.cpp |
49 |
-+++ b/core/smb4kglobal.cpp |
50 |
-@@ -2,7 +2,7 @@ |
51 |
- smb4kglobal - This is the global namespace for Smb4K. |
52 |
- ------------------- |
53 |
- begin : Sa Apr 2 2005 |
54 |
-- copyright : (C) 2005-2014 by Alexander Reinholdt |
55 |
-+ copyright : (C) 2005-2017 by Alexander Reinholdt |
56 |
- email : alexander.reinholdt@×××××××.net |
57 |
- ***************************************************************************/ |
58 |
- |
59 |
-@@ -851,3 +851,66 @@ QStringList Smb4KGlobal::whitelistedMountArguments() |
60 |
- #endif |
61 |
- |
62 |
- |
63 |
-+const QString Smb4KGlobal::findMountExecutable() |
64 |
-+{ |
65 |
-+ QString mount; |
66 |
-+ QStringList paths; |
67 |
-+ paths << "/bin"; |
68 |
-+ paths << "/sbin"; |
69 |
-+ paths << "/usr/bin"; |
70 |
-+ paths << "/usr/sbin"; |
71 |
-+ paths << "/usr/local/bin"; |
72 |
-+ paths << "/usr/local/sbin"; |
73 |
-+ |
74 |
-+ for (int i = 0; i < paths.size(); ++i) |
75 |
-+ { |
76 |
-+#if defined(Q_OS_LINUX) |
77 |
-+ mount = KGlobal::dirs()->findExe("mount.cifs", paths.at(i)); |
78 |
-+#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) |
79 |
-+ mount = KGlobal::dirs()->findExe("mount_smbfs", paths.at(i)); |
80 |
-+#endif |
81 |
-+ |
82 |
-+ if (!mount.isEmpty()) |
83 |
-+ { |
84 |
-+ break; |
85 |
-+ } |
86 |
-+ else |
87 |
-+ { |
88 |
-+ continue; |
89 |
-+ } |
90 |
-+ } |
91 |
-+ |
92 |
-+ return mount; |
93 |
-+} |
94 |
-+ |
95 |
-+ |
96 |
-+const QString Smb4KGlobal::findUmountExecutable() |
97 |
-+{ |
98 |
-+ // Find the umount program. |
99 |
-+ QString umount; |
100 |
-+ QStringList paths; |
101 |
-+ paths << "/bin"; |
102 |
-+ paths << "/sbin"; |
103 |
-+ paths << "/usr/bin"; |
104 |
-+ paths << "/usr/sbin"; |
105 |
-+ paths << "/usr/local/bin"; |
106 |
-+ paths << "/usr/local/sbin"; |
107 |
-+ |
108 |
-+ for ( int i = 0; i < paths.size(); ++i ) |
109 |
-+ { |
110 |
-+ umount = KGlobal::dirs()->findExe("umount", paths.at(i)); |
111 |
-+ |
112 |
-+ if (!umount.isEmpty()) |
113 |
-+ { |
114 |
-+ break; |
115 |
-+ } |
116 |
-+ else |
117 |
-+ { |
118 |
-+ continue; |
119 |
-+ } |
120 |
-+ } |
121 |
-+ |
122 |
-+ return umount; |
123 |
-+} |
124 |
-+ |
125 |
-+ |
126 |
-diff --git a/core/smb4kglobal.h b/core/smb4kglobal.h |
127 |
-index db1805b..0ef377d 100644 |
128 |
---- a/core/smb4kglobal.h |
129 |
-+++ b/core/smb4kglobal.h |
130 |
-@@ -2,7 +2,7 @@ |
131 |
- smb4kglobal - This is the global namespace for Smb4K. |
132 |
- ------------------- |
133 |
- begin : Sa Apr 2 2005 |
134 |
-- copyright : (C) 2005-2014 by Alexander Reinholdt |
135 |
-+ copyright : (C) 2005-2017 by Alexander Reinholdt |
136 |
- email : alexander.reinholdt@×××××××.net |
137 |
- ***************************************************************************/ |
138 |
- |
139 |
-@@ -455,6 +455,20 @@ namespace Smb4KGlobal |
140 |
- */ |
141 |
- KDE_EXPORT QStringList whitelistedMountArguments(); |
142 |
- #endif |
143 |
-+ |
144 |
-+ /** |
145 |
-+ * Find the mount executable on the system. |
146 |
-+ * |
147 |
-+ * @returns the path of the mount executable. |
148 |
-+ */ |
149 |
-+ KDE_EXPORT const QString findMountExecutable(); |
150 |
-+ |
151 |
-+ /** |
152 |
-+ * Find the umount executable on the system. |
153 |
-+ * |
154 |
-+ * @returns the path of the umount executable. |
155 |
-+ */ |
156 |
-+ KDE_EXPORT const QString findUmountExecutable(); |
157 |
- }; |
158 |
- |
159 |
- #endif |
160 |
-diff --git a/core/smb4kmounter_p.cpp b/core/smb4kmounter_p.cpp |
161 |
-index 63a87ed..342052a 100644 |
162 |
---- a/core/smb4kmounter_p.cpp |
163 |
-+++ b/core/smb4kmounter_p.cpp |
164 |
-@@ -207,30 +207,7 @@ bool Smb4KMountJob::createMountAction(Smb4KShare *share, Action *action) |
165 |
- // |
166 |
- bool Smb4KMountJob::fillArgs(Smb4KShare *share, QMap<QString, QVariant>& map) |
167 |
- { |
168 |
-- // Find the mount program. |
169 |
-- QString mount; |
170 |
-- QStringList paths; |
171 |
-- paths << "/bin"; |
172 |
-- paths << "/sbin"; |
173 |
-- paths << "/usr/bin"; |
174 |
-- paths << "/usr/sbin"; |
175 |
-- paths << "/usr/local/bin"; |
176 |
-- paths << "/usr/local/sbin"; |
177 |
-- |
178 |
-- for (int i = 0; i < paths.size(); ++i) |
179 |
-- { |
180 |
-- mount = KGlobal::dirs()->findExe("mount.cifs", paths.at(i)); |
181 |
-- |
182 |
-- if (!mount.isEmpty()) |
183 |
-- { |
184 |
-- map.insert("mh_command", mount); |
185 |
-- break; |
186 |
-- } |
187 |
-- else |
188 |
-- { |
189 |
-- continue; |
190 |
-- } |
191 |
-- } |
192 |
-+ const QString mount = findMountExecutable(); |
193 |
- |
194 |
- if (mount.isEmpty()) |
195 |
- { |
196 |
-@@ -242,6 +219,8 @@ bool Smb4KMountJob::fillArgs(Smb4KShare *share, QMap<QString, QVariant>& map) |
197 |
- // Do nothing |
198 |
- } |
199 |
- |
200 |
-+ map.insert("mh_command", mount); |
201 |
-+ |
202 |
- // Mount arguments. |
203 |
- QMap<QString, QString> global_options = globalSambaOptions(); |
204 |
- Smb4KCustomOptions *options = Smb4KCustomOptionsManager::self()->findOptions(share); |
205 |
-@@ -729,30 +708,7 @@ bool Smb4KMountJob::fillArgs(Smb4KShare *share, QMap<QString, QVariant>& map) |
206 |
- // |
207 |
- bool Smb4KMountJob::fillArgs(Smb4KShare *share, QMap<QString, QVariant>& map) |
208 |
- { |
209 |
-- // Find the mount program. |
210 |
-- QString mount; |
211 |
-- QStringList paths; |
212 |
-- paths << "/bin"; |
213 |
-- paths << "/sbin"; |
214 |
-- paths << "/usr/bin"; |
215 |
-- paths << "/usr/sbin"; |
216 |
-- paths << "/usr/local/bin"; |
217 |
-- paths << "/usr/local/sbin"; |
218 |
-- |
219 |
-- for (int i = 0; i < paths.size(); ++i) |
220 |
-- { |
221 |
-- mount = KGlobal::dirs()->findExe("mount_smbfs", paths.at(i)); |
222 |
-- |
223 |
-- if (!mount.isEmpty()) |
224 |
-- { |
225 |
-- map.insert("mh_command", mount); |
226 |
-- break; |
227 |
-- } |
228 |
-- else |
229 |
-- { |
230 |
-- continue; |
231 |
-- } |
232 |
-- } |
233 |
-+ const QString mount = findMountExecutable(); |
234 |
- |
235 |
- if (mount.isEmpty()) |
236 |
- { |
237 |
-@@ -764,6 +720,8 @@ bool Smb4KMountJob::fillArgs(Smb4KShare *share, QMap<QString, QVariant>& map) |
238 |
- // Do nothing |
239 |
- } |
240 |
- |
241 |
-+ map.insert("mh_command", mount); |
242 |
-+ |
243 |
- // Mount arguments. |
244 |
- QMap<QString, QString> global_options = globalSambaOptions(); |
245 |
- Smb4KCustomOptions *options = Smb4KCustomOptionsManager::self()->findOptions(share); |
246 |
-@@ -1253,29 +1211,7 @@ bool Smb4KUnmountJob::createUnmountAction(Smb4KShare *share, Action *action) |
247 |
- // Do nothing |
248 |
- } |
249 |
- |
250 |
-- // Find the umount program. |
251 |
-- QString umount; |
252 |
-- QStringList paths; |
253 |
-- paths << "/bin"; |
254 |
-- paths << "/sbin"; |
255 |
-- paths << "/usr/bin"; |
256 |
-- paths << "/usr/sbin"; |
257 |
-- paths << "/usr/local/bin"; |
258 |
-- paths << "/usr/local/sbin"; |
259 |
-- |
260 |
-- for ( int i = 0; i < paths.size(); ++i ) |
261 |
-- { |
262 |
-- umount = KGlobal::dirs()->findExe("umount", paths.at(i)); |
263 |
-- |
264 |
-- if (!umount.isEmpty()) |
265 |
-- { |
266 |
-- break; |
267 |
-- } |
268 |
-- else |
269 |
-- { |
270 |
-- continue; |
271 |
-- } |
272 |
-- } |
273 |
-+ const QString umount = findUmountExecutable(); |
274 |
- |
275 |
- if (umount.isEmpty() && !m_silent) |
276 |
- { |
277 |
-diff --git a/helpers/CMakeLists.txt b/helpers/CMakeLists.txt |
278 |
-index e9e670b..cd4228d 100644 |
279 |
---- a/helpers/CMakeLists.txt |
280 |
-+++ b/helpers/CMakeLists.txt |
281 |
-@@ -1,7 +1,11 @@ |
282 |
-+include_directories( |
283 |
-+ ${CMAKE_SOURCE_DIR}/core |
284 |
-+ ${CMAKE_BINARY_DIR}/core ) |
285 |
-+ |
286 |
- set( smb4kmounthelper_SRCS smb4kmounthelper.cpp ) |
287 |
- |
288 |
- kde4_add_executable( mounthelper ${smb4kmounthelper_SRCS} ) |
289 |
--target_link_libraries( mounthelper ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ) |
290 |
-+target_link_libraries( mounthelper smb4kcore ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ) |
291 |
- install( TARGETS mounthelper DESTINATION ${LIBEXEC_INSTALL_DIR} ) |
292 |
- |
293 |
- kde4_install_auth_helper_files( mounthelper net.sourceforge.smb4k.mounthelper root ) |
294 |
-diff --git a/helpers/smb4kmounthelper.cpp b/helpers/smb4kmounthelper.cpp |
295 |
-index a2f2fed..7959020 100644 |
296 |
---- a/helpers/smb4kmounthelper.cpp |
297 |
-+++ b/helpers/smb4kmounthelper.cpp |
298 |
-@@ -29,6 +29,7 @@ |
299 |
- |
300 |
- // application specific includes |
301 |
- #include "smb4kmounthelper.h" |
302 |
-+#include "core/smb4kglobal.h" |
303 |
- |
304 |
- // Qt includes |
305 |
- #include <QProcessEnvironment> |
306 |
-@@ -43,12 +44,35 @@ |
307 |
- #include <kmountpoint.h> |
308 |
- #include <kurl.h> |
309 |
- |
310 |
-+using namespace Smb4KGlobal; |
311 |
-+ |
312 |
- KDE4_AUTH_HELPER_MAIN( "net.sourceforge.smb4k.mounthelper", Smb4KMountHelper ) |
313 |
- |
314 |
- |
315 |
- ActionReply Smb4KMountHelper::mount(const QVariantMap &args) |
316 |
- { |
317 |
- ActionReply reply; |
318 |
-+ |
319 |
-+ // |
320 |
-+ // Get the mount executable |
321 |
-+ // |
322 |
-+ const QString mount = findMountExecutable(); |
323 |
-+ |
324 |
-+ // |
325 |
-+ // Check the executable |
326 |
-+ // |
327 |
-+ if (mount != args["mh_command"].toString()) |
328 |
-+ { |
329 |
-+ // Something weird is going on, bail out. |
330 |
-+ reply.setErrorCode(ActionReply::HelperError); |
331 |
-+ reply.setErrorDescription(i18n("Wrong executable passed. Bailing out.")); |
332 |
-+ return reply; |
333 |
-+ } |
334 |
-+ else |
335 |
-+ { |
336 |
-+ // Do nothing |
337 |
-+ } |
338 |
-+ |
339 |
- // The mountpoint is a unique and can be used to |
340 |
- // find the share. |
341 |
- reply.addData("mh_mountpoint", args["mh_mountpoint"]); |
342 |
-@@ -75,12 +99,12 @@ ActionReply Smb4KMountHelper::mount(const QVariantMap &args) |
343 |
- // Set the mount command here. |
344 |
- QStringList command; |
345 |
- #if defined(Q_OS_LINUX) |
346 |
-- command << args["mh_command"].toString(); |
347 |
-+ command << mount; |
348 |
- command << args["mh_unc"].toString(); |
349 |
- command << args["mh_mountpoint"].toString(); |
350 |
- command << args["mh_options"].toStringList(); |
351 |
- #elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) |
352 |
-- command << args["mh_command"].toString(); |
353 |
-+ command << mount; |
354 |
- command << args["mh_options"].toStringList(); |
355 |
- command << args["mh_unc"].toString(); |
356 |
- command << args["mh_mountpoint"].toString(); |
357 |
-@@ -161,6 +185,27 @@ ActionReply Smb4KMountHelper::mount(const QVariantMap &args) |
358 |
- ActionReply Smb4KMountHelper::unmount(const QVariantMap &args) |
359 |
- { |
360 |
- ActionReply reply; |
361 |
-+ |
362 |
-+ // |
363 |
-+ // Get the umount executable |
364 |
-+ // |
365 |
-+ const QString umount = findUmountExecutable(); |
366 |
-+ |
367 |
-+ // |
368 |
-+ // Check the executable |
369 |
-+ // |
370 |
-+ if (umount != args["mh_command"].toString()) |
371 |
-+ { |
372 |
-+ // Something weird is going on, bail out. |
373 |
-+ reply.setErrorCode(ActionReply::HelperError); |
374 |
-+ reply.setErrorDescription(i18n("Wrong executable passed. Bailing out.")); |
375 |
-+ return reply; |
376 |
-+ } |
377 |
-+ else |
378 |
-+ { |
379 |
-+ // Do nothing |
380 |
-+ } |
381 |
-+ |
382 |
- // The mountpoint is a unique and can be used to |
383 |
- // find the share. |
384 |
- reply.addData("mh_mountpoint", args["mh_mountpoint"]); |
385 |
-@@ -208,7 +253,7 @@ ActionReply Smb4KMountHelper::unmount(const QVariantMap &args) |
386 |
- |
387 |
- // Set the umount command here. |
388 |
- QStringList command; |
389 |
-- command << args["mh_command"].toString(); |
390 |
-+ command << umount; |
391 |
- command << args["mh_options"].toStringList(); |
392 |
- command << args["mh_mountpoint"].toString(); |
393 |
- |
394 |
--- |
395 |
-cgit v0.11.2 |
396 |
|
397 |
diff --git a/net-misc/smb4k/smb4k-1.2.3-r1.ebuild b/net-misc/smb4k/smb4k-1.2.3-r1.ebuild |
398 |
deleted file mode 100644 |
399 |
index 296f781934b..00000000000 |
400 |
--- a/net-misc/smb4k/smb4k-1.2.3-r1.ebuild |
401 |
+++ /dev/null |
402 |
@@ -1,29 +0,0 @@ |
403 |
-# Copyright 1999-2017 Gentoo Foundation |
404 |
-# Distributed under the terms of the GNU General Public License v2 |
405 |
- |
406 |
-EAPI=6 |
407 |
- |
408 |
-DECLARATIVE_REQUIRED="always" |
409 |
-KDE_LINGUAS="bg bs ca ca@valencia cs da de en_GB eo es et fi fr ga gl hu is it |
410 |
-ja ko lt mai mr nb nds nl nn pl pt pt_BR ro ru sk sv tr ug uk zh_CN zh_TW" |
411 |
-KDE_HANDBOOK="optional" |
412 |
-KDE_DOC_DIRS="doc doc-translations/%lingua_${PN}" |
413 |
-inherit kde4-base |
414 |
- |
415 |
-DESCRIPTION="The advanced network neighborhood browser by KDE" |
416 |
-HOMEPAGE="https://sourceforge.net/projects/smb4k/" |
417 |
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz" |
418 |
- |
419 |
-LICENSE="GPL-2" |
420 |
-SLOT="4" |
421 |
-KEYWORDS="amd64 x86" |
422 |
-IUSE="debug" |
423 |
- |
424 |
-RDEPEND="net-fs/samba[cups]" |
425 |
-DEPEND="${RDEPEND} |
426 |
- sys-devel/gettext |
427 |
-" |
428 |
- |
429 |
-DOCS=( AUTHORS BUGS ChangeLog README ) |
430 |
- |
431 |
-PATCHES=( "${FILESDIR}/${P}-CVE-2017-8849.patch" ) |