Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kdesu for openSUSE:Factory checked in at 2021-09-16 23:13:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdesu (Old) and /work/SRC/openSUSE:Factory/.kdesu.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdesu" Thu Sep 16 23:13:56 2021 rev:94 rq:919186 version:5.86.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kdesu/kdesu.changes 2021-08-16 10:11:47.775083704 +0200 +++ /work/SRC/openSUSE:Factory/.kdesu.new.1899/kdesu.changes 2021-09-16 23:15:42.955863179 +0200 @@ -1,0 +2,14 @@ +Wed Sep 15 08:24:03 UTC 2021 - Christophe Giboudeaux <christo...@krop.fr> + +- Drop the unneeded baselibs.conf. + +------------------------------------------------------------------- +Mon Sep 6 06:22:02 UTC 2021 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.86.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/5/5.86.0 +- No code change since 5.85.0 + +------------------------------------------------------------------- Old: ---- baselibs.conf kdesu-5.85.0.tar.xz kdesu-5.85.0.tar.xz.sig New: ---- kdesu-5.86.0.tar.xz kdesu-5.86.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdesu.spec ++++++ --- /var/tmp/diff_new_pack.J4Slho/_old 2021-09-16 23:15:43.687863937 +0200 +++ /var/tmp/diff_new_pack.J4Slho/_new 2021-09-16 23:15:43.687863937 +0200 @@ -17,14 +17,14 @@ %define lname libKF5Su5 -%define _tar_path 5.85 +%define _tar_path 5.86 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} %bcond_without lang Name: kdesu -Version: 5.85.0 +Version: 5.86.0 Release: 0 Summary: User interface for running shell commands with root privileges License: LGPL-2.1-or-later @@ -35,7 +35,6 @@ Source1: https://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz.sig Source2: frameworks.keyring %endif -Source99: baselibs.conf # PATCH-FIX-OPENSUSE fpie.patch -- make kdesud compile/link with -(f)pie flags Patch0: fpie.patch # PATCH-FIX-OPENSUSE ++++++ kdesu-5.85.0.tar.xz -> kdesu-5.86.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/.git-blame-ignore-revs new/kdesu-5.86.0/.git-blame-ignore-revs --- old/kdesu-5.85.0/.git-blame-ignore-revs 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/.git-blame-ignore-revs 2021-09-04 18:59:29.000000000 +0200 @@ -1,4 +1,5 @@ -#clang-format +#clang-format/tidy 691c88fc043d0869f45b2599dd50f0d24fe354bf 4f93a935a58cd83eb16da36b2230509d98a272b3 92eab58db2b4bb520387ef6e7610753f798d314c +c70f6b8ddb8a5136f1686179c3a0cbf7c8fa1134 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/CMakeLists.txt new/kdesu-5.86.0/CMakeLists.txt --- old/kdesu-5.85.0/CMakeLists.txt 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/CMakeLists.txt 2021-09-04 18:59:29.000000000 +0200 @@ -1,18 +1,18 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "5.85.0") # handled by release scripts -set(KF_DEP_VERSION "5.85.0") # handled by release scripts +set(KF_VERSION "5.86.0") # handled by release scripts +set(KF_DEP_VERSION "5.86.0") # handled by release scripts project(KDESu VERSION ${KF_VERSION}) include(FeatureSummary) -find_package(ECM 5.85.0 NO_MODULE) +find_package(ECM 5.86.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) -set(REQUIRED_QT_VERSION 5.15.0) +set(REQUIRED_QT_VERSION 5.15.2) find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) include(KDEInstallDirs) include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) @@ -56,7 +56,7 @@ VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdesu_version.h" PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5SuConfigVersion.cmake" SOVERSION 5) -add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00) +add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f02) add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055100) ki18n_install(po) add_subdirectory(src) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/po/zh_CN/kdesud5.po new/kdesu-5.86.0/po/zh_CN/kdesud5.po --- old/kdesu-5.85.0/po/zh_CN/kdesud5.po 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/po/zh_CN/kdesud5.po 2021-09-04 18:59:29.000000000 +0200 @@ -7,7 +7,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2021-03-14 19:34+0000\n" -"PO-Revision-Date: 2021-07-26 13:47\n" +"PO-Revision-Date: 2021-08-30 11:43\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/src/client.cpp new/kdesu-5.86.0/src/client.cpp --- old/kdesu-5.85.0/src/client.cpp 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/src/client.cpp 2021-09-04 18:59:29.000000000 +0200 @@ -305,7 +305,8 @@ cmd += '\n'; QByteArray reply; command(cmd, &reply); - int index = 0, pos; + int index = 0; + int pos; QList<QByteArray> list; if (!reply.isEmpty()) { while (1) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/src/kdesu_stub.c new/kdesu-5.86.0/src/kdesu_stub.c --- old/kdesu-5.85.0/src/kdesu_stub.c 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/src/kdesu_stub.c 2021-09-04 18:59:29.000000000 +0200 @@ -144,7 +144,8 @@ int i = 0; int size = 10; char **list = (char **)xmalloc(size * sizeof(char *)); - char *ptr = str, *nptr; + char *ptr = str; + char *nptr; while ((nptr = strchr(ptr, ',')) != 0L) { if (i > size - 2) { list = xrealloc(list, (size *= 2) * sizeof(char *)); @@ -164,7 +165,8 @@ static void dequote(char *buf) { - char *in, *out; + char *in; + char *out; for (in = buf, out = buf; *in; in++, out++) { char c = *in; if (c == '\\') { @@ -189,7 +191,8 @@ { char buf[BUFSIZE + 1]; char xauthority[200]; - int i, prio; + int i; + int prio; pid_t pid; FILE *fout; struct passwd *pw; @@ -354,7 +357,9 @@ } if (pid) { /* Parent: wait for child, delete tempfiles and return. */ - int ret, state, xit = 1; + int ret; + int state; + int xit = 1; while (1) { ret = waitpid(pid, &state, 0); if (ret == -1) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/src/kdesud/handler.cpp new/kdesu-5.86.0/src/kdesud/handler.cpp --- old/kdesu-5.85.0/src/kdesud/handler.cpp 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/src/kdesud/handler.cpp 2021-09-04 18:59:29.000000000 +0200 @@ -57,14 +57,16 @@ int ConnectionHandler::handle() { - int ret, nbytes; + int ret; + int nbytes; m_Buf.reserve(BUF_SIZE); nbytes = recv(m_Fd, m_Buf.data() + m_Buf.size(), BUF_SIZE - 1 - m_Buf.size(), 0); if (nbytes < 0) { - if (errno == EINTR) + if (errno == EINTR) { return 0; + } // read error return -1; } else if (nbytes == 0) { @@ -88,10 +90,12 @@ ::memset(m_Buf.data() + nsize, 'x', n); m_Buf.resize(nsize); ret = doCommand(newbuf); - if (newbuf.isDetached()) // otherwise somebody else will clear it + if (newbuf.isDetached()) { // otherwise somebody else will clear it newbuf.fill('x'); - if (ret < 0) + } + if (ret < 0) { return ret; + } } return 0; @@ -108,8 +112,9 @@ void ConnectionHandler::sendExitCode() { - if (!m_needExitCode) + if (!m_needExitCode) { return; + } QByteArray buf; buf.setNum(m_exitCode); buf.prepend("OK "); @@ -155,7 +160,13 @@ return -1; } - QByteArray key, command, pass, name, user, value, env_check; + QByteArray key; + QByteArray command; + QByteArray pass; + QByteArray name; + QByteArray user; + QByteArray value; + QByteArray env_check; Data_entry data; Lexer *l = new Lexer(buf); @@ -163,51 +174,61 @@ switch (tok) { case Lexer::Tok_pass: // "PASS password:string timeout:int\n" tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } m_Pass.fill('x'); m_Pass = l->lval(); tok = l->lex(); - if (tok != Lexer::Tok_num) + if (tok != Lexer::Tok_num) { goto parse_error; + } m_Timeout = l->lval().toInt(); - if (l->lex() != '\n') + if (l->lex() != '\n') { goto parse_error; - if (m_Pass.isNull()) + } + if (m_Pass.isNull()) { m_Pass = ""; + } qCDebug(KSUD_LOG) << "Password set!\n"; respond(Res_OK); break; case Lexer::Tok_host: // "HOST host:string\n" tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } m_Host = l->lval(); - if (l->lex() != '\n') + if (l->lex() != '\n') { goto parse_error; + } qCDebug(KSUD_LOG) << "Host set to " << m_Host; respond(Res_OK); break; case Lexer::Tok_prio: // "PRIO priority:int\n" tok = l->lex(); - if (tok != Lexer::Tok_num) + if (tok != Lexer::Tok_num) { goto parse_error; + } m_Priority = l->lval().toInt(); - if (l->lex() != '\n') + if (l->lex() != '\n') { goto parse_error; + } qCDebug(KSUD_LOG) << "priority set to " << m_Priority; respond(Res_OK); break; case Lexer::Tok_sched: // "SCHD scheduler:int\n" tok = l->lex(); - if (tok != Lexer::Tok_num) + if (tok != Lexer::Tok_num) { goto parse_error; + } m_Scheduler = l->lval().toInt(); - if (l->lex() != '\n') + if (l->lex() != '\n') { goto parse_error; + } qCDebug(KSUD_LOG) << "Scheduler set to " << m_Scheduler; respond(Res_OK); break; @@ -217,35 +238,41 @@ QByteArray options; QList<QByteArray> env; tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } command = l->lval(); tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } user = l->lval(); tok = l->lex(); if (tok != '\n') { - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } options = l->lval(); tok = l->lex(); while (tok != '\n') { - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } QByteArray env_str = l->lval(); env.append(env_str); - if (strncmp(env_str.constData(), "DESKTOP_STARTUP_ID=", strlen("DESKTOP_STARTUP_ID=")) != 0) + if (strncmp(env_str.constData(), "DESKTOP_STARTUP_ID=", strlen("DESKTOP_STARTUP_ID=")) != 0) { env_check += '*' + env_str; + } tok = l->lex(); } } QByteArray auth_user; - if ((m_Scheduler != SuProcess::SchedNormal) || (m_Priority > 50)) + if ((m_Scheduler != SuProcess::SchedNormal) || (m_Priority > 50)) { auth_user = "root"; - else + } else { auth_user = user; + } key = makeKey(2, m_Host, auth_user, command); // We only use the command if the environment is the same. if (repo->find(key) == env_check) { @@ -290,8 +317,9 @@ SuProcess proc; proc.setCommand(command); proc.setUser(user); - if (options.contains('x')) + if (options.contains('x')) { proc.setXOnly(true); + } proc.setPriority(m_Priority); proc.setScheduler(m_Scheduler); proc.setEnvironment(env); @@ -310,15 +338,18 @@ case Lexer::Tok_delCmd: // "DEL command:string user:string\n" tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } command = l->lval(); tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } user = l->lval(); - if (l->lex() != '\n') + if (l->lex() != '\n') { goto parse_error; + } key = makeKey(0, m_Host, user, command); if (repo->remove(key) < 0) { qCDebug(KSUD_LOG) << "Unknown command: " << command; @@ -332,12 +363,14 @@ case Lexer::Tok_delVar: // "DELV name:string \n" { tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } name = l->lval(); tok = l->lex(); - if (tok != '\n') + if (tok != '\n') { goto parse_error; + } key = makeKey(1, name); if (repo->remove(key) < 0) { qCDebug(KSUD_LOG) << "Unknown name: " << name; @@ -351,8 +384,9 @@ case Lexer::Tok_delGroup: // "DELG group:string\n" tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } name = l->lval(); if (repo->removeGroup(name) < 0) { qCDebug(KSUD_LOG) << "No keys found under group: " << name; @@ -365,34 +399,41 @@ case Lexer::Tok_delSpecialKey: // "DELS special_key:string\n" tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } name = l->lval(); - if (repo->removeSpecialKey(name) < 0) + if (repo->removeSpecialKey(name) < 0) { respond(Res_NO); - else + } else { respond(Res_OK); + } break; case Lexer::Tok_set: // "SET name:string value:string group:string timeout:int\n" tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } name = l->lval(); tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } data.value = l->lval(); tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } data.group = l->lval(); tok = l->lex(); - if (tok != Lexer::Tok_num) + if (tok != Lexer::Tok_num) { goto parse_error; + } data.timeout = l->lval().toInt(); - if (l->lex() != '\n') + if (l->lex() != '\n') { goto parse_error; + } key = makeKey(1, name); repo->add(key, data); qCDebug(KSUD_LOG) << "Stored key: " << key; @@ -401,69 +442,82 @@ case Lexer::Tok_get: // "GET name:string\n" tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } name = l->lval(); - if (l->lex() != '\n') + if (l->lex() != '\n') { goto parse_error; + } key = makeKey(1, name); qCDebug(KSUD_LOG) << "Request for key: " << key; value = repo->find(key); - if (!value.isEmpty()) + if (!value.isEmpty()) { respond(Res_OK, value); - else + } else { respond(Res_NO); + } break; case Lexer::Tok_getKeys: // "GETK groupname:string\n" tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } name = l->lval(); - if (l->lex() != '\n') + if (l->lex() != '\n') { goto parse_error; + } qCDebug(KSUD_LOG) << "Request for group key: " << name; value = repo->findKeys(name); - if (!value.isEmpty()) + if (!value.isEmpty()) { respond(Res_OK, value); - else + } else { respond(Res_NO); + } break; case Lexer::Tok_chkGroup: // "CHKG groupname:string\n" tok = l->lex(); - if (tok != Lexer::Tok_str) + if (tok != Lexer::Tok_str) { goto parse_error; + } name = l->lval(); - if (l->lex() != '\n') + if (l->lex() != '\n') { goto parse_error; + } qCDebug(KSUD_LOG) << "Checking for group key: " << name; - if (repo->hasGroup(name) < 0) + if (repo->hasGroup(name) < 0) { respond(Res_NO); - else + } else { respond(Res_OK); + } break; case Lexer::Tok_ping: // "PING\n" tok = l->lex(); - if (tok != '\n') + if (tok != '\n') { goto parse_error; + } respond(Res_OK); break; case Lexer::Tok_exit: // "EXIT\n" tok = l->lex(); - if (tok != '\n') + if (tok != '\n') { goto parse_error; + } m_needExitCode = true; - if (m_hasExitCode) + if (m_hasExitCode) { sendExitCode(); + } break; case Lexer::Tok_stop: // "STOP\n" tok = l->lex(); - if (tok != '\n') + if (tok != '\n') { goto parse_error; + } qCDebug(KSUD_LOG) << "Stopping by command"; respond(Res_OK); kdesud_cleanup(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/src/kdesud/kdesud.cpp new/kdesu-5.86.0/src/kdesud/kdesud.cpp --- old/kdesu-5.85.0/src/kdesud/kdesud.cpp 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/src/kdesud/kdesud.cpp 2021-09-04 18:59:29.000000000 +0200 @@ -285,8 +285,9 @@ // Create the Unix socket. int sockfd = create_socket(); - if (sockfd < 0) + if (sockfd < 0) { exit(1); + } if (listen(sockfd, 10) < 0) { qCCritical(KSUD_LOG) << "listen(): " << ERR << "\n"; kdesud_cleanup(); @@ -301,8 +302,9 @@ kdesud_cleanup(); exit(1); } - if (pid) + if (pid) { _exit(0); + } #if HAVE_X11 // Make sure we exit when the display gets closed. @@ -337,32 +339,37 @@ socklen_t addrlen; struct sockaddr_un clientname; - fd_set tmp_fds, active_fds; + fd_set tmp_fds; + fd_set active_fds; FD_ZERO(&active_fds); FD_SET(sockfd, &active_fds); FD_SET(pipeOfDeath[0], &active_fds); #if HAVE_X11 - if (x11Fd != -1) + if (x11Fd != -1) { FD_SET(x11Fd, &active_fds); + } #endif while (1) { tmp_fds = active_fds; #if HAVE_X11 - if (x11Display) + if (x11Display) { XFlush(x11Display); + } #endif if (select(maxfd + 1, &tmp_fds, nullptr, nullptr, nullptr) < 0) { - if (errno == EINTR) + if (errno == EINTR) { continue; + } qCCritical(KSUD_LOG) << "select(): " << ERR << "\n"; exit(1); } repo->expire(); for (int i = 0; i <= maxfd; i++) { - if (!FD_ISSET(i, &tmp_fds)) + if (!FD_ISSET(i, &tmp_fds)) { continue; + } if (i == pipeOfDeath[0]) { char buf[101]; @@ -389,9 +396,11 @@ if (i == x11Fd) { // Discard X events XEvent event_return; - if (x11Display) - while (XPending(x11Display)) + if (x11Display) { + while (XPending(x11Display)) { XNextEvent(x11Display, &event_return); + } + } continue; } #endif @@ -405,8 +414,9 @@ qCCritical(KSUD_LOG) << "accept():" << ERR << "\n"; continue; } - while (fd + 1 > (int)handler.size()) + while (fd + 1 > (int)handler.size()) { handler.append(nullptr); + } delete handler[fd]; handler[fd] = new ConnectionHandler(fd); maxfd = qMax(maxfd, fd); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/src/kdesud/lexer.cpp new/kdesu-5.86.0/src/kdesud/lexer.cpp --- old/kdesu-5.85.0/src/kdesud/lexer.cpp 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/src/kdesud/lexer.cpp 2021-09-04 18:59:29.000000000 +0200 @@ -44,22 +44,27 @@ while (1) { // newline? - if (c == '\n') + if (c == '\n') { return '\n'; + } // No control characters - if (iscntrl(c)) + if (iscntrl(c)) { return Tok_none; + } - if (isspace(c)) - while (isspace(c = m_Input[in++])) + if (isspace(c)) { + while (isspace(c = m_Input[in++])) { ; + } + } // number? if (isdigit(c)) { m_Output += c; - while (isdigit(c = m_Input[in++])) + while (isdigit(c = m_Input[in++])) { m_Output += c; + } in--; return Tok_num; } @@ -71,12 +76,14 @@ // handle escaped characters if (c == '\\') { c = m_Input[in++]; - if (iscntrl(c)) + if (iscntrl(c)) { return Tok_none; + } if (c == '^') { c = m_Input[in++]; - if ((c == '"') || iscntrl(c)) + if ((c == '"') || iscntrl(c)) { return Tok_none; + } m_Output += c - '@'; } else { m_Output += c; @@ -86,8 +93,9 @@ } c = m_Input[in++]; } - if (c == '"') + if (c == '"') { return Tok_str; + } return Tok_none; } @@ -100,38 +108,54 @@ // command? if (m_Output.length() <= 4) { - if (m_Output == "EXEC") + if (m_Output == "EXEC") { return Tok_exec; - if (m_Output == "PASS") + } + if (m_Output == "PASS") { return Tok_pass; - if (m_Output == "DEL") + } + if (m_Output == "DEL") { return Tok_delCmd; - if (m_Output == "PING") + } + if (m_Output == "PING") { return Tok_ping; - if (m_Output == "EXIT") + } + if (m_Output == "EXIT") { return Tok_exit; - if (m_Output == "STOP") + } + if (m_Output == "STOP") { return Tok_stop; - if (m_Output == "SET") + } + if (m_Output == "SET") { return Tok_set; - if (m_Output == "GET") + } + if (m_Output == "GET") { return Tok_get; - if (m_Output == "HOST") + } + if (m_Output == "HOST") { return Tok_host; - if (m_Output == "SCHD") + } + if (m_Output == "SCHD") { return Tok_sched; - if (m_Output == "PRIO") + } + if (m_Output == "PRIO") { return Tok_prio; - if (m_Output == "DELV") + } + if (m_Output == "DELV") { return Tok_delVar; - if (m_Output == "DELG") + } + if (m_Output == "DELG") { return Tok_delGroup; - if (m_Output == "DELS") + } + if (m_Output == "DELS") { return Tok_delSpecialKey; - if (m_Output == "GETK") + } + if (m_Output == "GETK") { return Tok_getKeys; - if (m_Output == "CHKG") + } + if (m_Output == "CHKG") { return Tok_chkGroup; + } } return Tok_str; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/src/kdesud/repo.cpp new/kdesu-5.86.0/src/kdesud/repo.cpp --- old/kdesu-5.85.0/src/kdesud/repo.cpp 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/src/kdesud/repo.cpp 2021-09-04 18:59:29.000000000 +0200 @@ -25,24 +25,28 @@ void Repository::add(const QByteArray &key, Data_entry &data) { RepoIterator it = repo.find(key); - if (it != repo.end()) + if (it != repo.end()) { remove(key); - if (data.timeout == 0) + } + if (data.timeout == 0) { data.timeout = (unsigned)-1; - else + } else { data.timeout += time(nullptr); + } head_time = qMin(head_time, data.timeout); repo.insert(key, data); } int Repository::remove(const QByteArray &key) { - if (key.isEmpty()) + if (key.isEmpty()) { return -1; + } RepoIterator it = repo.find(key); - if (it == repo.end()) + if (it == repo.end()) { return -1; + } it.value().value.fill('x'); it.value().group.fill('x'); repo.erase(it); @@ -92,8 +96,9 @@ if (!group.isEmpty()) { RepoCIterator it; for (it = repo.begin(); it != repo.end(); ++it) { - if (it.value().group == group) + if (it.value().group == group) { return 0; + } } } return -1; @@ -121,8 +126,9 @@ list += '\007'; // I do not know list.append(key); } - } else + } else { list = key; + } } } } @@ -131,20 +137,23 @@ QByteArray Repository::find(const QByteArray &key) const { - if (key.isEmpty()) + if (key.isEmpty()) { return nullptr; + } RepoCIterator it = repo.find(key); - if (it == repo.end()) + if (it == repo.end()) { return nullptr; + } return it.value().value; } int Repository::expire() { unsigned current = time(nullptr); - if (current < head_time) + if (current < head_time) { return 0; + } unsigned t; QStack<QByteArray> keys; @@ -152,14 +161,16 @@ RepoIterator it; for (it = repo.begin(); it != repo.end(); ++it) { t = it.value().timeout; - if (t <= current) + if (t <= current) { keys.push(it.key()); - else + } else { head_time = qMin(head_time, t); + } } int n = keys.count(); - while (!keys.isEmpty()) + while (!keys.isEmpty()) { remove(keys.pop()); + } return n; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/src/ptyprocess.cpp new/kdesu-5.86.0/src/ptyprocess.cpp --- old/kdesu-5.85.0/src/ptyprocess.cpp 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/src/ptyprocess.cpp 2021-09-04 18:59:29.000000000 +0200 @@ -92,7 +92,8 @@ */ int PtyProcess::checkPidExited(pid_t pid) { - int state, ret; + int state; + int ret; ret = waitpid(pid, &state, WNOHANG); if (ret < 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/src/sshprocess.cpp new/kdesu-5.86.0/src/sshprocess.cpp --- old/kdesu-5.85.0/src/sshprocess.cpp 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/src/sshprocess.cpp 2021-09-04 18:59:29.000000000 +0200 @@ -164,7 +164,9 @@ { Q_D(SshProcess); - unsigned i, j, colon; + unsigned i; + unsigned j; + unsigned colon; QByteArray line; int state = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/src/stubprocess.cpp new/kdesu-5.86.0/src/stubprocess.cpp --- old/kdesu-5.85.0/src/stubprocess.cpp 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/src/stubprocess.cpp 2021-09-04 18:59:29.000000000 +0200 @@ -127,7 +127,8 @@ int StubProcess::converseStub(int check) { - QByteArray line, tmp; + QByteArray line; + QByteArray tmp; while (1) { line = readLine(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesu-5.85.0/src/suprocess.cpp new/kdesu-5.86.0/src/suprocess.cpp --- old/kdesu-5.85.0/src/suprocess.cpp 2021-08-06 11:03:25.000000000 +0200 +++ new/kdesu-5.86.0/src/suprocess.cpp 2021-09-04 18:59:29.000000000 +0200 @@ -223,7 +223,8 @@ HandleStub, } state = WaitForPrompt; int colon; - unsigned i, j; + unsigned i; + unsigned j; QByteArray line; while (true) {