Hello community,

here is the log from the commit of package procps for openSUSE:Leap:15.2 
checked in at 2020-02-14 17:57:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/procps (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.procps.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "procps"

Fri Feb 14 17:57:56 2020 rev:28 rq:766894 version:3.3.15

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/procps/procps.changes  2020-01-15 
15:45:07.863312750 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.procps.new.26092/procps.changes       
2020-02-14 17:57:57.314821925 +0100
@@ -1,0 +2,7 @@
+Thu Dec 12 09:42:19 UTC 2019 - Dr. Werner Fink <wer...@suse.de>
+
+- Add aptch procps-ng-3.3.16-comm_len.patch
+  * "ps -C" does not allow anymore an argument longer than 15
+     characters (bsc#1158830)
+
+-------------------------------------------------------------------

New:
----
  procps-ng-3.3.16-comm_len.patch

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

Other differences:
------------------
++++++ procps.spec ++++++
--- /var/tmp/diff_new_pack.synyLR/_old  2020-02-14 17:57:58.762822792 +0100
+++ /var/tmp/diff_new_pack.synyLR/_new  2020-02-14 17:57:58.762822792 +0100
@@ -59,6 +59,8 @@
 Patch33:        procps-ng-3.3.11-pmap4suse.patch
 # PATCH-TYPO-SUSE
 Patch34:        procps-ng-3.3.15-typo.patch
+# PATCH-FEATURE-SUSE -- "ps -C" does not allow anymore an argument longer than 
15 characters
+Patch35:        procps-ng-3.3.16-comm_len.patch
 
 BuildRequires:  automake
 BuildRequires:  dejagnu
@@ -148,6 +150,7 @@
 %patch32
 %patch33 -b .pmap4us
 %patch34
+%patch35
 
 %build
 #

++++++ procps-ng-3.3.16-comm_len.patch ++++++
Bug bsc#1158830 -- "ps -C" does not allow anymore an argument longer than 15 
characters

---
 ps/select.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

--- ps/select.c
+++ ps/select.c 2019-12-11 13:07:05.428822333 +0000
@@ -116,10 +116,15 @@ static int proc_was_listed(proc_t *buf){
     break; case SEL_TTY : return_if_match(tty,tty);
     break; case SEL_SESS: return_if_match(session,pid);
 
-    break; case SEL_COMM: i=sn->n; while(i--)
-    if(!strncmp( buf->cmd, (*(sn->u+i)).cmd, 63 )) return 1;
-
-
+    break; case SEL_COMM: i=sn->n; while(i--){
+       /* In linux/sched.h TASK_COMM_LEN is still set to 15 characters plus \0 
*/
+        size_t coml = strlen(buf->cmd);
+        size_t cmdl = strlen((*(sn->u+i)).cmd);
+        if (coml < 15 && cmdl >= 15) return 0;
+        if (coml <= 15 && cmdl <= 15 && coml != cmdl) return 0;
+        if (cmdl > 15) cmdl = 15;
+        if(!strncmp( buf->cmd, (*(sn->u+i)).cmd, cmdl )) return 1;
+      }
 
 #undef return_if_match
 

Reply via email to