summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-03-03 18:12:44 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-03-03 18:12:44 +0000
commit93dd3e0540408c5432cee323da07985859ea9638 (patch)
tree712419f3aa17bb4dcfc1e97089b060c3935f96cc
parent731646656cf9809ee21b693abd2e98f3df46079c (diff)
downloadzsh-93dd3e0540408c5432cee323da07985859ea9638.tar.gz
zsh-93dd3e0540408c5432cee323da07985859ea9638.tar.xz
zsh-93dd3e0540408c5432cee323da07985859ea9638.zip
26680: still more metafy() stuff in cap
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/cap.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d8a1f8da1..62615a594 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-03-03  Peter Stephenson  <pws@csr.com>
 
+	* 26680: Src/Modules/cap.c: missed some stuff that needed metafied
+	arguments.
+
 	* 26677: Src/Module/caps.c: need some unmetafy() calls as noticed
 	by Mikael.
 
@@ -11317,5 +11320,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4596 $                         
+* $Revision: 1.4597 $                         
 *****************************************************
diff --git a/Src/Modules/cap.c b/Src/Modules/cap.c
index 4242d447f..aaf5e2433 100644
--- a/Src/Modules/cap.c
+++ b/Src/Modules/cap.c
@@ -72,7 +72,10 @@ bin_getcap(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func))
     do {
 	char *result = NULL;
 	ssize_t length;
-	cap_t caps = cap_get_file(*argv);
+	cap_t caps;
+	char *filename;
+
+	caps = cap_get_file(unmetafy(dupstring(*argv), NULL));
 	if(caps)
 	    result = cap_to_text(caps, &length);
 	if (!caps || !result) {
@@ -99,8 +102,7 @@ bin_setcap(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func))
     }
 
     do {
-	unmetafy(*argv, NULL);
-	if(cap_set_file(*argv, caps)) {
+	if(cap_set_file(unmetafy(dupstring(*argv, NULL)), caps)) {
 	    zwarnnam(nam, "%s: %e", *argv, errno);
 	    ret = 1;
 	}