Commit 92cd86f
committed
darwin: Use LOCAL_PEERCRED instead of SO_PEERCRED
While LOCAL_PEERCRED is somewhat similar to SO_PEERCRED, we
unfortunately don't have access to the PID of the remote peer.
This is something we actually need to properly distinguish the remote
peer by giving it an IP address with the PID encoded, otherwise we'd end
up with duplicate IPs.
On the other hand, using random IP addresses also is not a very good
solution here, since we actually *want* to have the same IP for the same
process.
Right now the UID and GID fields are not used at all on Darwin, but we
really need to figure out a way to properly assign fake IP addresses.
Signed-off-by: aszlig <aszlig@nix.build>1 parent aef1c6f commit 92cd86f
3 files changed
+50
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
111 | 123 | | |
112 | 124 | | |
113 | 125 | | |
114 | | - | |
| 126 | + | |
115 | 127 | | |
116 | 128 | | |
117 | 129 | | |
118 | 130 | | |
119 | 131 | | |
120 | 132 | | |
121 | 133 | | |
122 | | - | |
| 134 | + | |
123 | 135 | | |
124 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
125 | 139 | | |
126 | | - | |
| 140 | + | |
127 | 141 | | |
| 142 | + | |
128 | 143 | | |
129 | 144 | | |
130 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| 27 | + | |
23 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
265 | 269 | | |
266 | 270 | | |
267 | 271 | | |
| 272 | + | |
268 | 273 | | |
269 | 274 | | |
270 | 275 | | |
271 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
272 | 285 | | |
273 | 286 | | |
274 | 287 | | |
| |||
453 | 466 | | |
454 | 467 | | |
455 | 468 | | |
| 469 | + | |
456 | 470 | | |
457 | 471 | | |
458 | 472 | | |
459 | 473 | | |
460 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
461 | 483 | | |
462 | 484 | | |
463 | 485 | | |
| |||
0 commit comments