[sysvinit/f14/master] sysvinit-2.87-wall-broadcast-message.patch - Raise limit for broadcast message (#663032)

Petr Lautrbach plautrba at fedoraproject.org
Mon Jan 10 13:32:40 UTC 2011


commit 30cbaeddd2fae706dd6c1b7f2696cbc4628077ab
Author: Petr Lautrbach <plautrba at redhat.com>
Date:   Mon Jan 10 14:19:42 2011 +0100

    sysvinit-2.87-wall-broadcast-message.patch - Raise limit for broadcast message (#663032)

 sysvinit-2.87-wall-broadcast-message.patch |   35 ++++++++++++++++++++++++++++
 sysvinit.spec                              |    4 +++
 2 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/sysvinit-2.87-wall-broadcast-message.patch b/sysvinit-2.87-wall-broadcast-message.patch
new file mode 100644
index 0000000..2bf9eec
--- /dev/null
+++ b/sysvinit-2.87-wall-broadcast-message.patch
@@ -0,0 +1,35 @@
+diff --git a/src/dowall.c b/src/dowall.c
+index 1a6ab28..2f3d66f 100644
+--- a/src/dowall.c
++++ b/src/dowall.c
+@@ -130,7 +130,7 @@ void wall(char *text, int fromshutdown, int remote)
+ 	struct utmp		*utmp;
+ 	time_t			t;
+ 	char			term[UT_LINESIZE+6];
+-	char			line[81];
++	char			message[401], line[411];
+ 	char                    hostname[256]; /* HOST_NAME_MAX+1 */
+ 	char			*date, *p;
+ 	char			*user, *tty;
+@@ -163,15 +163,17 @@ void wall(char *text, int fromshutdown, 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 b2f36eb..90e23bf 100644
--- a/sysvinit.spec
+++ b/sysvinit.spec
@@ -19,6 +19,7 @@ Patch13: sysvinit-2.87-wide.patch
 Patch14: sysvinit-2.87-ipv6.patch
 Patch15: sysvinit-2.87-omit.patch
 Patch16: sysvinit-2.87-wall-maxlines.patch
+Patch17: sysvinit-2.87-wall-broadcast-message.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: pam >= 0.66-5
 Requires: filesystem >= 2.2.4-1
@@ -73,6 +74,9 @@ management.
 %patch15 -p1 -b .omit
 # Fix counting MAXLINES in wall
 %patch16 -p1 -b .maxlines
+# Raise limit for broadcast message (#663032)
+%patch17 -p1 -b .broadcast
+
 
 %build
 make %{?_smp_mflags} CC="%{__cc}" CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" LDFLAGS="" LCRYPT="-lcrypt" -C src


More information about the scm-commits mailing list