mirror of
https://github.com/opnsense/src.git
synced 2026-07-15 20:13:02 -04:00
ddb ps: Print again the effective GID, separately
Following commitbe1f7435ef("kern: start tracking cr_gid outside of cr_groups[]"), cr_groups[] doesn't contain the effective GID anymore. Fix the 'show proc' DDB command to show it again, and make it stand out with respect to the supplementary ones. Fixes:be1f7435ef("kern: start tracking cr_gid outside of cr_groups[]") MFC after: 9 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52251 (cherry picked from commit de974a0f1b73e79466c25f3c85fe727004576fea)
This commit is contained in:
parent
221a5fb331
commit
960dbe036d
1 changed files with 5 additions and 6 deletions
|
|
@ -459,12 +459,11 @@ DB_SHOW_COMMAND(proc, db_show_proc)
|
|||
db_printf("??? (%#x)\n", p->p_state);
|
||||
}
|
||||
if (p->p_ucred != NULL) {
|
||||
db_printf(" uid: %d gids: ", p->p_ucred->cr_uid);
|
||||
for (i = 0; i < p->p_ucred->cr_ngroups; i++) {
|
||||
db_printf("%d", p->p_ucred->cr_groups[i]);
|
||||
if (i < (p->p_ucred->cr_ngroups - 1))
|
||||
db_printf(", ");
|
||||
}
|
||||
db_printf(" uid: %d gid: %d supp gids: ",
|
||||
p->p_ucred->cr_uid, p->p_ucred->cr_gid);
|
||||
for (i = 0; i < p->p_ucred->cr_ngroups; i++)
|
||||
db_printf(i == 0 ? "%d" : ", %d",
|
||||
p->p_ucred->cr_groups[i]);
|
||||
db_printf("\n");
|
||||
}
|
||||
if (p->p_pptr != NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue