From owner-cvs-all Wed Sep 18 3:41:18 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B4B337B401; Wed, 18 Sep 2002 03:41:14 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 10AB043E65; Wed, 18 Sep 2002 03:41:05 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id g8IAdnx77143; Wed, 18 Sep 2002 13:39:49 +0300 (EEST) (envelope-from ru) Date: Wed, 18 Sep 2002 13:39:48 +0300 From: Ruslan Ermilov To: Johan Karlsson Cc: Tom Rhodes , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, bde@FreeBSD.org, jhb@FreeBSD.org Subject: Re: cvs commit: src/bin/chmod chmod.1 chmod.c Message-ID: <20020918103948.GA75692@sunbay.com> References: <200209172338.g8HNcXjJ026355@freefall.freebsd.org> <20020918062046.GB8620@numeri.campus.luth.se> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline In-Reply-To: <20020918062046.GB8620@numeri.campus.luth.se> User-Agent: Mutt/1.3.99i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 18, 2002 at 08:20:46AM +0200, Johan Karlsson wrote: > Hi >=20 > On Tue, Sep 17, 2002 at 16:38 (-0700) +0000, Tom Rhodes wrote: > > trhodes 2002/09/17 16:38:33 PDT > >=20 > > Modified files: (Branch: RELENG_4) > > bin/chmod chmod.1 chmod.c=20 > > Log: > > MFC: 'h' missing in getopt() call >=20 > I'm still missing the functional change in rev 1.21 of chmod.c >=20 > This cut-n-pasted part of that change has not yet been MFCed. >=20 > =3D=3D=3D=3D > @@ -102,9 +103,10 @@ main(argc, argv) > /* > * In System V (and probably POSIX.2) the -h opti= on > * causes chmod to change the mode of the symbolic > - * link. 4.4BSD's symbolic links don't have mode= s, > - * so it's an undocumented noop. Do syntax check= ing, > - * though. > + * link. 4.4BSD's symbolic links didn't have mod= es, > + * so it was an undocumented noop. In FreeBSD 3.= 0, > + * lchmod(2) is introduced and this option does r= eal > + * work. > */ > hflag =3D 1; > break; > @@ -148,6 +150,11 @@ done: argv +=3D optind; > } else > fts_options =3D FTS_LOGICAL; > =20 > + if (hflag) > + change_mode =3D lchmod; > + else > + change_mode =3D chmod; > + > mode =3D *argv; > if (*mode >=3D '0' && *mode <=3D '7') { > errno =3D 0; > @@ -190,14 +197,17 @@ done: argv +=3D optind; > * don't point to anything and ones that we found > * doing a physical walk. > */ > - continue; > + if (!hflag) > + continue; > + /* else */ > + /* FALLTHROUGH */ > default: > break; > } > newmode =3D oct ? omode : getmode(set, p->fts_statp->st_m= ode); > if ((newmode & ALLPERMS) =3D=3D (p->fts_statp->st_mode & = ALLPERMS)) > continue; > - if (chmod(p->fts_accpath, newmode) && !fflag) { > + if ((*change_mode)(p->fts_accpath, newmode) && !fflag) { > warn("%s", p->fts_path); > rval =3D 1; > } else { > =3D=3D=3D=3D=3D=3D=3D >=20 >=20 > Bruce, Ruslan, is this something that should be MFCed as well > or do we only want to document the faked support for -h? >=20 > /Johan K >=20 >=20 > > =20 > > PR: 41926 > > Submitted by: Andre Albsmeier > > Reviewed by: johan, bde, jhb > > Approved by: re (jhb) > > =20 > > Revision Changes Path > > 1.17.2.11 +1 -1 src/bin/chmod/chmod.1 > > 1.16.2.4 +3 -3 src/bin/chmod/chmod.c >=20 I don't object this be MDCed, I just think it's too late now in the release cycle. Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --IS0zKkzwUGydFO0o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9iFf0Ukv4P6juNwoRAhFHAJ0UL14O/JPgUcbIJI+yI/IkGO6CMwCfURJK siR7omkNcDLpLxf9finzeBw= =PJ+B -----END PGP SIGNATURE----- --IS0zKkzwUGydFO0o-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message