mirror of
https://github.com/samba-team/samba.git
synced 2025-02-10 13:57:47 +03:00
Fix stat results to be consistent between smbc_stat and smbc_fstat.
We create a kludged inode based on the checksum of the path. We therefore need to use the same (full) path when calculating it in both smbc_stat() and smbc_fstat(). If struct stat has an rdev field, set it to zero. Derrell
This commit is contained in:
parent
5a4a7aec76
commit
b4282fbd6d
@ -2263,6 +2263,9 @@ smbc_setup_stat(SMBCCTX *context,
|
||||
#endif
|
||||
#ifdef HAVE_STAT_ST_BLOCKS
|
||||
st->st_blocks = (size+511)/512;
|
||||
#endif
|
||||
#ifdef HAVE_STRUCT_STAT_ST_RDEV
|
||||
st->st_rdev = 0;
|
||||
#endif
|
||||
st->st_uid = getuid();
|
||||
st->st_gid = getgid();
|
||||
@ -2367,7 +2370,7 @@ smbc_stat_ctx(SMBCCTX *context,
|
||||
|
||||
st->st_ino = ino;
|
||||
|
||||
smbc_setup_stat(context, st, path, size, mode);
|
||||
smbc_setup_stat(context, st, (char *) fname, size, mode);
|
||||
|
||||
set_atimespec(st, access_time_ts);
|
||||
set_ctimespec(st, change_time_ts);
|
||||
|
Loading…
x
Reference in New Issue
Block a user