Date: Wed, 21 Jul 2021 09:17:13 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 0634390572b2 - main - chroot: fix typo in usage Message-ID: <202107210917.16L9HDsY016425@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=0634390572b2390cfa8e2a3fd83359a944461f34 commit 0634390572b2390cfa8e2a3fd83359a944461f34 Author: Edward Tomasz Napierala <trasz@FreeBSD.org> AuthorDate: 2021-07-21 09:16:11 +0000 Commit: Edward Tomasz Napierala <trasz@FreeBSD.org> 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107210917.16L9HDsY016425>