Commit 1264867
libnss_tcb: Initialize or rewind dirstream from inside setspent(3).
On first call to setspent(3) initialize the directory stream properly;
on subsequent calls use rewinddir(3) to reset the position of the directory
stream to the beginning of the directory, and also update the existing
directory stream to refer to the current state of the underlying directory
it operates on. As all internal functions are operating on thread-local
storage now, this operation will be safe, since it will emit no effects
outside of the thread calling the setspent(3) function itself.
Signed-off-by: Björn Esser <[email protected]>1 parent 0f4837b commit 1264867
2 files changed
+25
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
2 | 15 | | |
3 | 16 | | |
4 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
| |||
101 | 110 | | |
102 | 111 | | |
103 | 112 | | |
104 | | - | |
105 | | - | |
106 | | - | |
| 113 | + | |
| 114 | + | |
107 | 115 | | |
108 | 116 | | |
109 | 117 | | |
| |||
0 commit comments