MCPcopy Index your code
hub / github.com/RsyncProject/rsync / x_stat

Function x_stat

xattrs.c:1258–1269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1256}
1257
1258int 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
1271int x_lstat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst)
1272{

Callers 3

copy_valid_pathFunction · 0.85
readlink_statFunction · 0.85
link_statFunction · 0.85

Calls 2

do_stat_atFunction · 0.85
get_stat_xattrFunction · 0.85

Tested by

no test coverage detected