diff options
author | pav <pav@FreeBSD.org> | 2005-10-09 05:32:20 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2005-10-09 05:32:20 +0800 |
commit | 600c447d1ee77366da70ae38f9bab0b80bf4b8ff (patch) | |
tree | de4aa05b3bed6cf0b7bd709f660b473ffa8477f5 /security | |
parent | 2264fbb2f8b78488fb9801e59fb43ec3a0eabecf (diff) | |
download | freebsd-ports-gnome-600c447d1ee77366da70ae38f9bab0b80bf4b8ff.tar.gz freebsd-ports-gnome-600c447d1ee77366da70ae38f9bab0b80bf4b8ff.tar.zst freebsd-ports-gnome-600c447d1ee77366da70ae38f9bab0b80bf4b8ff.zip |
- Fix handling of & sign, it need to be escaped for XML storage
PR: ports/85240
Submitted by: Maurice Castro <maurice@sphinx.clari.net.au>
Approved by: maintainer timeout (anders, 17 days)
- While here, fix runtime crash on 64bit platforms by explicitly declaring
getenv() (via including <stdlib.h> header)
Diffstat (limited to 'security')
-rw-r--r-- | security/pwman/Makefile | 6 | ||||
-rw-r--r-- | security/pwman/files/patch-src-pwlist.c | 40 | ||||
-rw-r--r-- | security/pwman/files/patch-src-pwman.h | 10 |
3 files changed, 55 insertions, 1 deletions
diff --git a/security/pwman/Makefile b/security/pwman/Makefile index 024394a7c603..ba12701de766 100644 --- a/security/pwman/Makefile +++ b/security/pwman/Makefile @@ -7,7 +7,7 @@ PORTNAME= pwman PORTVERSION= 0.3.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -19,11 +19,15 @@ LIB_DEPENDS= xml2.5:${PORTSDIR}/textproc/libxml2 RUN_DEPENDS= gpg:${PORTSDIR}/security/gnupg GNU_CONFIGURE= yes +USE_REINPLACE= yes MAN1= pwman.1 DOCS= AUTHORS COPYING ChangeLog README TODO +post-patch: + @${REINPLACE_CMD} -e 's|/usr/bin/gpg|${LOCALBASE}/bin/gpg|g' ${WRKSRC}/src/misc.c + .if !defined(NOPORTDOCS) post-install: @${INSTALL} -d -m 0755 ${DOCSDIR} diff --git a/security/pwman/files/patch-src-pwlist.c b/security/pwman/files/patch-src-pwlist.c new file mode 100644 index 000000000000..9ef8a0d6ebea --- /dev/null +++ b/security/pwman/files/patch-src-pwlist.c @@ -0,0 +1,40 @@ +--- src/pwlist.c.old 2005-03-09 16:07:07.000000000 +0000 ++++ src/pwlist.c 2005-03-09 16:06:37.000000000 +0000 +@@ -272,13 +272,32 @@ + write_password_node(xmlNodePtr root, Pw* pw) + { + xmlNodePtr node; ++ xmlChar *escaped; ++ ++ // Take the inbound strings. Treat as an xmlChar, and escape ++ // Need to free the result of escape every time + + node = xmlNewChild(root, NULL, (xmlChar*)"PwItem", NULL); +- xmlNewChild(node, NULL, (xmlChar*)"name", (xmlChar*)pw->name); +- xmlNewChild(node, NULL, (xmlChar*)"host", (xmlChar*)pw->host); +- xmlNewChild(node, NULL, (xmlChar*)"user", (xmlChar*)pw->user); +- xmlNewChild(node, NULL, (xmlChar*)"passwd", (xmlChar*)pw->passwd); +- xmlNewChild(node, NULL, (xmlChar*)"launch", (xmlChar*)pw->launch); ++ ++ escaped = xmlEncodeSpecialChars(root, (xmlChar*)pw->name); ++ xmlNewChild(node, NULL, (xmlChar*)"name", escaped); ++ xmlFree(escaped); ++ ++ escaped = xmlEncodeSpecialChars(root, (xmlChar*)pw->host); ++ xmlNewChild(node, NULL, (xmlChar*)"host", escaped); ++ xmlFree(escaped); ++ ++ escaped = xmlEncodeSpecialChars(root, (xmlChar*)pw->user); ++ xmlNewChild(node, NULL, (xmlChar*)"user", escaped); ++ xmlFree(escaped); ++ ++ escaped = xmlEncodeSpecialChars(root, (xmlChar*)pw->passwd); ++ xmlNewChild(node, NULL, (xmlChar*)"passwd", escaped); ++ xmlFree(escaped); ++ ++ escaped = xmlEncodeSpecialChars(root, (xmlChar*)pw->launch); ++ xmlNewChild(node, NULL, (xmlChar*)"launch", escaped); ++ xmlFree(escaped); + } + + int diff --git a/security/pwman/files/patch-src-pwman.h b/security/pwman/files/patch-src-pwman.h new file mode 100644 index 000000000000..8b0cf23c970f --- /dev/null +++ b/security/pwman/files/patch-src-pwman.h @@ -0,0 +1,10 @@ +--- src/pwman.h.orig Mon Oct 14 18:10:36 2002 ++++ src/pwman.h Sat Oct 8 23:21:23 2005 +@@ -26,6 +26,7 @@ + #include <string.h> + #include <config.h> + #include <time.h> ++#include <stdlib.h> + #include <stdarg.h> + + #define CONF_FILE ".pwmanrc" |