forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0fba3be
committed
Simplify validate_exec() by using access(2) to check file permissions,
rather than trying to implement the equivalent logic by hand. The motivationfor the original coding appears to have been to check with the effective uid'spermissions not the real uid's; but there is no longer any difference, becausewe don't run the postmaster setuid (indeed, main.c enforces that they're thesame). Using access() means we will get it right in situations the originalcoding failed to handle, such as ACL-based permissions. Besides it's a lotshorter, cleaner, and more thread-safe. Per bug #5275 from James Bellinger.1 parent715120e commit0fba3be
1 file changed
+8
-78
lines changedLines changed: 8 additions & 78 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
24 |
| - | |
25 | 23 |
| |
26 | 24 |
| |
27 | 25 |
| |
28 | 26 |
| |
29 | 27 |
| |
30 |
| - | |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 |
| - | |
40 |
| - | |
41 |
| - | |
42 | 28 |
| |
43 | 29 |
| |
44 | 30 |
| |
| |||
70 | 56 |
| |
71 | 57 |
| |
72 | 58 |
| |
73 |
| - | |
74 |
| - | |
75 |
| - | |
76 |
| - | |
77 |
| - | |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
82 |
| - | |
83 | 59 |
| |
84 | 60 |
| |
85 | 61 |
| |
86 | 62 |
| |
| 63 | + | |
| 64 | + | |
87 | 65 |
| |
88 | 66 |
| |
89 | 67 |
| |
| |||
106 | 84 |
| |
107 | 85 |
| |
108 | 86 |
| |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 |
| - | |
113 | 87 |
| |
114 | 88 |
| |
115 | 89 |
| |
116 | 90 |
| |
117 |
| - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
118 | 95 |
| |
119 | 96 |
| |
120 |
| - | |
121 |
| - | |
122 |
| - | |
123 |
| - | |
124 |
| - | |
125 |
| - | |
126 |
| - | |
127 |
| - | |
128 |
| - | |
129 |
| - | |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 |
| - | |
134 |
| - | |
135 |
| - | |
136 |
| - | |
137 |
| - | |
138 |
| - | |
139 |
| - | |
140 |
| - | |
141 |
| - | |
142 |
| - | |
143 |
| - | |
144 |
| - | |
145 |
| - | |
146 |
| - | |
147 |
| - | |
148 |
| - | |
149 |
| - | |
150 |
| - | |
151 |
| - | |
152 |
| - | |
153 |
| - | |
154 |
| - | |
155 |
| - | |
156 |
| - | |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 |
| - | |
161 |
| - | |
162 |
| - | |
163 |
| - | |
164 | 97 |
| |
| 98 | + | |
165 | 99 |
| |
166 | 100 |
| |
167 | 101 |
| |
| |||
178 | 112 |
| |
179 | 113 |
| |
180 | 114 |
| |
181 |
| - | |
182 |
| - | |
183 |
| - | |
184 |
| - | |
185 | 115 |
| |
186 | 116 |
| |
187 | 117 |
| |
|
0 commit comments
Comments
(0)