Changeset 57


Ignore:
Timestamp:
Aug 7, 2007, 6:57:41 AM (18 years ago)
Author:
Paul Smedley
Message:

Use os2_isattribute to check for readonly, system, hidden, archive attributes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/smbd/dosmode.c

    r22 r57  
    7878        mode_t dir_mode = 0; /* Mode of the inherit_from directory if
    7979                              * inheriting. */
    80 
    8180        if (!lp_store_dos_attributes(SNUM(conn)) && IS_DOS_READONLY(dosmode)) {
    8281                result &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
     
    155154        if (ro_opts == MAP_READONLY_YES) {
    156155                /* Original Samba method - map inverse of user "w" bit. */
     156#ifndef __OS2__
    157157                if ((sbuf->st_mode & S_IWUSR) == 0) {
     158#else
     159                if(os2_isattribute(path,aRONLY)==0) {
     160#endif
    158161                        result |= aRONLY;
    159162                }
     
    164167                }
    165168        } /* Else never set the readonly bit. */
    166 
     169#ifndef __OS2__
    167170        if (MAP_ARCHIVE(conn) && ((sbuf->st_mode & S_IXUSR) != 0))
     171#else
     172                if(os2_isattribute(path,aARCH)==0)
     173#endif
    168174                result |= aARCH;
    169175
     176#ifndef __OS2__
    170177        if (MAP_SYSTEM(conn) && ((sbuf->st_mode & S_IXGRP) != 0))
     178#else
     179                if(os2_isattribute(path,aSYSTEM)==0)
     180#endif
    171181                result |= aSYSTEM;
    172182       
     183#ifndef __OS2__
    173184        if (MAP_HIDDEN(conn) && ((sbuf->st_mode & S_IXOTH) != 0))
     185#else
     186                if(os2_isattribute(path,aHIDDEN)==0)
     187#endif
    174188                result |= aHIDDEN;   
    175189 
Note: See TracChangeset for help on using the changeset viewer.