Commit c71d14e
newrole: ensure password memory erasure
Compiler can optimize calls to memset(3), due to the as-if rule, away if
the object is not accessed later on. Use a wrapper using volatile
pointers to ensure the memory is guaranteed to be erased. Also erase
the encrypted password.
Signed-off-by: Christian Göttsche <[email protected]>1 parent 1af8089 commit c71d14e
1 file changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
336 | 344 | | |
337 | 345 | | |
338 | 346 | | |
| |||
351 | 359 | | |
352 | 360 | | |
353 | 361 | | |
| 362 | + | |
354 | 363 | | |
355 | 364 | | |
356 | 365 | | |
| |||
371 | 380 | | |
372 | 381 | | |
373 | 382 | | |
374 | | - | |
| 383 | + | |
375 | 384 | | |
376 | 385 | | |
377 | 386 | | |
378 | 387 | | |
379 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
380 | 392 | | |
381 | 393 | | |
382 | 394 | | |
| |||
0 commit comments