From nobody Sun Jun 28 18:40:35 2026 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 4gpJBX2vywz6jkLS for ; Sun, 28 Jun 2026 18:40:36 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gpJBW71Lqz3Y7J for ; Sun, 28 Jun 2026 18:40:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782672036; 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=Nwzx/A8KAx0ewRtZuRDYBfxqYFOq2s7fX1Npb2I9osg=; b=aa6xRgxeUe3iupjmW7o6ZJtxIfBPY0WfKdQL+qakd83cat2+JCOO1HmwzeBHzSchatoRSI s48Nybs46AERncf03gdrNt1BFWIGBxkkYMQm8b8CUGA70UyPdCd60PJ7L9nHvL3D6wBGSB eTW+0+/Sl18bx4ggLFsNT/aJAkl43T1VqTNv3OKA6wkxleufpWJAEOI4AG27gOTRyYoZwd +ikMIAU6Tgbrf2LYiYQM6YwRnD4zdMVufbYDxS5OAXnTiRzYNdECzv2VDtqxLMCgsG5qzs a72ZaUn7ZHkPcAxMO28uBxm2E80+4Ru0gIpFi3/c3XpTOPVSrRA7ayWDnjL/Ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782672036; a=rsa-sha256; cv=none; b=GdZKMjmSLpXa7pwLVZQ/SaEzNTlRbBaaiz8tSSn1t2d7BvDHVFhbYXFirc+IF7SGWcyg7H /tjhbF5mLeXNUzSlq/9zSn+dBBv22ovcD19z3BIdqcu9F870bQD9hV3RUa+2QnBculVRnz a5hfB/2DzsHALYSq+efdq9IrOPHuG+uKjD7Lkb5B10kBqE3Ucw7pcv3kuLX9O9o+zMN2hv zv+LQaNLoFGOKRUxOZWrYmOiiOS7qf0Ai3mrRMFGHiadkZqwgjzlOeeGpHpxC2ADjcS/tH cjoeqljxTp23Tc54loVv3H0fTbDPlx3INv8V9qzMqdlilzMl6YIp37w6R5AyIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782672036; 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=Nwzx/A8KAx0ewRtZuRDYBfxqYFOq2s7fX1Npb2I9osg=; b=vRxDOgi7fbMpKYgzeqV1mCg11T3dGUWaNBiU3HCmlnZXECXXmWtrsr00H7rDHRCf5pMlNc IL1BV8Qt9jvjsVNfUFXsvorzPX+sAsbm9J35YU11kt2Z65jTGJ4Kb+6STiA+8oZQ5nIrXY cq/QEobKjTlb8sVp/YoFlFPBXUAbrhFqjaZxl3worrub8VAHsuB0uR68+xGq0BkV5CLTAs 0i36ydZMBkTYFfnZMFhQW4czeuEanNzHppwb9Nv6bMRiE6mAFfYwT28tgXw2MZCy9+oJ9+ KQkBjsgL1n5hXpEBUmjtVyVMRfQ0RVC0f0w3fPLfFd5ZSzilhXGJuf3oPt7wFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gpJBW65xTz6nj for ; Sun, 28 Jun 2026 18:40:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c228 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 28 Jun 2026 18:40:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: ae577a78a80a - stable/15 - pw: fix const qualification in unquote() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: ae577a78a80a4de85698b3ed7b4af1fb19f6abb5 Auto-Submitted: auto-generated Date: Sun, 28 Jun 2026 18:40:35 +0000 Message-Id: <6a416aa3.1c228.1244ec1a@gitrepo.freebsd.org> The branch stable/15 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=ae577a78a80a4de85698b3ed7b4af1fb19f6abb5 commit ae577a78a80a4de85698b3ed7b4af1fb19f6abb5 Author: Baptiste Daroussin AuthorDate: 2026-06-04 22:13:23 +0000 Commit: Baptiste Daroussin CommitDate: 2026-06-28 18:32:27 +0000 pw: fix const qualification in unquote() The unquote() function took a const char * parameter but modified the string in-place (removing quote characters). Change the parameter to char * and update callers that passed const char * to cast explicitly. (cherry picked from commit 5f9c8f142d1702f5810618e02534054d28d22fa5) --- usr.sbin/pw/pw_conf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/pw/pw_conf.c b/usr.sbin/pw/pw_conf.c index e9042b15b321..21c4824ead93 100644 --- a/usr.sbin/pw/pw_conf.c +++ b/usr.sbin/pw/pw_conf.c @@ -156,22 +156,22 @@ static char const *kwds[] = }; static char * -unquote(char const * str) +unquote(char * str) { if (str && (*str == '"' || *str == '\'')) { char *p = strchr(str + 1, *str); if (p != NULL) *p = '\0'; - return (char *) (*++str ? str : NULL); + return (*++str ? str : NULL); } - return (char *) str; + return (str); } int boolean_val(char const * str, int dflt) { - if ((str = unquote(str)) != NULL) { + if ((str = unquote((char *)str)) != NULL) { int i; for (i = 0; booltrue[i]; i++) @@ -187,7 +187,7 @@ boolean_val(char const * str, int dflt) int passwd_val(char const * str, int dflt) { - if ((str = unquote(str)) != NULL) { + if ((str = unquote((char *)str)) != NULL) { int i; for (i = 0; booltrue[i]; i++) @@ -228,7 +228,7 @@ newstr(char const * p) { char *q; - if ((p = unquote(p)) == NULL) + if ((p = unquote((char *)p)) == NULL) return (NULL); if ((q = strdup(p)) == NULL)