smbd: also reset struct stat_ex.cached_dos_attributes in SET_STAT_INVALID()
[samba.git] / source3 / include / smb_macros.h
index 0f44d1402a859628fdf3a5b35911903646a42c3a..42ff9ffb0d45f9d05029fc16630b34b86bafc2a9 100644 (file)
 
 #define VALID_STAT(st) ((st).st_ex_nlink != 0)
 #define VALID_STAT_OF_DIR(st) (VALID_STAT(st) && S_ISDIR((st).st_ex_mode))
-#define SET_STAT_INVALID(st) ((st).st_ex_nlink = 0)
+#define SET_STAT_INVALID(st) { \
+               (st).st_ex_nlink = 0;                                   \
+               (st).cached_dos_attributes = FILE_ATTRIBUTES_INVALID;   \
+};
 
 /* Macros to get at offsets within smb_lkrng and smb_unlkrng
    structures. We cannot define these as actual structures