diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-01 20:11:54 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-01 20:11:54 +0000 |
commit | 18556274139cc5a00593471bd745354d98a35303 (patch) | |
tree | b10b897359416e4c67bcaff75a5f21eefe20c996 /source3/smbd/nttrans.c | |
parent | 6f53e2097d60d4b67f0859065cfa0fe01d63e28f (diff) | |
download | samba-18556274139cc5a00593471bd745354d98a35303.tar.gz samba-18556274139cc5a00593471bd745354d98a35303.tar.bz2 samba-18556274139cc5a00593471bd745354d98a35303.zip |
More abstraction of file system data types, to move to a 64
bit file interface for the NT SMB's.
Created a new define, SMB_STRUCT_STAT that currently is
defined to be struct stat - this wil change to a user
defined type containing 64 bit info when the correct
wrappers are written for 64 bit stat(), fstat() and lstat()
calls.
Also changed all sys_xxxx() calls that were previously just
wrappers to the same call prefixed by a dos_to_unix() call
into dos_xxxx() calls. This makes it explicit when a pathname
translation is being done, and when it is not.
Now, all sys_xxx() calls are meant to be wrappers to mask
OS differences, and not silently converting filenames on
the fly.
Jeremy.
(This used to be commit 28aa182dbffaa4ffd86047e608400de4b26e80eb)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r-- | source3/smbd/nttrans.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index fbcc19e77d..9e507aa4d2 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -416,7 +416,7 @@ int reply_ntcreate_and_X(connection_struct *conn, int unixmode, pnum = -1; int fmode=0,mtime=0,rmode=0; off_t file_len = 0; - struct stat sbuf; + SMB_STRUCT_STAT sbuf; int smb_action = 0; BOOL bad_path = False; files_struct *fsp=NULL; @@ -596,7 +596,7 @@ int reply_ntcreate_and_X(connection_struct *conn, } if(fsp->is_directory) { - if(sys_stat(fsp->fsp_name, &sbuf) != 0) { + if(dos_stat(fsp->fsp_name, &sbuf) != 0) { close_directory(fsp); restore_case_semantics(file_attributes); return(ERROR(ERRDOS,ERRnoaccess)); @@ -701,7 +701,7 @@ static int call_nt_transact_create(connection_struct *conn, int unixmode, pnum = -1; int fmode=0,mtime=0,rmode=0; off_t file_len = 0; - struct stat sbuf; + SMB_STRUCT_STAT sbuf; int smb_action = 0; BOOL bad_path = False; files_struct *fsp = NULL; @@ -1084,7 +1084,7 @@ void process_pending_change_notify_queue(time_t t) */ while((cnbp != NULL) && (cnbp->next_check_time <= t)) { - struct stat st; + SMB_STRUCT_STAT st; files_struct *fsp = cnbp->fsp; connection_struct *conn = cnbp->conn; uint16 vuid = (lp_security() == SEC_SHARE) ? UID_FIELD_INVALID : @@ -1121,7 +1121,7 @@ void process_pending_change_notify_queue(time_t t) continue; } - if(sys_stat(fsp->fsp_name, &st) < 0) { + if(dos_stat(fsp->fsp_name, &st) < 0) { DEBUG(0,("process_pending_change_notify_queue: Unable to stat directory %s. \ Error was %s.\n", fsp->fsp_name, strerror(errno) )); /* @@ -1171,7 +1171,7 @@ static int call_nt_transact_notify_change(connection_struct *conn, char *setup = *ppsetup; files_struct *fsp; change_notify_buf *cnbp; - struct stat st; + SMB_STRUCT_STAT st; fsp = file_fsp(setup,4); @@ -1200,7 +1200,7 @@ static int call_nt_transact_notify_change(connection_struct *conn, * Store the current timestamp on the directory we are monitoring. */ - if(sys_stat(fsp->fsp_name, &st) < 0) { + if(dos_stat(fsp->fsp_name, &st) < 0) { DEBUG(0,("call_nt_transact_notify_change: Unable to stat name = %s. \ Error was %s\n", fsp->fsp_name, strerror(errno) )); free((char *)cnbp); |