diff options
author | Renato Botelho <garga@FreeBSD.org> | 2019-02-25 13:37:48 +0000 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2019-02-25 13:37:48 +0000 |
commit | 0e6519c75735d4c341ff87646fbab1ee1a91c9ca (patch) | |
tree | 0f7bd9b79f5c294b1cbd27920dfbdd282bd4c154 /shells/scponly | |
parent | 762c57b91391481b711b2bc8dc963a02f6c6a8cf (diff) | |
download | ports-0e6519c75735d4c341ff87646fbab1ee1a91c9ca.tar.gz ports-0e6519c75735d4c341ff87646fbab1ee1a91c9ca.zip |
Notes
Diffstat (limited to 'shells/scponly')
-rw-r--r-- | shells/scponly/Makefile | 2 | ||||
-rw-r--r-- | shells/scponly/files/patch-helper.c | 26 |
2 files changed, 27 insertions, 1 deletions
diff --git a/shells/scponly/Makefile b/shells/scponly/Makefile index e5ca40d13376..9bbd7758d435 100644 --- a/shells/scponly/Makefile +++ b/shells/scponly/Makefile @@ -3,7 +3,7 @@ PORTNAME= scponly PORTVERSION= 4.8.20110526 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= shells security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-snapshots DISTNAME= ${PORTNAME}-20110526 diff --git a/shells/scponly/files/patch-helper.c b/shells/scponly/files/patch-helper.c new file mode 100644 index 000000000000..6d04529d5cde --- /dev/null +++ b/shells/scponly/files/patch-helper.c @@ -0,0 +1,26 @@ +--- helper.c.orig 2010-09-08 05:58:11 UTC ++++ helper.c +@@ -323,16 +323,20 @@ int valid_arg_vector(char **av) + char *substitute_known_path(char *request) + { + cmd_t *cmd=commands; +- char *stripped_req=strdup(basename(request)); ++ char *stripped_req=strdup(request); ++ stripped_req=basename(stripped_req); + while (cmd != NULL) + { ++ char *nname; + if (cmd->name == NULL) + break; +- if (exact_match(basename(cmd->name),stripped_req)) ++ nname = strdup(cmd->name); ++ if (exact_match(basename(nname),stripped_req)) + { + free(stripped_req); /* discard old pathname */ +- return (strdup(cmd->name)); ++ return (nname); + } ++ free(nname); + cmd++; + } + return (stripped_req); |