diff options
-rwxr-xr-x | nocompile/libexec/gopherd.sh | 2 | ||||
-rw-r--r-- | src/bin/realpath.c | 10 |
2 files changed, 1 insertions, 11 deletions
diff --git a/nocompile/libexec/gopherd.sh b/nocompile/libexec/gopherd.sh index 57b3554..f627657 100755 --- a/nocompile/libexec/gopherd.sh +++ b/nocompile/libexec/gopherd.sh @@ -4,7 +4,7 @@ read -t 10 req base="$1" arg=$(echo "$req" | tr -d '\r' | cut -f2) req=$(echo "$req" | tr -d '\r' | cut -f1) -realpath="$(realpath "${base}${req}")" +realpath="$(readlink -f "${base}${req}")" if grep -v "^${base}" <<< "${realpath}" > /dev/null;then echo ${base} echo ${realpath} diff --git a/src/bin/realpath.c b/src/bin/realpath.c deleted file mode 100644 index e47f020..0000000 --- a/src/bin/realpath.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> -#include <sys/param.h> -#include <stdlib.h> - -int main(int argc,char *argv[]) { - char path[MAXPATHLEN+1]; - if(!realpath(argv[1],path)) return 1; - puts(path); - return 0; -} |