From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uOjKL4L9mWGp6AAAgWs5BA (envelope-from ) for ; Sun, 21 Nov 2021 09:04:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gMyHK4L9mWEiAwAA1q6Kng (envelope-from ) for ; Sun, 21 Nov 2021 08:04:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 252D82ADAD for ; Sun, 21 Nov 2021 09:04:18 +0100 (CET) Received: from localhost ([::1]:57010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mohpg-0000EY-Sl for larch@yhetil.org; Sun, 21 Nov 2021 03:04:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mohpT-0000E0-3j for bug-guix@gnu.org; Sun, 21 Nov 2021 03:04:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mohpS-00012s-RZ for bug-guix@gnu.org; Sun, 21 Nov 2021 03:04:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mohpS-0002mp-Fd for bug-guix@gnu.org; Sun, 21 Nov 2021 03:04:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52011: pkexec: PATH environment variable Resent-From: "Hamzeh Nasajpour" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 21 Nov 2021 08:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52011 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 52011@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163748181410663 (code B ref -1); Sun, 21 Nov 2021 08:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Nov 2021 08:03:34 +0000 Received: from localhost ([127.0.0.1]:44064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mohp0-0002lv-9K for submit@debbugs.gnu.org; Sun, 21 Nov 2021 03:03:34 -0500 Received: from lists.gnu.org ([209.51.188.17]:58600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mohoy-0002ln-MT for submit@debbugs.gnu.org; Sun, 21 Nov 2021 03:03:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mohoy-0000A7-IT for bug-guix@gnu.org; Sun, 21 Nov 2021 03:03:32 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:45577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mohow-0000w2-8V for bug-guix@gnu.org; Sun, 21 Nov 2021 03:03:32 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 905A35C00CB for ; Sun, 21 Nov 2021 03:03:27 -0500 (EST) Received: from imap44 ([10.202.2.94]) by compute4.internal (MEProxy); Sun, 21 Nov 2021 03:03:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantherx.org; h= mime-version:message-id:date:from:to:subject:content-type; s= fm1; bh=RsJVCmKACiD9vePqZo3truO3tRgGJW9cYGt8jlK2cik=; b=fT1rU3Xj IN9/RFtyVgV8Y63cTZmN5fwfU4izCwVAwE7Brsrj81CC5Kl4BpsqZlmI+aW9maOd DBsn0WmP6VEvSk+YgUHakiTIYj00eTmYCtKUaIW5c/UGo+jE57VUFXaLjmnVd5Uz KHpbiZ+C0zBe1bFXvyLh8wXLp83xM/whQvQIjClewezO6eRT04b1gn0xnWGQ8mKJ Cl/pMAR+F7+xPYnQ9FldFMjj/jrsLSUA4K4UI05izvMyvwHDNq/C9lSPqIrfdtwL qqc8ByRC3wtxqpI2Xeqp3BniOjIIfYSmXuoyPJzCDHZwpYFuz+Xkf6e+xXDFh7PS OxPR7Cp0OMLXig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=RsJVCmKACiD9vePqZo3truO3tRgGJ W9cYGt8jlK2cik=; b=jYaWVs2MM5Zo8tN9IrIKqoms55O8FJpCCvVRHUdUHnBOj QUVazKPoiOP10y3DBaCAZcTL3ARCtK1fCqKgFlSmrKgOyNdfpZ1BoQz0e1qgyOyo z3TpkI9OKugpf7rse5mKW2nIaV0yh2VaDdwVTGDw56t/X5dMYPWy9NVbdOlldxmk JkkZZiJuwTSu3YjclcHd68IIuLBONdCoZU4YXCnI2JuiYPDGwMcx6P9Wsl6fbShW nXSklRovbr6ynpF0DywXDfyXHKCk8A/cbQIDAwUmbVbgyCGz4U+6KrL6GEuPs60y ReABCfCDYdal7kLJLBpz4IaU4N5zBiukOQ3QvO0bA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrgedugdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsehttdertd erredtnecuhfhrohhmpedfjfgrmhiivghhucfprghsrghjphhouhhrfdcuoehhrdhnrghs rghjphhouhhrsehprghnthhhvghrgidrohhrgheqnecuggftrfgrthhtvghrnhepgeehtd efiefgtdekvdfghedvgeelheekvdfhgffhjeeuleeltdevleefhfelveffnecuffhomhgr ihhnpehgihhthhhusgdrtghomhdpphgrshhsfihorhgurdhruhhnnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhdrnhgrshgrjhhpohhurhes phgrnhhthhgvrhigrdhorhhg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 4E298FA0AA6; Sun, 21 Nov 2021 03:03:27 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1371-g2296cc3491-fm-20211109.003-g2296cc34 Mime-Version: 1.0 Message-Id: <46b16bf3-e41c-4ccf-9817-879df6eeb8cb@www.fastmail.com> Date: Sun, 21 Nov 2021 11:33:05 +0330 From: "Hamzeh Nasajpour" Content-Type: text/plain Received-SPF: pass client-ip=66.111.4.26; envelope-from=h.nasajpour@pantherx.org; helo=out2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637481858; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=RsJVCmKACiD9vePqZo3truO3tRgGJW9cYGt8jlK2cik=; b=WBBDm31aKe1Jv+73sEB/SfAFzMBPOrGo3IT/lTN7K9OXzHgRy+8rR80XS8Mn8CKZe6hZzN oHDjImFG1PmS4ADkRt4w2HTMwZW3j9ik8ZaO98nQTt7uvQoJamMABZBDIqFCvkO3IfIX3I 8dpMFI3fzg7Ip7CtQqbVaZaqMjn6diWZdlkrSbh0R7BvIdiaK42haYi+PpQ+mujUe82sUv r+Bcmqa2rc3HI1hY36P06kPcHXT5kkcoNNZHTNMLi3IwEvjhVoIbCShFFZTUOdGNjLbBK/ 0K/XsEXlamHIFGtgfFOl1CpZrSii8S3jyJzHiXytQ7Nwz/arus8DigODI7VHow== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637481858; a=rsa-sha256; cv=none; b=IUB5FtBrNO4/L/qHxGdw3JqtrPSYh68tlv4Lewf8Kem8o/pC35cotmQ1pP0CQ14Uncd8H+ h06rdRohzXGSOIGW7vbARhy2UR0aKRO9T+HDAsDrVVWMJwRByJFvAIjrn66bHim+OTCqEC JN8nrGbyW3k4d69oSWNkpkzYkBUFY1XeaXUHDWy4ToigeRTBF6jIf6rNU62AxuG03n+KNf LzJLw5yoC2lZ6oG6ePeJruR8B1E8aZKU5DZt7hN0jaHYinfFyahhLfuPYI2Zt9C4h2pGT5 bvp+lsWGBS4GG1tzl4ZKR/co4aDWI1GPl1KkQ5YJIiLbckrLlH2n4LDN31KQGA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm1 header.b=fT1rU3Xj; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=jYaWVs2M; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm1 header.b=fT1rU3Xj; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=jYaWVs2M; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 252D82ADAD X-Spam-Score: -1.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: IOxQDGYBd/vQ The `PATH` environment variable is hard-code here: https://github.com/freedesktop/polkit/blob/master/src/programs/pkexec.c#L882-L886 We don't have any executable in these paths in guix: ``` /usr/sbin:/usr/bin:/sbin:/bin:/root/bin ``` Replicate the issue: 1. Run the `pkexec` 2. Enter your password 3. run `echo $PATH` in the opened terminal 4. You will see this path: `/usr/sbin:/usr/bin:/sbin:/bin:/root/bin` 5. You can't run most of the commands. (`ls`, `passwd`, `chpasswd` and so on.) Expected Behavior: Running all of the commands without any error. Isn't it? Should not we patch the `PATH` environment variable in `pkexec` source codes? Either way, some applications like `lxqt-admin-user` and `lxqt-admin-time` has an issue and they can't run the commands via `pkexec`. I get this error when I want to change user password via `lxqt-admin-user`. It's using `pkexec` to change password. ``` /run/current-system/profile/bin/lxqt-admin-user-helper: line 7: exec: passwd: not found ``` -- Hamzeh Nasajpour PantherX Team