From nobody Wed May 22 15:59:17 2024 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 4VkwwP2SQ7z5LxVp; Wed, 22 May 2024 15:59:17 +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 4VkwwP1x23z4SRk; Wed, 22 May 2024 15:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716393557; 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=CdTVRyOzAtou4NFRnIBeSxyoqg/kTU+8cQweT+JB5So=; b=N8uNQnMFzmiwjCbhpa+Sj9G+tHJluRsYIdAwrFSkbw7BKisnR53sO87GcZsDDS4ExrqK31 SMj6dVCKvu73mb4yvCu3ZopLI8oamckSw94gQ2ol+rBvrTedtvFkQXfamSNMm0BS78UXdx 5L1jtzWl9eTQ1wGtzbdg2FROaF2KS99bdN67QFW3jsX5SXwwInjMKSSLW4NDxGSxUsWojn eDQv2su1MSvMLwR/2VtlBGnxfAyhkz6EaHsMvZ8gwQ0JGxkDNoFXyaQ8zflj3D9jVoshke x8LNqH2mBdpG6QWMa1Z1YJouxrX9BiZRySg6YlQYLM2v8TbWtRKJBUgp2YZeUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716393557; a=rsa-sha256; cv=none; b=o1zc6mr3DgotjC328lgwJ9DI4JSWRTcsj9vRuw/yce8SqZ/MH/HtCAXq92Fb5833hKtjPL teWG9Sm7YKuRo/tx0tLj4/avYuvjujIo+/2+URMATTUjuX2GUORj0FQCXDBctnrHlMInLI vGN4VKRj2y28uaQyVMMaekemecr1dEBlADwz+WjV4uheaHQrN0ynqkLHpfgsiJYLuyH1Ct L4bMLbd5oS7tUqvXXU8s1+pg1papySXAwH6sIfAwWIMjOnJvefBpVuIZ09WpoCMHr0AhBW pbNscwi0vlKPBPo2MDFkbbUahmG3ADLfac6k3BiCEZwA/KTJbre79Wm+vpv+OQ== 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=1716393557; 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=CdTVRyOzAtou4NFRnIBeSxyoqg/kTU+8cQweT+JB5So=; b=AJw02/GMSVwIFIqT45yi+n0cGEZc4lJ/qBvg6FjpZVHCWWaigxWyB2O8SYBNpbXOX/zrRd rUSvVt/G0xpDW7abPaRvw/Xk3Y3se1AD7/E2DFJdMHTd1B8js0YBy7FnE4bCGe8k6qVsB/ 7w5uZktXXtp3+ioV11elFg9QcXsy8jYELCjapM9JytEps8xG3wPe7XDmYqksXB616cXfMn k4IXStV5h4keQJqIsaqRgwxdBh7UUbdzumiwvZdgutCai7NOpC52kiEXP+M2D02YyArUQR aGXbHJ73zRS5xxgien3L3u9trC+YCXVogxh1ABpbHvrZK5/DgvjLF6kVqsNOaA== 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 4VkwwP1PwKz1BhX; Wed, 22 May 2024 15:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MFxHFS055096; Wed, 22 May 2024 15:59:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MFxH9M055093; Wed, 22 May 2024 15:59:17 GMT (envelope-from git) Date: Wed, 22 May 2024 15:59:17 GMT Message-Id: <202405221559.44MFxH9M055093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Allan Jude Subject: git: e5fadc41b480 - stable/14 - ftpd: stop using -g flag for /bin/ls 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e5fadc41b48045d8978993d6c4ac72c64542b470 Auto-Submitted: auto-generated The branch stable/14 has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=e5fadc41b48045d8978993d6c4ac72c64542b470 commit e5fadc41b48045d8978993d6c4ac72c64542b470 Author: Allan Jude AuthorDate: 2024-05-21 22:58:21 +0000 Commit: Allan Jude CommitDate: 2024-05-22 15:59:05 +0000 ftpd: stop using -g flag for /bin/ls In 3bfbb521 the behaviour of ls was changed such that -g was no longer a noop for compatibility with BSD 4.3, but instead changed the output of long mode to exclude the owner of the file and display only the group. Update how FTPd invokes ls to restore the previous behaviour Reported-by: Andrew Fengler Reviewed-by: jrtc27, des, imp MFC after: 3 days Sponsored-by: ScaleEngine Inc. Fixes: 3bfbb521fef5 ("ls: Improve POSIX compatibility for -g and -n.") (cherry picked from commit 5af3225e0448be6af7f0312e10d2a1dfbe150c25) --- libexec/ftpd/ftpcmd.y | 4 ++-- libexec/ftpd/ftpd.8 | 2 +- libexec/ftpd/ftpd.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y index 9d57017e2f19..827ceda03272 100644 --- a/libexec/ftpd/ftpcmd.y +++ b/libexec/ftpd/ftpcmd.y @@ -460,12 +460,12 @@ cmd | LIST check_login CRLF { if ($2) - retrieve(_PATH_LS " -lgA", ""); + retrieve(_PATH_LS " -lA", ""); } | LIST check_login SP pathstring CRLF { if ($2) - retrieve(_PATH_LS " -lgA %s", $4); + retrieve(_PATH_LS " -lA %s", $4); free($4); } | STAT check_login SP pathname CRLF diff --git a/libexec/ftpd/ftpd.8 b/libexec/ftpd/ftpd.8 index ec4ce0c65100..44f8a2e00835 100644 --- a/libexec/ftpd/ftpd.8 +++ b/libexec/ftpd/ftpd.8 @@ -278,7 +278,7 @@ is specified. .It EPSV Ta "prepare for server-to-server transfer, multiprotocol" .It FEAT Ta "give information on extended features of server" .It HELP Ta "give help information" -.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lgA" +.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lA" .It LPRT Ta "specify data connection port, multiprotocol" .It LPSV Ta "prepare for server-to-server transfer, multiprotocol" .It MDTM Ta "show last modification time of file" diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index a41a23ab1184..11811da35cb5 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2336,7 +2336,7 @@ statfilecmd(char *filename) struct stat st; code = lstat(filename, &st) == 0 && S_ISDIR(st.st_mode) ? 212 : 213; - (void)snprintf(line, sizeof(line), _PATH_LS " -lgA %s", filename); + (void)snprintf(line, sizeof(line), _PATH_LS " -lA %s", filename); fin = ftpd_popen(line, "r"); if (fin == NULL) { perror_reply(551, filename);