| 1256 | } |
| 1257 | |
| 1258 | int x_stat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst) |
| 1259 | { |
| 1260 | /* Use the *_at variants so that on a daemon-no-chroot deployment |
| 1261 | * the metadata read goes through a secure parent dirfd instead |
| 1262 | * of bare path resolution. The *_at wrappers fall through to |
| 1263 | * plain do_stat outside the daemon-no-chroot context, so this |
| 1264 | * change is transparent for non-daemon use. */ |
| 1265 | int ret = do_stat_at(fname, fst); |
| 1266 | if ((ret < 0 || get_stat_xattr(fname, -1, fst, xst) < 0) && xst) |
| 1267 | xst->st_mode = 0; |
| 1268 | return ret; |
| 1269 | } |
| 1270 | |
| 1271 | int x_lstat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst) |
| 1272 | { |
no test coverage detected