From owner-dev-commits-src-all@freebsd.org Wed Jul 21 09:17:13 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57DDA6603CB; Wed, 21 Jul 2021 09:17:13 +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 4GV92d1ZxJz4nHw; Wed, 21 Jul 2021 09:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 1ABB51B84E; Wed, 21 Jul 2021 09:17:13 +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 16L9HD4M016426; Wed, 21 Jul 2021 09:17:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16L9HDsY016425; Wed, 21 Jul 2021 09:17:13 GMT (envelope-from git) Date: Wed, 21 Jul 2021 09:17:13 GMT Message-Id: <202107210917.16L9HDsY016425@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 0634390572b2 - main - chroot: fix typo in usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0634390572b2390cfa8e2a3fd83359a944461f34 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2021 09:17:13 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=0634390572b2390cfa8e2a3fd83359a944461f34 commit 0634390572b2390cfa8e2a3fd83359a944461f34 Author: Edward Tomasz Napierala AuthorDate: 2021-07-21 09:16:11 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-07-21 09:16:11 +0000 chroot: fix typo in usage While here also fix typo in a variable name. Reported By: oshogbo --- usr.sbin/chroot/chroot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/chroot/chroot.c b/usr.sbin/chroot/chroot.c index bb87ae6f0503..b14e1cbf4597 100644 --- a/usr.sbin/chroot/chroot.c +++ b/usr.sbin/chroot/chroot.c @@ -71,12 +71,12 @@ main(int argc, char *argv[]) uid_t uid; int arg, ch, error, gids; long ngroups_max; - bool nonpriviledged; + bool nonprivileged; gid = 0; uid = 0; user = group = grouplist = NULL; - nonpriviledged = false; + nonprivileged = false; while ((ch = getopt(argc, argv, "G:g:u:n")) != -1) { switch(ch) { case 'u': @@ -95,7 +95,7 @@ main(int argc, char *argv[]) usage(); break; case 'n': - nonpriviledged = true; + nonprivileged = true; break; case '?': default: @@ -160,7 +160,7 @@ main(int argc, char *argv[]) } } - if (nonpriviledged) { + if (nonprivileged) { arg = PROC_NO_NEW_PRIVS_ENABLE; error = procctl(P_PID, getpid(), PROC_NO_NEW_PRIVS_CTL, &arg); if (error != 0) @@ -193,6 +193,6 @@ static void usage(void) { (void)fprintf(stderr, "usage: chroot [-g group] [-G group,group,...] " - "[-u user] [-n ] newroot [command]\n"); + "[-u user] [-n] newroot [command]\n"); exit(1); }