Commit 0383b56
fix: use original user's home directory for CA certificate storage
When running under sudo, the CA certificate was being stored in root's
home directory (/root/.config/boundary/) but the subprocess running as
the original user couldn't access it, causing certificate verification
errors.
Now GetConfigDir() detects sudo execution and uses the original user's
home directory, so the CA certificate is stored in a location accessible
to the subprocess.
Fixes curl errors like:
'error setting certificate verify locations: CAfile: /Users/user/.config/boundary/ca-cert.pem'
Co-authored-by: f0ssel <[email protected]>1 parent dcd0450 commit 0383b56
1 file changed
+23
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
298 | | - | |
299 | | - | |
300 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
301 | 321 | | |
302 | 322 | | |
303 | 323 | | |
| |||
0 commit comments