linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/2] monitor: Only print credentials if PID is set
@ 2023-06-01 23:33 Luiz Augusto von Dentz
  2023-06-01 23:33 ` [PATCH BlueZ 2/2] shared/bap: Don't overwrite attribute declaration Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2023-06-01 23:33 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If PID is not set don't print anything since this is likely a packet
originated by the kernel itself.
---
 monitor/packet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index 946ceb2c640d..6d73e5abfcbc 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -438,7 +438,7 @@ static void print_packet(struct timeval *tv, struct ucred *cred, char ident,
 			pos += n;
 	}
 
-	if (cred) {
+	if (cred && cred->pid) {
 		cred_pid(cred, pid_str, sizeof(pid_str));
 		n = sprintf(line + pos, "%s: %c %s", pid_str, ident,
 						label ? label : "");
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-02 19:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-01 23:33 [PATCH BlueZ 1/2] monitor: Only print credentials if PID is set Luiz Augusto von Dentz
2023-06-01 23:33 ` [PATCH BlueZ 2/2] shared/bap: Don't overwrite attribute declaration Luiz Augusto von Dentz
2023-06-02  0:48 ` [BlueZ,1/2] monitor: Only print credentials if PID is set bluez.test.bot
2023-06-02 19:50 ` [PATCH BlueZ 1/2] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).