From owner-freebsd-bugs Mon Jun 8 06:29:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA11456 for freebsd-bugs-outgoing; Mon, 8 Jun 1998 06:29:29 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from lohi.clinet.fi (root@lohi.clinet.fi [194.100.0.7]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA11428; Mon, 8 Jun 1998 06:29:20 -0700 (PDT) (envelope-from hsu@katiska.clinet.fi) Received: from katiska.clinet.fi (katiska.clinet.fi [194.100.0.4]) by lohi.clinet.fi (8.8.8/8.8.6) with ESMTP id QAA19173; Mon, 8 Jun 1998 16:28:57 +0300 (EEST) Received: (from hsu@localhost) by katiska.clinet.fi (8.8.8/8.8.6) id QAA01052; Mon, 8 Jun 1998 16:28:24 +0300 (EEST) From: Heikki Suonsivu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <13691.59125.985303.183564@katiska.clinet.fi> Date: Mon, 8 Jun 1998 16:28:21 +0300 (EEST) To: Peter Hawkins Cc: Heikki Suonsivu , Peter Hawkins , freebsd-bugs@FreeBSD.ORG Subject: Re: bin/4599 In-Reply-To: References: <13691.49682.498719.688203@katiska.clinet.fi> X-Mailer: VM 6.47 under Emacs 19.34.1 Organization: Clinet Ltd, Espoo, Finland Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Peter Hawkins writes: > >No it does not use _PATH_TMP. If you do not bother to read the code before > >closing the related PRs, at least you could trust someone who did. > > Sorry, you're simply wrong there. > > >From RELENG_2_2: > > strcpy(tempfile, _PATH_TMP); > strcat(tempfile, _RDIST_TMP); > > >From -current: > > strcpy(tempfile, _PATH_TMP); > strcat(tempfile, _RDIST_TMP); > > Like I said, your _PATH_TMP should be a valid directory. [The actual problem seems to be have been fixed in /usr/src/lib/libc/stdio/mktemp.c in version 1.4.2.1 -> 1.4.2.2, so closing the original PR is fine now, but my point on reading PR's carefully before closing them is still valid] You seem to be looking rdist distributed with FreeBSD, I cannot find above in rdist6. As I numerous times in my mails and in the PR mentioned: This breaks rdist6, which wants to create a temporary path and patch up missing directories on the path afterwards. The following is an excerpt from server.c (for which the PR also included a diff): /* * Create name of temporary file */ if (catname && cattarget(file) < 0) { error("Cannot set file name."); return; } file = strrchr(target, '/'); if (file == NULL) (void) strcpy(new, tempname); else if (file == target) (void) sprintf(new, "/%s", tempname); else { *file = CNULL; (void) sprintf(new, "%s/%s", target, tempname); *file = '/'; } message(MT_SYSLOG|MT_INFO, "Create name of temp results %s", new); #if 0 if (!mktemp(new)) { error("Cannot create temporary name, errno %d.", errno); } #else { char *p; p = strstr(new, "XXXXXX"); if (p) sprintf(p, "%6d", getpid() % 1000000); else error("Cannot create temporary name"); } #endif message(MT_SYSLOG|MT_INFO, "After mktemp it becomes %s", new); } #if 0 is my workaround, and couple of messages were added when I was tracking this one. I also added the check around mktemp, originally there was no check at all, so it was a bit tricky to find the problem being in the server. > Peter > > Hilink Internet Peter Hawkins > 381 Swan St Richmond, > Vic, Australia Ph: +61-3-9421 2006 Fax: +61-3-9421 2007 > http://www.hilink.com.au Peter@hilink.com.au > > FreeBSD Project: thepish@FreeBSD.org -- Heikki Suonsivu, T{ysikuu 10 C 83/02210 Espoo/FINLAND, hsu@clinet.fi mobile +358-40-5519679 work +358-9-43542270 fax -4555276 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message