Commit 07db76e
committed
Med: daemons: Fix user/group checking in based.
This fixes a bug introduced by bcc7c90. The group members returned
by getgrnam will only include those users that are listed in /etc/group
for that group. It won't include any users for which a group is their
primary.
In other words, if this is what's in /etc/passwd:
hacluster:x:189:189:cluster user:/var/lib/pacemaker:/sbin/nologin
And this is what's in /etc/group:
haclient:x:189:
Then getgrnam will not list hacluster as a member of the haclient group
and is_daemon_group_member will return false. We need to re-introduce
the primary group check to fix this.1 parent 18ff34b commit 07db76e
1 file changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
99 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
100 | 115 | | |
101 | 116 | | |
102 | 117 | | |
103 | 118 | | |
104 | 119 | | |
105 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
106 | 128 | | |
107 | 129 | | |
108 | 130 | | |
| |||
0 commit comments