Date: Tue, 24 Oct 2000 16:38:46 -0400 From: Garance A Drosihn <drosih@rpi.edu> To: Jeroen Ruigrok van der Werven <jruigrok@via-net-works.nl>, Guido van Rooij <guido@gvr.org> Cc: audit@FreeBSD.ORG Subject: Re: printjob.c mktemp() problem Message-ID: <v04210109b61ba074b148@[128.113.24.47]> In-Reply-To: <20001024211518.E209@lucifer.bart.nl> References: <20001024140510.G93799@lucifer.bart.nl> <20001024170054.Q93799@lucifer.bart.nl> <20001024192539.A65599@gvr.gvr.org> <20001024202942.C209@lucifer.bart.nl> <20001024211518.E209@lucifer.bart.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
At 9:15 PM +0200 10/24/00, Jeroen Ruigrok van der Werven wrote: >-On [20001024 20:35], Jeroen Ruigrok van der Werven >(jruigrok@via-net-works.nl) wrote: > >-On [20001024 19:30], Guido van Rooij (guido@gvr.org) wrote: > >>You should remove the addition of int i = -1 since it isn't used. > > > >Yeah, I fixed that in my latest patches. > >Deleted bogus assignment of i = fchmod(). No need for it. > > > I still need to look at Garance's mention of the tempfile name > > which doesn't include a /tmp/ path. > >My new patch should also fix this case. Uh, the tempfile name is NOT supposed to include /tmp in the pathname. The file is supposed to be created in the spool directory, and not in /tmp. 'mktemp' does not imply the file must be in /tmp. In the case of lpd, moving the filenames into /tmp would make matters worse instead of better. (at least for my print servers it would, in other cases it might not make any difference). I was just saying that given the pattern being used, which is a correct pattern, the bug was that mktemp was called BEFORE the chdir, when it should only be called AFTER the current-directory has been changed. If I remember right, the suggested mkstemp patch already fixed that particular problem. --- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or drosih@rpi.edu Rensselaer Polytechnic Institute To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v04210109b61ba074b148>