Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Dec 2003 11:20:40 +0300
From:      "Vladimir B. Grebenschikov" <vova@fbsd.ru>
To:        Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= <des@des.no>
Cc:        "current@freebsd.org" <current@freebsd.org>
Subject:   Re: [Fwd: bogus plist in docbook-xsl]
Message-ID:  <1071649239.763.4.camel@localhost>
In-Reply-To: <xzp3cbk1mle.fsf@dwp.des.no>
References:  <1071594625.737.35.camel@localhost> <xzp8ylc3cr9.fsf@dwp.des.no> <1071604132.774.7.camel@localhost>  <xzp3cbk1mle.fsf@dwp.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
=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" <vova@fbsd.ru> 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 <vova@fbsd.ru>
SWsoft Inc.



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