Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jun 1998 16:15:02 -0700 (PDT)
From:      harold barker Hbarker <hbarker@dsms.com>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/6919: can not run multiple instances of /sbin/restore because temp files are not unique
Message-ID:  <199806112315.QAA24843@fs.sm.dsms.com>

next in thread | raw e-mail | index | archive | help

>Number:         6919
>Category:       bin
>Synopsis:       can not run multiple instances of /sbin/restore because temp files are not unique
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 11 16:20:01 PDT 1998
>Last-Modified:
>Originator:     harold barker &
>Organization:
dsms
>Release:        FreeBSD 2.2.6-STABLE i386
>Environment:

	FreeBSD build2.jsnet.com 2.2.6-STABLE FreeBSD 2.2.6-STABLE #0: Mon Jun  8 15:26:54 PDT 1998     hbarker@build.jsnet.com:/usr/src/sys/compile/dsms226aCAM  i386


>Description:

/sbin/restore uses two files in /tmp. The names are not unique to each invocation, so it is not possible to run more than one restore at a give time.

>How-To-Repeat:



>Fix:
	
cvs diff: Diffing .
Index: dirs.c
===================================================================
RCS file: /d0a/cvs_root_freebsd/src/sbin/restore/dirs.c,v
retrieving revision 1.6.2.1
diff -r1.6.2.1 dirs.c
146c146,147
< 
---
>     pid_t pid;
> 
148c149,151
<       (void) sprintf(dirfile, "%srstdir%d", _PATH_TMP, dumpdate);
---
>       pid = getpid();
> 
>       (void) sprintf(dirfile, "%srstdir-%d-%d", _PATH_TMP, pid, dumpdate);
164c167
<               (void) sprintf(modefile, "%srstmode%d", _PATH_TMP, dumpdate);
---
>               (void) sprintf(modefile, "%srstmode-%d-%d", _PATH_TMP, pid, dumpdate);


>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806112315.QAA24843>