From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27811 invoked from network); 1 Sep 1999 08:34:17 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 Sep 1999 08:34:17 -0000 Received: (qmail 24033 invoked by alias); 1 Sep 1999 08:34:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7591 Received: (qmail 24025 invoked from network); 1 Sep 1999 08:34:07 -0000 Message-Id: <9909010800.AA16059@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: PATCH: 3.1.6-pws-2: cap_free Date: Wed, 01 Sep 1999 10:00:07 +0200 From: Peter Stephenson I've finally compiled on a system with POSIX capability sets. This one definitely needs cap_free to get the value returned from cap_get_proc, not a pointer to it. If there are implementations which do this the other way, we have problems. You can test this if you also have --enable-zsh-mem --enable-zsh-mem-debug, because you get a bad free warning from e.g. `print -P "%#"'. --- Src/utils.c.cap Mon Aug 2 09:24:34 1999 +++ Src/utils.c Tue Aug 31 13:29:26 1999 @@ -3633,10 +3633,10 @@ for(n = 0; !cap_get_flag(caps, n, CAP_EFFECTIVE, &val); n++) if(val || (!cap_get_flag(caps, n, CAP_INHERITABLE, &val) && val)) { - cap_free(&caps); + cap_free(caps); return 1; } - cap_free(&caps); + cap_free(caps); } } #endif /* HAVE_CAP_GET_PROC */ -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy