D9888: Make kdesu work when PWD is /usr/bin

Harald Sitter noreply at phabricator.kde.org
Mon Jan 15 13:23:51 UTC 2018


sitter accepted this revision.
sitter added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> suprocess.cpp:122
>  
> -    QByteArray command;
> -    if (d->superUserCommand == QLatin1String("sudo")) {
> -        command = __PATH_SUDO;
> -    } else {
> -        command = __PATH_SU;
> -    }
> -
> -    if (QT_ACCESS(command.constData(), X_OK) != 0) {
> -        command = QFile::encodeName(QStandardPaths::findExecutable(d->superUserCommand));
> -        if (command.isEmpty()) {
> -            return check ? SuNotFound : -1;
> -        }
> +    QByteArray command = QFile::encodeName(QStandardPaths::findExecutable(d->superUserCommand));
> +    if (command.isEmpty()) {

Could probably make it `const` now

REPOSITORY
  R299 KDESu

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D9888

To: mwolff, dfaure, mpyne, sitter
Cc: sitter, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180115/467969f1/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list