From nobody Fri May 19 08:10:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QMzzt1M7sz4BcrV; Fri, 19 May 2023 08:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QMzzt0vxQz4CbS; Fri, 19 May 2023 08:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684483834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nOPsWeGYpFYP1rSb8g/cXP4ebuMZUMXOhKHe+tSvFxA=; b=yJf4IihEZfFH17/JhnEouI/DU+HZ2SIYfZoeQmuShCzoBVis9l/wfwGQzSJ8HBsoQMXvPM HgA9oTyHf4oWatMWyUyBGx0kl83XdMb3NJjvoi/7kZwcu4i2YRj1IM+pTnbr3nh3IsdZA4 2qg1M72IeY0bNEnYj0Y9uzoqObwKqUqnZEscAQ32SWtsVMKkVNn+ICnQAkw2aqtvGkWd59 cAQjBLbJK49cUO2JDRuc6+WJHe/r7VN09P5IzQ6b7FU47d0/a0ADylsjdwm7mwB0SgCm4f pQ+sLXC4sGNVLx21Dj2PY0B5gEWYzGsHB85MQd1KruRBmX9zb9Ti0iC72s6SGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684483834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nOPsWeGYpFYP1rSb8g/cXP4ebuMZUMXOhKHe+tSvFxA=; b=dJ/xlkeonrPwcYZ8lFR9qCFAMbgk/3bzjqiLpv84uilyn5Irpgf6ZWJkoKIesRXkDppE1/ 8nANzrZAdJezpspeXLuXfBakcm6N/gmvhdS8u+D7I7e8yUPZmR92Lqc6LHrRtbYmiPPvyR dTJwvGgtUn4lhAWlUzwxutTDdcyyi01kuKPEnhiPJlaXf1JRKpenk46RGQS2R+sAYvr5Pm E21SjmslkoKMMQzufqcvGFzReI3kbTUTXKmmoEpkhY4YKsGcASRAUq+je8T/TyOSP882xj 48fgXqZhedLkhu0+q0QtFWLS76dTKbN62sI/Uka3wJX4Ccyvij0pQIfLAgYoTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684483834; a=rsa-sha256; cv=none; b=AaFMJW8vklP2ZO/s15VCmokMS4ocpcaFo+TLE44x+o841SCP5+b4+2pmke75na6B/VkXZE miRNBK3WKGv2aHpAem8fWxI6D0tx+dDWoZ+da45C1lgJl1NkM7krKuplEXq6geU7etgqeq WahN9rZzVbe213V53naHOBYyhlfRGDWhBp9Prd/1GBz58CwAofgLUWQKxi5Ev/y6c5/sPr pyNL6jZv3ZuN6XgMsdwKdWI3cU/FHKNz7I6H4gI0v9lAslKGDbFUZ7WPpzMGB//o+2nHAm MuWvKCzI9GFY/wG3bggCzhTxrZHX8G+fc/E779VWJB5bwEjMpNPtFzuaavR06A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QMzzt021XzL4t; Fri, 19 May 2023 08:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34J8AX82009932; Fri, 19 May 2023 08:10:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34J8AXd9009931; Fri, 19 May 2023 08:10:33 GMT (envelope-from git) Date: Fri, 19 May 2023 08:10:33 GMT Message-Id: <202305190810.34J8AXd9009931@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 732f13ad32dc - stable/13 - pw: The pw_checkname function has added ';' checking. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 732f13ad32dc7ddc951f9dcdb969b933bcacf631 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=732f13ad32dc7ddc951f9dcdb969b933bcacf631 commit 732f13ad32dc7ddc951f9dcdb969b933bcacf631 Author: pbuff AuthorDate: 2023-05-16 03:05:30 +0000 Commit: Baptiste Daroussin CommitDate: 2023-05-19 08:10:09 +0000 pw: The pw_checkname function has added ';' checking. The pw_checkname function forgot to include a ';' when checking usernames, causing shell commands to be executed when a username with a ';' is deleted. PR: 271427 MFC After: 3 days (cherry picked from commit e0155c6989049da43c5499f7129002aa17d1ca79) --- usr.sbin/pw/pw_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index f0f87b923c0d..1b986e7c6985 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -637,7 +637,7 @@ pw_checkname(char *name, int gecos) showtype = "gecos field"; } else { /* See if the name is valid as a userid or group. */ - badchars = " ,\t:+&#%$^()!@~*?<>=|\\/\""; + badchars = " ,\t:+&#%$^()!@~*?<>=|\\/\";"; showtype = "userid/group name"; /* Userids and groups can not have a leading '-'. */ if (*ch == '-')