[sysvinit/f14/master] Fix counting MAXLINES in wall
Petr Lautrbach
plautrba at fedoraproject.org
Mon Jan 10 13:32:35 UTC 2011
commit 5f789305080af606b4881cfde9a250bff39c9931
Author: Petr Lautrbach <plautrba at redhat.com>
Date: Fri Jan 7 16:40:41 2011 +0100
Fix counting MAXLINES in wall
sysvinit-2.87-wall-maxlines.patch | 13 +++++++++++++
sysvinit.spec | 3 +++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/sysvinit-2.87-wall-maxlines.patch b/sysvinit-2.87-wall-maxlines.patch
new file mode 100644
index 0000000..8331ee0
--- /dev/null
+++ b/sysvinit-2.87-wall-maxlines.patch
@@ -0,0 +1,13 @@
+diff --git a/src/wall.c b/src/wall.c
+index 92ffbc1..9c68338 100644
+--- a/src/wall.c
++++ b/src/wall.c
+@@ -94,7 +94,7 @@ int main(int argc, char **argv)
+
+ i = 0;
+ for (p = buf; *p; p++) {
+- if (*p == '\n' && i++ > MAXLINES) {
++ if (*p == '\n' && ++i >= MAXLINES) {
+ *++p = 0;
+ break;
+ }
diff --git a/sysvinit.spec b/sysvinit.spec
index 167f6b3..b2f36eb 100644
--- a/sysvinit.spec
+++ b/sysvinit.spec
@@ -18,6 +18,7 @@ Patch12: sysvinit-2.87-sulogin.patch
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
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: pam >= 0.66-5
Requires: filesystem >= 2.2.4-1
@@ -70,6 +71,8 @@ management.
%patch14 -p1 -b .ipv6
# Add option to pidof to exclude similar processes to omitted processes (#632321)
%patch15 -p1 -b .omit
+# Fix counting MAXLINES in wall
+%patch16 -p1 -b .maxlines
%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