Description: run libexec/fileshareset with kdesu rather than setuid Run fileshareset with kdesu rather than rely on it to be setuid. filesharelist should not need root permissions on standard debian install. Author: Modestas Vainius Forwarded: no Origin: vendor Last-Update: 2010-05-31 --- a/kio/kio/kfileshare.cpp +++ b/kio/kio/kfileshare.cpp @@ -239,17 +239,19 @@ bool KFileShare::setShared( const QStrin return false; kDebug(7000) << path << "," << shared; + QString kdesu = ::findExe("kdesu"); QString exe = ::findExe( "fileshareset" ); - if (exe.isEmpty()) + if (kdesu.isEmpty() || exe.isEmpty()) return false; QStringList args; + args << "--" << exe; if ( shared ) args << "--add"; else args << "--remove"; args << path ; - int ec = QProcess::execute( exe, args ); // should be ok, the perl script terminates fast + int ec = QProcess::execute( kdesu, args ); // should be ok, the perl script terminates fast kDebug(7000) << "exitCode=" << ec; bool ok = !ec; switch (ec) {