Message ID | dc933ad6a1a6d07dc3b8bf09686fd1a5f4806493.1653446538.git.peilin.ye@bytedance.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ea3b57ec3991a576a6aa7276979db518fd5488ce |
Delegated to: | David Ahern |
Headers | show |
Series | ss: Introduce -T, --threads option | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
diff --git a/misc/ss.c b/misc/ss.c index dd7b67a76255..ec14d746c669 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -652,10 +652,7 @@ static void user_ent_hash_build(void) sscanf(lnk, "socket:[%u]", &ino); - snprintf(tmp, sizeof(tmp), "%s/%d/fd/%s", - root, pid, d1->d_name); - - if (getfilecon(tmp, &sock_context) <= 0) + if (getfilecon(name, &sock_context) <= 0) sock_context = strdup(no_ctx); if (process[0] == '\0') {