From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23712 invoked from network); 3 Mar 2009 17:55:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Mar 2009 17:55:47 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 73176 invoked from network); 3 Mar 2009 17:55:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Mar 2009 17:55:38 -0000 Received: (qmail 26363 invoked by alias); 3 Mar 2009 17:55:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26678 Received: (qmail 26344 invoked from network); 3 Mar 2009 17:55:34 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 3 Mar 2009 17:55:34 -0000 Received: from mail-ew0-f172.google.com (mail-ew0-f172.google.com [209.85.219.172]) by bifrost.dotsrc.org (Postfix) with ESMTP id 2F2C88058F83 for ; Tue, 3 Mar 2009 18:55:31 +0100 (CET) Received: by ewy20 with SMTP id 20so2257933ewy.45 for ; Tue, 03 Mar 2009 09:55:30 -0800 (PST) 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= MIME-Version: 1.0 Received: by 10.210.60.3 with SMTP id i3mr5858668eba.90.1236102930665; Tue, 03 Mar 2009 09:55:30 -0800 (PST) In-Reply-To: <27480.1236102218@csr.com> References: <27480.1236102218@csr.com> Date: Tue, 3 Mar 2009 18:55:30 +0100 Message-ID: <237967ef0903030955l1bbe4224p9d3f4a2bf1d04c77@mail.gmail.com> Subject: Re: PATCH: caps strings From: Mikael Magnusson To: Zsh hackers list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/9065/Tue Mar 3 11:43:41 2009 on bifrost X-Virus-Status: Clean 2009/3/3 Peter Stephenson : > 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