Ignore:
Timestamp:
Jan 15, 2010, 8:23:30 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 to 3.3.10 (source)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/smbd/dosmode.c

    r244 r370  
    2020
    2121#include "includes.h"
     22
     23extern enum protocol_types Protocol;
     24
     25static uint32_t filter_mode_by_protocol(uint32_t mode)
     26{
     27        if (Protocol <= PROTOCOL_LANMAN2) {
     28                DEBUG(10,("filter_mode_by_protocol: "
     29                        "filtering result 0x%x to 0x%x\n",
     30                        (unsigned int)mode,
     31                        (unsigned int)(mode & 0x3f) ));
     32                mode &= 0x3f;
     33        }
     34        return mode;
     35}
    2236
    2337static int set_sparse_flag(const SMB_STRUCT_STAT * const sbuf)
     
    361375        }
    362376
     377        if (result == 0) {
     378                result = FILE_ATTRIBUTE_NORMAL;
     379        }
     380
     381        result = filter_mode_by_protocol(result);
     382
    363383        DEBUG(8,("dos_mode_msdfs returning "));
    364384
     
    425445                result |= aHIDDEN;
    426446        }
     447
     448        if (result == 0) {
     449                result = FILE_ATTRIBUTE_NORMAL;
     450        }
     451
     452        result = filter_mode_by_protocol(result);
    427453
    428454        DEBUG(8,("dos_mode returning "));
Note: See TracChangeset for help on using the changeset viewer.