Bug#1023429: pgrep/pkill: remove trailing 0x00 from matching?

2023-12-06 Thread Christoph Anton Mitterer
Hey. Just for the records: At least as of now, ssh no longer seems to add the multiple 0x0 to it's cmdline. But I guess the "problem" (should it ever come back or exist for other programs) in pgrep/pkill still remains. Cheers, Chris.

Bug#1023429: pgrep/pkill: remove trailing 0x00 from matching?

2022-11-14 Thread Christoph Anton Mitterer
Hey Craig. On Tue, 2022-11-15 at 08:01 +1100, Craig Small wrote: > > > It can, but what we think the string is is not what the string > actually is, I suspect. > Each one of those 0x0 are delimiters, so if there was two of them at > the end we would have: > argv[0] DELIM argv[1] DELIM argv[2] >

Bug#1023429: pgrep/pkill: remove trailing 0x00 from matching?

2022-11-14 Thread Craig Small
On Tue, 15 Nov 2022 at 00:36, Christoph Anton Mitterer < cales...@scientia.org> wrote: > $ hd /proc/19557/cmdline > 73 73 68 3a 20 2f 68 6f 6d 65 2f 63 61 6c 65 73 |ssh: > /home/cales| > 0010 74 79 6f 2f 2e 73 73 68 2f 6d 75 78 2f 72 6f 6f > |tyo/.ssh/mux/roo| > 0020 74 40

Bug#1023429: pgrep/pkill: remove trailing 0x00 from matching?

2022-11-14 Thread Christoph Anton Mitterer
Hey Craig On Mon, 2022-11-14 at 19:25 +1100, Craig Small wrote: > I'm not sure why it is not matching, my test script above works fine. > That was with 3.3.17-5 I also just tried again, with 2:3.3.17-7.1, and oddly enough it worked again. $ ps ax | grep mux 19557 ?Ss 0:00 ssh:

Bug#1023429: pgrep/pkill: remove trailing 0x00 from matching?

2022-11-14 Thread Craig Small
On Fri, 4 Nov 2022 at 12:09, Christoph Anton Mitterer wrote: > pgrep --full --exact --euid "${LOGNAME}" --list-full -- "^ssh: > ${HOME}/\.ssh/mux/.+ \[mux]$" > $ ./blah [4565] & [1] 769 $ pgrep --full --exact --list-full '^/bin/sh ./blah \[4565]$' 769 /bin/sh ./blah [4565] $ cat blah

Bug#1023429: pgrep/pkill: remove trailing 0x00 from matching?

2022-11-03 Thread Christoph Anton Mitterer
Package: procps Version: 2:3.3.17-7.1 Severity: wishlist Hey. I have a script that matches on any ssh channel multiplexing process (and then kills it) after printing them. It basically does: pgrep --full --exact --euid "${LOGNAME}" --list-full -- "^ssh: ${HOME}/\.ssh/mux/.+ \[mux]$"