Package: marble Version: 4:16.04.1-3 Severity: wishlist Dear Maintainer,
marble has for ages disabled symlinks traversal in a great part of the local cache code. I know for certain that developers have decided to do so to avoid user reports related to dangling symlinks (sorry, I can't find a reference now). This bug report is to see if the Debian maintainers agree this is wrong. Attached you'll find a patch that removes all the references to QDir::NoSymLinks from the code. I tested it and it works fine now. I will keep having this patch around, but I hope you find it useful too, so everyone else can profit from it, and I don't have to recompile marble from time to time :) Cheers, -- Marcos. -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (700, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages marble depends on: ii libc6 2.24-3 ii libgcc1 1:6.2.0-6 ii libkf5configcore5 5.26.0-1 ii libkf5configgui5 5.26.0-1 ii libkf5configwidgets5 5.26.0-1 ii libkf5coreaddons5 5.26.0-3 ii libkf5i18n5 5.26.0-1 ii libkf5kiowidgets5 5.26.0-1 ii libkf5newstuff5 5.26.0-1 ii libkf5parts5 5.26.0-1 ii libkf5runner5 5.26.0-1 ii libkf5widgetsaddons5 5.26.0-1 ii libkf5xmlgui5 5.26.0-1 ii libmarblewidget-qt5-24 4:16.04.1-3 ii libqt5core5a 5.6.1+dfsg-3+b1 ii libqt5dbus5 5.6.1+dfsg-3+b1 ii libqt5gui5 5.6.1+dfsg-3+b1 ii libqt5network5 5.6.1+dfsg-3+b1 ii libqt5printsupport5 5.6.1+dfsg-3+b1 ii libqt5widgets5 5.6.1+dfsg-3+b1 ii libqt5xml5 5.6.1+dfsg-3+b1 ii libstdc++6 6.2.0-6 ii marble-data 4:16.04.1-3 ii marble-plugins 4:16.04.1-3 marble recommends no packages. Versions of packages marble suggests: pn gosmore <none> pn monav-routing-daemon <none> pn routino <none> -- no debconf information -- (Not so) Random fortune: Terrorism isn't a crime against people or property. It's a crime against our minds, using the death of innocents and destruction of property to make us fearful. -- Bruce Schneier
--- a/src/lib/marble/DataMigration.cpp +++ b/src/lib/marble/DataMigration.cpp @@ -130,10 +130,8 @@ QDir sourceDir( sourceDirPath ); // Creating child file/dir lists. QStringList files = sourceDir.entryList( QDir::Files - | QDir::NoSymLinks | QDir::NoDotAndDotDot ); QStringList childDirs = sourceDir.entryList( QDir::Dirs - | QDir::NoSymLinks | QDir::NoDotAndDotDot ); int childSliceSize = 0; if( !childDirs.isEmpty() ) { --- a/src/lib/marble/FileStoragePolicy.cpp +++ b/src/lib/marble/FileStoragePolicy.cpp @@ -111,7 +111,7 @@ continue; } - QDirIterator itTile( tileDirectory, QDir::Files | QDir::NoSymLinks, QDirIterator::Subdirectories ); + QDirIterator itTile( tileDirectory, QDir::Files, QDirIterator::Subdirectories ); while (itTile.hasNext()) { itTile.next(); QString filePath = itTile.filePath(); --- a/src/lib/marble/MapThemeManager.cpp +++ b/src/lib/marble/MapThemeManager.cpp @@ -273,7 +273,6 @@ QStringList mapPaths = paths.entryList( QStringList( "*" ), QDir::AllDirs - | QDir::NoSymLinks | QDir::NoDotAndDotDot ); QStringList mapDirs; @@ -282,7 +281,6 @@ QStringList themeMapPaths = themeDir.entryList( QStringList( "*" ), QDir::AllDirs | - QDir::NoSymLinks | QDir::NoDotAndDotDot ); for ( int theme = 0; theme < themeMapPaths.size(); ++theme ) { mapDirs << mapPathName + '/' + mapPaths.at( planet ) + '/' @@ -296,7 +294,7 @@ QString themeDir = it.next() + '/'; QString themeDirName = QDir( themeDir ).path().section( '/', -2, -1 ); QStringList tmp = QDir( themeDir ).entryList( QStringList( "*.dgml" ), - QDir::Files | QDir::NoSymLinks ); + QDir::Files ); if ( !tmp.isEmpty() ) { QStringListIterator k( tmp ); while ( k.hasNext() ) { @@ -502,7 +500,6 @@ QDir mapPath( mapPathName ); QStringList orbDirNames = mapPath.entryList( QStringList( "*" ), QDir::AllDirs - | QDir::NoSymLinks | QDir::NoDotAndDotDot ); QStringListIterator itOrb( orbDirNames ); while ( itOrb.hasNext() ) { @@ -512,7 +509,6 @@ QDir orbPath( orbPathName ); QStringList themeDirNames = orbPath.entryList( QStringList( "*" ), QDir::AllDirs - | QDir::NoSymLinks | QDir::NoDotAndDotDot ); QStringListIterator itThemeDir( themeDirNames ); while ( itThemeDir.hasNext() ) { @@ -521,8 +517,7 @@ QDir themePath( themePathName ); QStringList themeFileNames = themePath.entryList( QStringList( "*.dgml" ), - QDir::Files - | QDir::NoSymLinks ); + QDir::Files ); QStringListIterator itThemeFile( themeFileNames ); while ( itThemeFile.hasNext() ) { QString themeFilePathName = themePathName + '/' + itThemeFile.next(); --- a/src/lib/marble/TileLoader.cpp +++ b/src/lib/marble/TileLoader.cpp @@ -155,8 +155,7 @@ const QFileInfo themeStr( tileData.themeStr() ); const QString tilepath = themeStr.isAbsolute() ? themeStr.absoluteFilePath() : MarbleDirs::path( tileData.themeStr() ); // mDebug() << "StackedTileLoader::maxPartialTileLevel tilepath" << tilepath; - QStringList leveldirs = QDir( tilepath ).entryList( QDir::AllDirs | QDir::NoSymLinks - | QDir::NoDotAndDotDot ); + QStringList leveldirs = QDir( tilepath ).entryList( QDir::AllDirs | QDir::NoDotAndDotDot ); QStringList::const_iterator it = leveldirs.constBegin(); QStringList::const_iterator const end = leveldirs.constEnd(); --- a/src/plugins/runner/kml/KmlDocument.cpp +++ b/src/plugins/runner/kml/KmlDocument.cpp @@ -37,7 +37,7 @@ void KmlDocument::removeDirectoryRecursively( const QString &path ) { - QStringList const subdirs = QDir( path ).entryList( QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot ); + QStringList const subdirs = QDir( path ).entryList( QDir::Dirs | QDir::NoDotAndDotDot ); foreach( const QString &subdir, subdirs ) { removeDirectoryRecursively( path + '/' + subdir ); }