Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: caps strings
- X-seq: zsh-workers 26678
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: PATCH: caps strings
- Date: Tue, 3 Mar 2009 18:55:30 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=5gdioQyMogPSlNC+uA1KLp0WeuskBo3hMk+txTxgYAU=; b=Df/dutih486z3XC0sMQtEJCtzxG0adVuHW6jkRRrJVRPJA+7eAr67Py70KgpDqyBzF 10uW54SkR3a8J8+TkO037F1uZQO77fbSsvMMsXgvTx8J0QbUl70yd1Q0qHglRQfVkX5M 7pI4puVH+T1XF7Ugs4MyCM5D2b88jy4PzPtXY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=TsX1tviT7d3k0tPEiVjPMbn7QqqyOjvU8/ywPbwJpnAWIlGH/0RUJDnh/PN1uMMuIp BWj8NJFsReA5yw+9e1ynm/TV3Lz7WEGpA3s0392mX6jzV5iTY7tCZKg+5YfGEVZawmlO xra4yG5U4Gjs7Q+RhI7MG0QobedgMaLRwRZYs=
- In-reply-to: <27480.1236102218@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <27480.1236102218@xxxxxxx>
2009/3/3 Peter Stephenson <pws@xxxxxxx>:
> This should fix string arguments to functions in the caps module as
> noticed by Mikael. It looks like all the returned strings are output
> directly by library calls so aren't affected.
>
> Index: Src/Modules/cap.c
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Src/Modules/cap.c,v
> retrieving revision 1.7
> diff -u -r1.7 cap.c
> --- Src/Modules/cap.c 6 Jul 2007 21:52:40 -0000 1.7
> +++ Src/Modules/cap.c 3 Mar 2009 17:39:34 -0000
> @@ -38,6 +38,7 @@
> int ret = 0;
> cap_t caps;
> if(*argv) {
> + unmetafy(*argv, NULL);
> caps = cap_from_text(*argv);
> if(!caps) {
> zwarnnam(nam, "invalid capability string");
> @@ -90,6 +91,7 @@
> cap_t caps;
> int ret = 0;
>
> + unmetafy(*argv, NULL);
> caps = cap_from_text(*argv++);
> if(!caps) {
> zwarnnam(nam, "invalid capability string");
> @@ -97,6 +99,7 @@
> }
>
> do {
> + unmetafy(*argv, NULL);
> if(cap_set_file(*argv, caps)) {
> zwarnnam(nam, "%s: %e", *argv, errno);
> ret = 1;
I think the two zwarnnam calls with *argv needs them to be
re-metafy()ed. When i didn't do that in attr.c, I got output like
myutf8file\M-p.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author