summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-07-30 21:18:57 +0000
committerJeremy Allison <jra@samba.org>1998-07-30 21:18:57 +0000
commit7284bb5ca049a682097bb25afcf25d40f1ac5479 (patch)
tree542affec24b496d6114f465bc65abb73823e367e /source3/smbd/trans2.c
parent7d5d83ececdc43f0523b7b231537e230d9686034 (diff)
downloadsamba-7284bb5ca049a682097bb25afcf25d40f1ac5479.tar.gz
samba-7284bb5ca049a682097bb25afcf25d40f1ac5479.tar.bz2
samba-7284bb5ca049a682097bb25afcf25d40f1ac5479.zip
Makefile.in: Moved UBIQX stuff into UTILOBJ.
loadparm.c: Added "ole locking compatibility" option (default "true"). locking.c: Changes to implement union in files_struct. locking_shm.c: Changes to implement union in files_struct. nttrans.c: Made opening a directory explicit (we have to). Added create directory code for nttrans. reply.c: Changes to implement union in files_struct. server.c: Changes to implement union in files_struct. Added create directory code. trans2.c: Changes to implement union in files_struct. smb.h: Changes to implement union in files_struct. util.c: Changed linked list code to UNIQX linked list. This will make the other lists I need to implement for ChangeNotify and blocking locks easier. Jeremy. (This used to be commit 3a5eea850bb256b39cff8ace1e4fb4e0c1f5472b)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 2fcab32afb..08f6803005 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -207,6 +207,7 @@ static int call_trans2open(char *inbuf, char *outbuf, int bufsize, int cnum,
struct stat sbuf;
int smb_action = 0;
BOOL bad_path = False;
+ files_struct *fsp;
StrnCpy(fname,pname,namelen);
@@ -221,6 +222,8 @@ static int call_trans2open(char *inbuf, char *outbuf, int bufsize, int cnum,
if (fnum < 0)
return(ERROR(ERRSRV,ERRnofids));
+ fsp = &Files[fnum];
+
if (!check_name(fname,cnum))
{
if((errno == ENOENT) && bad_path)
@@ -228,28 +231,27 @@ static int call_trans2open(char *inbuf, char *outbuf, int bufsize, int cnum,
unix_ERR_class = ERRDOS;
unix_ERR_code = ERRbadpath;
}
- Files[fnum].reserved = False;
+ fsp->reserved = False;
return(UNIXERROR(ERRDOS,ERRnoaccess));
}
unixmode = unix_mode(cnum,open_attr | aARCH);
-
open_file_shared(fnum,cnum,fname,open_mode,open_ofun,unixmode,
oplock_request, &rmode,&smb_action);
- if (!Files[fnum].open)
+ if (!fsp->open)
{
if((errno == ENOENT) && bad_path)
{
unix_ERR_class = ERRDOS;
unix_ERR_code = ERRbadpath;
}
- Files[fnum].reserved = False;
+ fsp->reserved = False;
return(UNIXERROR(ERRDOS,ERRnoaccess));
}
- if (fstat(Files[fnum].fd_ptr->fd,&sbuf) != 0) {
+ if (fstat(fsp->f_u.fd_ptr->fd,&sbuf) != 0) {
close_file(fnum,False);
return(ERROR(ERRDOS,ERRnoaccess));
}
@@ -1187,11 +1189,11 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length,
CHECK_ERROR(fnum);
fname = Files[fnum].name;
- if (fstat(Files[fnum].fd_ptr->fd,&sbuf) != 0) {
+ if (fstat(Files[fnum].f_u.fd_ptr->fd,&sbuf) != 0) {
DEBUG(3,("fstat of fnum %d failed (%s)\n",fnum, strerror(errno)));
return(UNIXERROR(ERRDOS,ERRbadfid));
}
- pos = lseek(Files[fnum].fd_ptr->fd,0,SEEK_CUR);
+ pos = lseek(Files[fnum].f_u.fd_ptr->fd,0,SEEK_CUR);
} else {
/* qpathinfo */
info_level = SVAL(params,0);
@@ -1411,7 +1413,7 @@ static int call_trans2setfilepathinfo(char *inbuf, char *outbuf, int length,
CHECK_ERROR(fnum);
fname = Files[fnum].name;
- fd = Files[fnum].fd_ptr->fd;
+ fd = Files[fnum].f_u.fd_ptr->fd;
if(fstat(fd,&st)!=0) {
DEBUG(3,("fstat of %s failed (%s)\n", fname, strerror(errno)));
@@ -1788,7 +1790,7 @@ int reply_trans2(char *inbuf,char *outbuf,int length,int bufsize)
DEBUG(2,("%s: reply_trans2: queueing message trans2open due to being in oplock break state.\n",
timestring() ));
- push_smb_message( inbuf, length);
+ push_oplock_pending_smb_message( inbuf, length);
return -1;
}