Commit de553b7
committed
fix(agent): include primary group in ListGroups
The ListGroups function was only returning secondary groups from
`/etc/group`, missing the user's primary group defined in `/etc/passwd`.
This commit modifies the ListGroups method to:
- First retrieve the user's primary group (GID) from /etc/passwd
- Then append secondary groups from /etc/group
- Avoid duplicates if the primary group is also listed in /etc/group1 parent 50361fa commit de553b7
1 file changed
+22
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | 62 | | |
64 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
65 | 83 | | |
66 | 84 | | |
67 | 85 | | |
| |||
72 | 90 | | |
73 | 91 | | |
74 | 92 | | |
75 | | - | |
| 93 | + | |
76 | 94 | | |
77 | 95 | | |
78 | 96 | | |
| |||
0 commit comments