From owner-svn-ports-all@freebsd.org Wed Aug 29 18:08:41 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A9F610917FB; Wed, 29 Aug 2018 18:08:41 +0000 (UTC) (envelope-from jsm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 149C5786AF; Wed, 29 Aug 2018 18:08:41 +0000 (UTC) (envelope-from jsm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C632C209B8; Wed, 29 Aug 2018 18:08:40 +0000 (UTC) (envelope-from jsm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7TI8ehB033644; Wed, 29 Aug 2018 18:08:40 GMT (envelope-from jsm@FreeBSD.org) Received: (from jsm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7TI8d0e033635; Wed, 29 Aug 2018 18:08:39 GMT (envelope-from jsm@FreeBSD.org) Message-Id: <201808291808.w7TI8d0e033635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jsm set sender to jsm@FreeBSD.org using -f From: Jesper Schmitz Mouridsen Date: Wed, 29 Aug 2018 18:08:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r478364 - in head/security: . lxqt-sudo lxqt-sudo/files X-SVN-Group: ports-head X-SVN-Commit-Author: jsm X-SVN-Commit-Paths: in head/security: . lxqt-sudo lxqt-sudo/files X-SVN-Commit-Revision: 478364 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 18:08:41 -0000 Author: jsm Date: Wed Aug 29 18:08:38 2018 New Revision: 478364 URL: https://svnweb.freebsd.org/changeset/ports/478364 Log: New port security/lxqt-sudo PR: 229293 Approved by: swills (mentor) Differential Revision: https://reviews.freebsd.org/D16944 Added: head/security/lxqt-sudo/ head/security/lxqt-sudo/Makefile (contents, props changed) head/security/lxqt-sudo/distinfo (contents, props changed) head/security/lxqt-sudo/files/ head/security/lxqt-sudo/files/patch-sudo.cpp (contents, props changed) head/security/lxqt-sudo/pkg-descr (contents, props changed) head/security/lxqt-sudo/pkg-message (contents, props changed) head/security/lxqt-sudo/pkg-plist (contents, props changed) Modified: head/security/Makefile Modified: head/security/Makefile ============================================================================== --- head/security/Makefile Wed Aug 29 17:56:34 2018 (r478363) +++ head/security/Makefile Wed Aug 29 18:08:38 2018 (r478364) @@ -400,6 +400,7 @@ SUBDIR += logcheck SUBDIR += luasec SUBDIR += luasec-51 + SUBDIR += lxqt-sudo SUBDIR += lynis SUBDIR += mac-robber SUBDIR += maia Added: head/security/lxqt-sudo/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/lxqt-sudo/Makefile Wed Aug 29 18:08:38 2018 (r478364) @@ -0,0 +1,24 @@ +# Created by: Olivier Duchateau +# $FreeBSD$ + +PORTNAME= lxqt-sudo +PORTVERSION= 0.13.0 +CATEGORIES= security +MASTER_SITES= LXQT + +MAINTAINER= jsm@FreeBSD.org +COMMENT= GUI frontend to su/sudo for LXQt desktop + +LICENSE= LGPL21+ + +RUN_DEPENDS= sudo:security/sudo + +USES= cmake:outsource compiler:c++11-lib gettext kde:5 lxqt qt:5 \ + pkgconfig tar:xz +USE_QT= buildtools_build qmake_build core dbus gui svg widgets \ + x11extras xml + +USE_KDE= windowsystem +USE_LXQT= buildtools lxqt + +.include Added: head/security/lxqt-sudo/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/lxqt-sudo/distinfo Wed Aug 29 18:08:38 2018 (r478364) @@ -0,0 +1,3 @@ +TIMESTAMP = 1527328596 +SHA256 (lxqt/lxqt-sudo-0.13.0.tar.xz) = 8e05adf4926eead9fa3015be54a76f67ebf3f7c40e1dea0bcafbcf4c38e548c8 +SIZE (lxqt/lxqt-sudo-0.13.0.tar.xz) = 16208 Added: head/security/lxqt-sudo/files/patch-sudo.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/lxqt-sudo/files/patch-sudo.cpp Wed Aug 29 18:08:38 2018 (r478364) @@ -0,0 +1,60 @@ +--- sudo.cpp.orig 2018-05-21 19:10:17 UTC ++++ sudo.cpp +@@ -36,7 +36,13 @@ + #include + #include + #include ++#if defined(__linux__) + #include ++#elif defined(__FreeBSD__) ++#include ++#include ++#include ++#endif + #include + #include + #include +@@ -52,6 +58,9 @@ namespace + + const QString su_prog{QStringLiteral(LXQTSUDO_SU)}; + const QString sudo_prog{QStringLiteral(LXQTSUDO_SUDO)}; ++#ifdef __FreeBSD__ ++ const QString pwd_prompt_end_c_locale{QStringLiteral(":")}; ++#endif + const QString pwd_prompt_end{QStringLiteral(": ")}; + const QChar nl{QLatin1Char('\n')}; + +@@ -179,6 +188,10 @@ void Sudo::child() + if (BACK_SU == mBackend) + { + program = su_prog.toStdString(); ++#ifdef __FreeBSD__ ++ *(param_arg++) = "-m"; ++ *(param_arg++) = "root"; ++#endif + *(param_arg++) = "-c"; //run command + } else + { +@@ -200,7 +213,6 @@ void Sudo::child() + + setsid(); //session leader + execvp(params[0], const_cast(params.get())); +- + //exec never returns in case of success + QTextStream{stderr, QIODevice::WriteOnly} << tr("%1: Failed to exec '%2': %3\n").arg(app_master).arg(params[0]).arg(strerror(errno)); + exit(1); +@@ -277,8 +289,13 @@ int Sudo::parent() + lxqtApp->quit(); + } else + { +- if (line.endsWith(pwd_prompt_end)) ++#ifdef __FreeBSD__ ++ if( line.endsWith(pwd_prompt_end_c_locale) || line.endsWith(pwd_prompt_end)) ++#else ++ if(line.endsWith(pwd_prompt_end)) ++#endif + { ++ + //if now echo is turned off, su/sudo requests password + struct termios tios; + //loop to be sure we don't miss the flag (we can afford such small delay in "normal" output processing) Added: head/security/lxqt-sudo/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/lxqt-sudo/pkg-descr Wed Aug 29 18:08:38 2018 (r478364) @@ -0,0 +1,5 @@ +lxqt-sudo and lxsu is a graphical front-end of commands +sudo and su respectively. +It enables regular users to launch applications with permissions of root. + +WWW: http://lxqt.org/ Added: head/security/lxqt-sudo/pkg-message ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/lxqt-sudo/pkg-message Wed Aug 29 18:08:38 2018 (r478364) @@ -0,0 +1,2 @@ +* You must be in the sudoers file in order to use lxqt-sudo +* You must be in the the wheel group in order to use lxsu Added: head/security/lxqt-sudo/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/lxqt-sudo/pkg-plist Wed Aug 29 18:08:38 2018 (r478364) @@ -0,0 +1,6 @@ +bin/lxqt-sudo +bin/lxsu +bin/lxsudo +man/man1/lxqt-sudo.1.gz +man/man1/lxsu.1.gz +man/man1/lxsudo.1.gz