From owner-freebsd-questions@FreeBSD.ORG Fri Feb 24 15:37:22 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D4A61065670 for ; Fri, 24 Feb 2012 15:37:22 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id D9FF78FC0A for ; Fri, 24 Feb 2012 15:37:21 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [IPv6:2001:8b0:151:1:fa1e:dfff:feda:c0bb]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q1OFaAMK098051 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 24 Feb 2012 15:36:10 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: OpenDKIM Filter v2.4.3 smtp.infracaninophile.co.uk q1OFaAMK098051 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1330097770; bh=c5u4FIvVIHBNcs9L5j41fcckwLFeAzg8OLuqEhN9P7o=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Cc; b=xlPXIxYHURuD2iVGA4spBXYrPId46PrLKJlNWxGSS/Kp/Ne5HmAK1wo1PVdrUhD2K kctdfiqVp/mgC4mSw4AiN7zEvD/5VgNTdwAV2IRwRprDk/q8tSw3na5QzHU6YlHXpp LmOtruYFEutWMsEEDk8IC9oSQm6P+QnzNtL4XRIc= Message-ID: <4F47AE59.3090305@infracaninophile.co.uk> Date: Fri, 24 Feb 2012 15:35:53 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Trond Endrest?l , Anton Shterenlikht , FreeBSD questions References: <20120224090848.GA28104@mech-cluster241.men.bris.ac.uk> <4F47598A.9080400@infracaninophile.co.uk> <20120224125430.GB8026@mech-cluster241.men.bris.ac.uk> <20120224140408.GA8384@mech-cluster241.men.bris.ac.uk> In-Reply-To: <20120224140408.GA8384@mech-cluster241.men.bris.ac.uk> X-Enigmail-Version: 1.3.5 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEC6EDE06532514B2F5A15901" X-Virus-Scanned: clamav-milter 0.97.3 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: Subject: Re: negative group permissions? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2012 15:37:22 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEC6EDE06532514B2F5A15901 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 24/02/2012 14:04, Anton Shterenlikht wrote: >> Looking at usr.sbin/lpr/lpr/lpr.c at around line 847 (RELENG_9): >> >=20 >> > (void) snprintf(buf, sizeof(buf), "%s/.seq", pp->spool_dir);= >> > seteuid(euid); >> > if ((fd =3D open(buf, O_RDWR|O_CREAT, 0661)) < 0) { >> > printf("%s: cannot create %s\n", progname, buf); >> > exit(1); >> > } >> > if (flock(fd, LOCK_EX)) { >> > printf("%s: cannot lock %s\n", progname, buf); >> > exit(1); >> > } >> >=20 >> > It remains a mystery why these files are created with mode 0661. Mod= e=20 > Isn't .seq above has mode 641? >=20 > % chmod 641 z > % ls -al z > -rw-r----x 1 mexas wheel 0 Feb 24 13:59 z > % A umask setting of 022 would explain that. --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enigEC6EDE06532514B2F5A15901 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9HrmkACgkQ8Mjk52CukIyqxACfV7WFbNn7R1UWCwYYIsYfLwJK 4icAnigJUj7sCJD7uaDVis2ckqtIJiXK =dFs6 -----END PGP SIGNATURE----- --------------enigEC6EDE06532514B2F5A15901--