From owner-freebsd-current@FreeBSD.ORG Wed Dec 17 00:19:52 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26F9D16A4CE for ; Wed, 17 Dec 2003 00:19:52 -0800 (PST) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id F150B43D36 for ; Wed, 17 Dec 2003 00:19:50 -0800 (PST) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.24; FreeBSD) id 1AWWvA-0000DM-ET; Wed, 17 Dec 2003 11:20:40 +0300 From: "Vladimir B. Grebenschikov" To: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= In-Reply-To: References: <1071594625.737.35.camel@localhost> <1071604132.774.7.camel@localhost> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Organization: SWsoft Inc. Message-Id: <1071649239.763.4.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Wed, 17 Dec 2003 11:20:40 +0300 Sender: Vladimir Grebenschikov cc: "current@freebsd.org" Subject: Re: [Fwd: bogus plist in docbook-xsl] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2003 08:19:52 -0000 =D0=92 =D1=81=D1=80, 17.12.2003, =D0=B2 00:25, Dag-Erling Sm=C3=B8rgrav =D0= =BF=D0=B8=D1=88=D0=B5=D1=82: > "Vladimir B. Grebenschikov" writes: > > Do you know why pkg_add threat character \' as invalid ? >=20 > No idea. I suggest you RTFS. Looking source shows that pkg_add construct one striing for system(3) and populate this string with filenames in ' add_count =3D snprintf(&perm_args[perm_count], maxargs - perm_count, "'%s' ", p->name); if (add_count < 0 || add_count > maxargs - perm_count) { cleanup(0); errx(2, "%s: oops, miscounted strings!", __func__); } ... #define PUSHOUT(todir) /* push out string */ \ if (where_count > (int)sizeof(STARTSTRING)-1) { \ strcat(where_args, "|tar --unlink -xpf - -C "); \ strcat(where_args, todir); \ if (system(where_args)) { \ cleanup(0); \ errx(2, \ "%s: can not invoke %ld byte tar pipeline: %s", \ __func__, \ (long)strlen(where_args), where_args); \ } \ strcpy(where_args, STARTSTRING); \ where_count =3D sizeof(STARTSTRING)-1; \ } \ > DES --=20 Vladimir B. Grebenschikov SWsoft Inc.