Hello community,

here is the log from the commit of package procps for openSUSE:Factory checked 
in at 2017-06-01 16:28:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/procps (Old)
 and      /work/SRC/openSUSE:Factory/.procps.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "procps"

Thu Jun  1 16:28:38 2017 rev:103 rq:497307 version:3.3.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/procps/procps.changes    2017-05-09 
17:58:00.308513738 +0200
+++ /work/SRC/openSUSE:Factory/.procps.new/procps.changes       2017-06-01 
16:28:41.797284522 +0200
@@ -1,0 +2,7 @@
+Mon May 22 08:25:17 UTC 2017 - [email protected]
+
+- Add patch procps-ng-3.3.12-sysctl-a.patch (bsc#1039941, had been
+  accepted upstream) that is allow content lines below /proc/sys
+  longer than 1024 characters
+
+-------------------------------------------------------------------

New:
----
  procps-ng-3.3.12-sysctl-a.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ procps.spec ++++++
--- /var/tmp/diff_new_pack.YOseZo/_old  2017-06-01 16:28:43.009113650 +0200
+++ /var/tmp/diff_new_pack.YOseZo/_new  2017-06-01 16:28:43.013113086 +0200
@@ -82,6 +82,8 @@
 Patch32:        procps-ng-3.3.10-errno.patch
 # PATCH-FEATURE-SUSE -- Let upstream pmap behave simialr to old suse pmap
 Patch33:        procps-ng-3.3.11-pmap4suse.patch
+# PATCH-FIX-UPSTREAM -- Allow content lines below /proc/sys longer than 1024 
characters
+Patch34:        procps-ng-3.3.12-sysctl-a.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
@@ -147,6 +149,7 @@
 %patch31 -p1
 %patch32
 %patch33
+%patch34
 
 %build
 #

++++++ procps-ng-3.3.12-sysctl-a.patch ++++++
>From a89cebe1970fb0cd87d71e4524d6620c2b673369 Mon Sep 17 00:00:00 2001
From: Werner Fink <[email protected]>
Date: Mon, 22 May 2017 12:17:53 +0200
Subject: [PATCH] Allow sysctl to print lines longer than 1024 chars

as well do not open /proc/sys files if only the names of the
system control names of the kernel parameters should be shown.
Avoid leaking tmpname in case of a pattern mismatch.

Signed-off-by: Werner Fink <[email protected]>
---
 sysctl.c | 42 ++++++++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 18 deletions(-)

diff --git sysctl.c sysctl.c
index c3072a1..29f31af 100644
--- sysctl.c
+++ sysctl.c
@@ -209,8 +209,13 @@ static int ReadSetting(const char *restrict const name)
        }
 
        if (pattern && !pattern_match(outname, pattern)) {
-               free(outname);
-               return 0;
+               rc = 0;
+               goto out;
+       }
+
+       if (NameOnly) {
+               fprintf(stdout, "%s\n", outname);
+               goto out;
        }
 
        fp = fopen(tmpname, "r");
@@ -239,24 +244,25 @@ static int ReadSetting(const char *restrict const name)
                         * /sbin/sysctl -a | egrep -6 dev.cdrom.info
                         */
                        do {
-                               if (NameOnly) {
-                                       fprintf(stdout, "%s\n", outname);
-                               } else {
-                                       /* already has the \n in it */
-                                       if (PrintName) {
-                                               fprintf(stdout, "%s = %s",
-                                                       outname, inbuf);
-                                               if (inbuf[strlen(inbuf) - 1] != 
'\n')
-                                                       putchar('\n');
-                                       } else {
-                                               if (!PrintNewline) {
-                                                       char *nlptr =
-                                                           strchr(inbuf, '\n');
-                                                       if (nlptr)
-                                                               *nlptr = '\0';
-                                               }
+                               char *nlptr;
+                               if (PrintName) {
+                                       fprintf(stdout, "%s = ", outname);
+                                       do {
                                                fprintf(stdout, "%s", inbuf);
+                                               nlptr = &inbuf[strlen(inbuf) - 
1];
+                                               /* already has the \n in it */
+                                               if (*nlptr == '\n')
+                                                       break;
+                                       } while (fgets(inbuf, sizeof inbuf - 1, 
fp));
+                                       if (*nlptr != '\n')
+                                               putchar('\n');
+                               } else {
+                                       if (!PrintNewline) {
+                                               nlptr = strchr(inbuf, '\n');
+                                               if (nlptr)
+                                                       *nlptr = '\0';
                                        }
+                                       fprintf(stdout, "%s", inbuf);
                                }
                        } while (fgets(inbuf, sizeof inbuf - 1, fp));
                } else {
-- 
2.12.0


Reply via email to