Date: Fri, 24 Dec 1999 09:12:06 -0800 (PST) From: mihs@wm28.csie.ncu.edu.tw To: freebsd-gnats-submit@freebsd.org Subject: bin/15667: A bug when the pathname with some space Message-ID: <19991224171206.2C93F14CA3@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 15667 >Category: bin >Synopsis: A bug when the pathname with some space >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 24 09:20:02 PST 1999 >Closed-Date: >Last-Modified: >Originator: Ming-I Hsieh >Release: FreeBSD 3.4-RELEASE >Organization: Wireless Network and Multimedia Laboratory >Environment: FreeBSD wm27 3.4-RELEASE FreeBSD 3.4-RELEASE #0: Thu Dec 23 18:41:49 CST 1999 root@wm27:/usr/src/sys/compile/mihs i386 >Description: When the pathname with a or more spaces. the unpack in /usr/src/usr.sbin/pkg_install/lib/file.c will cause the tar can't find the +CONTENTS file. Because the if (vsystem("tar %s %s %s", args, pkg, flist ? flist : "")) { will produce a string like "tar -$(ARGS) $PATH FILENAME.tgz ...". It will make the tar can't find the right archive. >How-To-Repeat: Web Send-Pr >Fix: change "tar %s %s %s" to "tar %s '%s' %s" --- file.c.orig Sat Dec 25 01:04:09 1999 +++ file.c Sat Dec 25 01:05:08 1999 @@ -490,7 +490,7 @@ else strcpy(args, "-z"); strcat(args, " -xpf"); - if (vsystem("tar %s %s %s", args, pkg, flist ? flist : "")) { + if (vsystem("tar %s '%s' %s", args, pkg, flist ? flist : "")) { warnx("tar extract of %s failed!", pkg); return 1; } >Release-Note: >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?19991224171206.2C93F14CA3>