1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-27 18:21:10 +02:00

26677: cap module needs some unmetafy() calls

This commit is contained in:
Peter Stephenson 2009-03-03 17:46:50 +00:00
parent 309708418b
commit 731646656c
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2009-03-03 Peter Stephenson <pws@csr.com>
* 26677: Src/Module/caps.c: need some unmetafy() calls as noticed
by Mikael.
* 26676: Doc/Zsh/options.yo: redirect to main description
of reserved words instead.
@ -11314,5 +11317,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.4595 $
* $Revision: 1.4596 $
*****************************************************

View file

@ -38,6 +38,7 @@ bin_cap(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func))
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 @@ bin_setcap(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func))
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 @@ bin_setcap(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func))
}
do {
unmetafy(*argv, NULL);
if(cap_set_file(*argv, caps)) {
zwarnnam(nam, "%s: %e", *argv, errno);
ret = 1;