Ignore:
Timestamp:
Nov 12, 2012, 4:35:55 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: update branche to 3.5.12

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.5.x/source3/smbd/statcache.c

    r414 r732  
    146146 *
    147147 * @param conn    A connection struct to do the stat() with.
     148 * @param posix_paths Whether to lookup using stat() or lstat()
    148149 * @param name    The path we are attempting to cache, modified by this routine
    149150 *                to be correct as far as the cache can tell us. We assume that
     
    162163
    163164bool stat_cache_lookup(connection_struct *conn,
     165                        bool posix_paths,
    164166                        char **pp_name,
    165167                        char **pp_dirpath,
     
    177179        TALLOC_CTX *ctx = talloc_tos();
    178180        struct smb_filename smb_fname;
     181        int ret;
    179182
    180183        *pp_dirpath = NULL;
     
    279282        smb_fname.base_name = translated_path;
    280283
    281         if (SMB_VFS_STAT(conn, &smb_fname) != 0) {
     284        if (posix_paths) {
     285                ret = SMB_VFS_LSTAT(conn, &smb_fname);
     286        } else {
     287                ret = SMB_VFS_STAT(conn, &smb_fname);
     288        }
     289
     290        if (ret != 0) {
    282291                /* Discard this entry - it doesn't exist in the filesystem. */
    283292                memcache_delete(smbd_memcache(), STAT_CACHE,
Note: See TracChangeset for help on using the changeset viewer.