Unreachable Call at nfs-workarounds.c:176 |
No properties have been set. edit properties |
Jump to warning location ↓ | warning details... |
| |
nfs_flush_chown_uid (/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/nfs-workarounds.c)![]() | ||||||
![]() | ||||||
146 | static void nfs_flush_chown_uid(const char *path) | |||||
147 | { | |||||
148 | uid_t uid; | |||||
149 | ||||||
150 | #ifdef ATTRCACHE_FLUSH_CHOWN_UID_1 | |||||
151 | uid = (uid_t)-1; | |||||
152 | #else | |||||
153 | struct stat st; | |||||
154 | ||||||
155 | if (stat(path, &st) == 0) | |||||
156 | uid = st.st_uid; | |||||
157 | else { | |||||
158 | if (errno == ESTALE) { | |||||
159 | /* ESTALE causes the OS to flush the attr cache */ | |||||
160 | return; | |||||
161 | } | |||||
162 | if (likely(errno == ENOENT)) { | |||||
163 | nfs_flush_file_handle_cache_parent_dir(path); | |||||
164 | return; | |||||
165 | } | |||||
166 | i_error("nfs_flush_chown_uid: stat(%s) failed: %m", path); | |||||
167 | return; | |||||
168 | } | |||||
169 | #endif | |||||
170 | if (chown(path, uid, (gid_t)-1) < 0) { | |||||
171 | if (errno == ESTALE || errno == EPERM || errno == ENOENT) { | |||||
172 | /* attr cache is flushed */ | |||||
173 | return; | |||||
174 | } | |||||
175 | if (likely(errno == ENOENT)) { | |||||
176 | nfs_flush_file_handle_cache_parent_dir(path);
| |||||
177 | return; | |||||
178 | } | |||||
179 | i_error("nfs_flush_chown_uid: chown(%s) failed: %m", path); | |||||
180 | } | |||||
181 | } | |||||
![]() |