aboutsummaryrefslogtreecommitdiff
path: root/print/rlpr/files
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2004-07-09 15:57:33 +0000
committerMikhail Teterin <mi@FreeBSD.org>2004-07-09 15:57:33 +0000
commitb7b95248da1eb471d5f788f99706749df46e7427 (patch)
treeffe818f518f08c624c92c74cd0232fb9de11e55c /print/rlpr/files
parente9dffd30af9cc130765704c4f51155d3df28a8fd (diff)
downloadports-b7b95248da1eb471d5f788f99706749df46e7427.tar.gz
ports-b7b95248da1eb471d5f788f99706749df46e7427.zip
Notes
Diffstat (limited to 'print/rlpr/files')
-rw-r--r--print/rlpr/files/patch-msg39
1 files changed, 0 insertions, 39 deletions
diff --git a/print/rlpr/files/patch-msg b/print/rlpr/files/patch-msg
deleted file mode 100644
index 1a775ee4bb50..000000000000
--- a/print/rlpr/files/patch-msg
+++ /dev/null
@@ -1,39 +0,0 @@
-Don't allow the network obtained strings to be interpreted
-as sprintf() format directives. See http://www.osvdb.org/7194
-
-This fix is different from Debian's. It is better, because it
-requires no extra work, when errno is zero, and saves syslog(3)
-the hassle of handling %m, when it is.
-
- -mi
-
---- src/msg.c Thu Sep 16 01:10:23 1999
-+++ src/msg.c Thu Jun 24 17:14:13 2004
-@@ -160,20 +160,14 @@
-
- } else if (rlpr_msg->use_syslog) {
--
-- /*
-- * sigh. this really sucks, but what can we do: vsnprintf()
-- * isn't yet standard enough to rely on. maybe if i can find
-- * a portable implementation lying around somewhere i can make
-- * a ../lib/vsnprintf.c
-- */
--
- char buf[BUFSIZ];
-+ const char *_format;
-
-- vsprintf(buf, _(format), ap);
--
-- if (errno != 0)
-- strcat(buf, ": %m");
-+ if (errno != 0) {
-+ snprintf(buf, sizeof buf, "%s: %s", _(format), strerror(errno));
-+ _format = buf;
-+ } else
-+ _format = _(format);
-
-- syslog(rlpr_msg->syslog_prio[level], buf);
-+ vsyslog(rlpr_msg->syslog_prio[level], _format, ap);
-
- } else {