set uid/gid

git-svn-id: http://s3fs.googlecode.com/svn/trunk@128 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
rrizun 2008-04-01 22:56:37 +00:00
parent 02896f886f
commit 54764721a1

View File

@ -721,6 +721,9 @@ s3fs_getattr(const char *path, struct stat *stbuf) {
if (S_ISREG(stbuf->st_mode))
stbuf->st_blocks = stbuf->st_size / 512 + 1;
stbuf->st_uid = getuid();
stbuf->st_gid = getgid();
return 0;
}
@ -1226,6 +1229,9 @@ s3fs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset,
if (S_ISREG(st.st_mode))
st.st_blocks = st.st_size / 512 + 1;
st.st_uid = getuid();
st.st_gid = getgid();
auto_lock lock(stat_cache_lock);
stat_cache[stuff.path] = st;
}