From 096e40c9169b2121a82c42d3cf31cbfb869603ce Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Thu, 17 Jan 2008 09:29:13 -0500 Subject: 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 used to be commit b4282fbd6d27d868b2d5c04bb72d2d7421822da1) --- source3/libsmb/libsmbclient.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c index fb04d143a5..077970647d 100644 --- a/source3/libsmb/libsmbclient.c +++ b/source3/libsmb/libsmbclient.c @@ -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); -- cgit