diff options
author | Tim Potter <tpot@samba.org> | 2000-02-03 05:17:25 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-02-03 05:17:25 +0000 |
commit | 16bb009dbbe6302febf3848cee61e9927eeb0fb5 (patch) | |
tree | 2e6871c679d6de83e99133cb968c6fbbc89375b6 /source3/smbd/filename.c | |
parent | 6df7bfbd9f5badd1d8489b7c329961441f71b471 (diff) | |
download | samba-16bb009dbbe6302febf3848cee61e9927eeb0fb5.tar.gz samba-16bb009dbbe6302febf3848cee61e9927eeb0fb5.tar.bz2 samba-16bb009dbbe6302febf3848cee61e9927eeb0fb5.zip |
Mega-VFS merge. Yeah baby!
Synopsis: change every disk access function to work through a vfs_ops
structure contained in the connection_struct.
(This used to be commit 3aad500c0fb61232ed3431ff4b743b5d18ec852f)
Diffstat (limited to 'source3/smbd/filename.c')
-rw-r--r-- | source3/smbd/filename.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 2f8e92d98e..b1550e5c73 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -239,7 +239,8 @@ static void stat_cache_add( char *full_orig_name, char *orig_translated_path) Return True if we translated (and did a scuccessful stat on) the entire name. *****************************************************************************/ -static BOOL stat_cache_lookup( char *name, char *dirpath, char **start, SMB_STRUCT_STAT *pst) +static BOOL stat_cache_lookup(connection_struct *conn, char *name, char *dirpath, + char **start, SMB_STRUCT_STAT *pst) { stat_cache_entry *scp; stat_cache_entry *longest_hit = NULL; @@ -294,7 +295,7 @@ static BOOL stat_cache_lookup( char *name, char *dirpath, char **start, SMB_STRU scp = (stat_cache_entry *)(hash_elem->value); global_stat_cache_hits++; trans_name = scp->names+scp->name_len+1; - if(dos_stat( trans_name, pst) != 0) { + if(conn->vfs_ops.stat(dos_to_unix(trans_name,False), pst) != 0) { /* Discard this entry - it doesn't exist in the filesystem. */ hash_remove(&stat_cache, hash_elem); return False; @@ -433,7 +434,7 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, pstrcpy(orig_path, name); - if(stat_cache_lookup( name, dirpath, &start, &st)) { + if(stat_cache_lookup(conn, name, dirpath, &start, &st)) { if(pst) *pst = st; return True; @@ -443,7 +444,7 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, * stat the name - if it exists then we are all done! */ - if (dos_stat(name,&st) == 0) { + if (conn->vfs_ops.stat(name,&st) == 0) { stat_cache_add(orig_path, name); DEBUG(5,("conversion finished %s -> %s\n",orig_path, name)); if(pst) @@ -509,7 +510,8 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, /* * Check if the name exists up to this point. */ - if (dos_stat(name, &st) == 0) { + + if (conn->vfs_ops.stat(name, &st) == 0) { /* * It exists. it must either be a directory or this must be * the last part of the path for it to be OK. @@ -661,7 +663,7 @@ BOOL check_name(char *name,connection_struct *conn) if (!lp_symlinks(SNUM(conn))) { SMB_STRUCT_STAT statbuf; - if ( (dos_lstat(name,&statbuf) != -1) && + if ( (conn->vfs_ops.lstat(dos_to_unix(name,False),&statbuf) != -1) && (S_ISLNK(statbuf.st_mode)) ) { DEBUG(3,("check_name: denied: file path name %s is a symlink\n",name)); |