From owner-cvs-all Tue Oct 20 00:57:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA19648 for cvs-all-outgoing; Tue, 20 Oct 1998 00:57:44 -0700 (PDT) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from dingo.cdrom.com (castles220.castles.com [208.214.165.220]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA19642; Tue, 20 Oct 1998 00:57:42 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (LOCALHOST [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id BAA02875; Tue, 20 Oct 1998 01:01:55 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810200801.BAA02875@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Bruce Evans cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, msmith@FreeBSD.ORG Subject: Re: cvs commit: src/bin/mkdir mkdir.c In-reply-to: Your message of "Tue, 20 Oct 1998 17:30:55 +1000." <199810200730.RAA07647@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 20 Oct 1998 01:01:54 -0700 From: Mike Smith Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk > > Modified files: > > bin/mkdir mkdir.c > > Log: > > - mkdir -m should call chmod because the high-order bits get ignored > > by the kernel as a security feature of some sort. > > > > Submitted by: Wilfredo Sanchez > > > > Revision Changes Path > > 1.12 +19 -1 src/bin/mkdir/mkdir.c > > This doesn't even compile. Bleagh, no, I cut'n'pasted the wrong version of the diff. > If it compiled, I think it would break the mode for intermediate > directories created by mkdir -p. It would set the all to the mode of the destination directory, where the goal seems to be to create them 0777 & umask. The intended version only made the chmod() call if last was set; does this cleave closer to your expectations? > This bogotifies the umask() microoptimizations. It would be useful to have some idea what this actually means in context. What microoptimisations? Note that no matter what you microoptimise umask for, mkdir will still clip anything above 0777. > This has some style bugs. I'm sure it does. Without an automated style bug detector, you're all we have. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message