[sysvinit] sysvinit-2.88-wall-broadcast-message.patch - Raise limit for broadcast message (#663032)
Petr Lautrbach
plautrba at fedoraproject.org
Fri Jan 7 15:26:30 UTC 2011
commit b19c6bdc58b7d0958e87e45a041dc6d7849a9272
Author: Petr Lautrbach <plautrba at redhat.com>
Date: Fri Jan 7 16:24:50 2011 +0100
sysvinit-2.88-wall-broadcast-message.patch - Raise limit for broadcast message (#663032)
sysvinit-2.88-wall-broadcast-message.patch | 35 ++++++++++++++++++++++++++++
sysvinit.spec | 3 ++
2 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/sysvinit-2.88-wall-broadcast-message.patch b/sysvinit-2.88-wall-broadcast-message.patch
new file mode 100644
index 0000000..389ce13
--- /dev/null
+++ b/sysvinit-2.88-wall-broadcast-message.patch
@@ -0,0 +1,35 @@
+diff --git a/src/dowall.c b/src/dowall.c
+index 85645c0..1bf4cb9 100644
+--- a/src/dowall.c
++++ b/src/dowall.c
+@@ -156,7 +156,7 @@ void wall(const char *text, int remote)
+ struct utmp *utmp;
+ time_t t;
+ char term[UT_LINESIZE+ strlen(_PATH_DEV) + 1];
+- char line[81];
++ char message[401], line[411];
+ char hostname[HOST_NAME_MAX+1];
+ char *date, *p;
+ char *user, *tty;
+@@ -189,15 +189,17 @@ void wall(const char *text, int remote)
+ *p = 0;
+
+ if (remote) {
+- snprintf(line, sizeof(line),
+- "\007\r\nRemote broadcast message (%s):\r\n\r\n",
++ snprintf(message, sizeof(message),
++ "Remote broadcast message (%s):",
+ date);
+ } else {
+- snprintf(line, sizeof(line),
+- "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
++ snprintf(message, sizeof(message),
++ "Broadcast message from %s@%s %s(%s):",
+ user, hostname, tty, date);
+ }
+
++ snprintf(line, sizeof(line), "\007\r\n%s\r\n\r\n", message);
++
+ /*
+ * Fork to avoid us hanging in a write()
+ */
diff --git a/sysvinit.spec b/sysvinit.spec
index d23dc80..385f5c0 100644
--- a/sysvinit.spec
+++ b/sysvinit.spec
@@ -15,6 +15,7 @@ Patch6: sysvinit-2.88-quiet.patch
Patch14: sysvinit-2.88-ipv6.patch
Patch15: sysvinit-2.88-omit.patch
Patch16: sysvinit-2.88-wall-maxlines.patch
+Patch17: sysvinit-2.88-wall-broadcast-message.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: pam >= 0.66-5
Requires: filesystem >= 2.2.4-1
@@ -60,6 +61,8 @@ management.
%patch15 -p1 -b .omit
# Fix counting MAXLINES in wall
%patch16 -p1 -b .maxlines
+# Raise limit for broadcast message
+%patch17 -p1 -b .broadcast
%build
make %{?_smp_mflags} CC="%{__cc}" CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" LDFLAGS="-lcrypt" -C src
More information about the scm-commits
mailing list