Date: Fri, 24 Feb 2012 15:35:53 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Trond Endrest?l <Trond.Endrestol@fagskolen.gjovik.no>, Anton Shterenlikht <mexas@bristol.ac.uk>, FreeBSD questions <freebsd-questions@freebsd.org> Subject: Re: negative group permissions? Message-ID: <4F47AE59.3090305@infracaninophile.co.uk> In-Reply-To: <20120224140408.GA8384@mech-cluster241.men.bris.ac.uk> References: <20120224090848.GA28104@mech-cluster241.men.bris.ac.uk> <4F47598A.9080400@infracaninophile.co.uk> <20120224125430.GB8026@mech-cluster241.men.bris.ac.uk> <alpine.BSF.2.00.1202241433110.47275@mail.fig.ol.no> <20120224140408.GA8384@mech-cluster241.men.bris.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F47AE59.3090305>