From 58f6c75babebcf05c9ef5bb50dc433e55156b6ec Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 6 Oct 1998 11:14:52 +0000 Subject: implemented attribute mapping and chmod. file attributes are mapped in the same manner as smbd. See the README for a full explanation. (This used to be commit 0a5dcddd3fa23081d7cd214acc32b8046125a74e) --- source3/smbwrapper/smbw_stat.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/smbwrapper/smbw_stat.c') diff --git a/source3/smbwrapper/smbw_stat.c b/source3/smbwrapper/smbw_stat.c index ab351d56b1..a6d01f66d6 100644 --- a/source3/smbwrapper/smbw_stat.c +++ b/source3/smbwrapper/smbw_stat.c @@ -33,6 +33,8 @@ setup basic info in a stat structure void smbw_setup_stat(struct stat *st, char *fname, size_t size, int mode) { ZERO_STRUCTP(st); + + st->st_mode = 0; if (IS_DOS_DIR(mode)) { st->st_mode = SMBW_DIR_MODE; @@ -40,6 +42,11 @@ void smbw_setup_stat(struct stat *st, char *fname, size_t size, int mode) st->st_mode = SMBW_FILE_MODE; } + if (IS_DOS_ARCHIVE(mode)) st->st_mode |= S_IXUSR; + if (IS_DOS_SYSTEM(mode)) st->st_mode |= S_IXGRP; + if (IS_DOS_HIDDEN(mode)) st->st_mode |= S_IXOTH; + if (!IS_DOS_READONLY(mode)) st->st_mode |= S_IWUSR; + st->st_size = size; st->st_blksize = 512; st->st_blocks = (size+511)/512; -- cgit