summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-07 13:21:26 +0100
committerMichael Adam <obnox@samba.org>2008-01-07 15:59:01 +0100
commit87a684f7fcfa8d9fabc42e33981299d0b33eeeb7 (patch)
tree9c348c30ed24be60e1aa96e725af3f06bf82ad5a /source3/smbd
parent8dcce0d236b2102ca94fbcb7aa7126fe6733f2e7 (diff)
downloadsamba-87a684f7fcfa8d9fabc42e33981299d0b33eeeb7.tar.gz
samba-87a684f7fcfa8d9fabc42e33981299d0b33eeeb7.tar.bz2
samba-87a684f7fcfa8d9fabc42e33981299d0b33eeeb7.zip
Remove redundant parameter fd from SMB_VFS_FSTAT().
Michael (This used to be commit 0b86c420be94d295f6917a220b5d699f65b46711)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/fileio.c4
-rw-r--r--source3/smbd/open.c6
-rw-r--r--source3/smbd/posix_acls.c6
-rw-r--r--source3/smbd/reply.c8
-rw-r--r--source3/smbd/trans2.c4
-rw-r--r--source3/smbd/vfs.c4
6 files changed, 16 insertions, 16 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 5a4263739b..1258b73cad 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -229,7 +229,7 @@ ssize_t write_file(struct smb_request *req,
SMB_STRUCT_STAT st;
fsp->modified = True;
- if (SMB_VFS_FSTAT(fsp,fsp->fh->fd,&st) == 0) {
+ if (SMB_VFS_FSTAT(fsp, &st) == 0) {
int dosmode = dos_mode(fsp->conn,fsp->fsp_name,&st);
if ((lp_store_dos_attributes(SNUM(fsp->conn)) ||
MAP_ARCHIVE(fsp->conn)) &&
@@ -896,6 +896,6 @@ int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst)
if (fsp->fh->fd == -1) {
return SMB_VFS_STAT(fsp->conn, fsp->fsp_name, pst);
} else {
- return SMB_VFS_FSTAT(fsp,fsp->fh->fd, pst);
+ return SMB_VFS_FSTAT(fsp, pst);
}
}
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 23d0223446..d870374835 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -342,7 +342,7 @@ static NTSTATUS open_file(files_struct *fsp,
if (fsp->fh->fd == -1) {
ret = SMB_VFS_STAT(conn, path, psbuf);
} else {
- ret = SMB_VFS_FSTAT(fsp,fsp->fh->fd,psbuf);
+ ret = SMB_VFS_FSTAT(fsp, psbuf);
/* If we have an fd, this stat should succeed. */
if (ret == -1) {
DEBUG(0,("Error doing fstat on open file %s "
@@ -1790,7 +1790,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
* struct..
*/
if ((SMB_VFS_FTRUNCATE(fsp,fsp->fh->fd,0) == -1) ||
- (SMB_VFS_FSTAT(fsp,fsp->fh->fd,psbuf)==-1)) {
+ (SMB_VFS_FSTAT(fsp, psbuf)==-1)) {
status = map_nt_error_from_unix(errno);
TALLOC_FREE(lck);
fd_close(fsp);
@@ -2675,7 +2675,7 @@ NTSTATUS create_file_unixpath(connection_struct *conn,
*psbuf = sbuf;
}
else {
- SMB_VFS_FSTAT(fsp, fsp->fh->fd, psbuf);
+ SMB_VFS_FSTAT(fsp, psbuf);
}
}
return NT_STATUS_OK;
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 2810b5e587..f11aa69e08 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3080,7 +3080,7 @@ NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
}
/* Get the stat struct for the owner info. */
- if(SMB_VFS_FSTAT(fsp,fsp->fh->fd,&sbuf) != 0) {
+ if(SMB_VFS_FSTAT(fsp, &sbuf) != 0) {
return map_nt_error_from_unix(errno);
}
@@ -3429,7 +3429,7 @@ NTSTATUS set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
if(SMB_VFS_STAT(fsp->conn,fsp->fsp_name, &sbuf) != 0)
return map_nt_error_from_unix(errno);
} else {
- if(SMB_VFS_FSTAT(fsp,fsp->fh->fd,&sbuf) != 0)
+ if(SMB_VFS_FSTAT(fsp, &sbuf) != 0)
return map_nt_error_from_unix(errno);
}
@@ -3479,7 +3479,7 @@ NTSTATUS set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
if(fsp->fh->fd == -1)
ret = SMB_VFS_STAT(fsp->conn, fsp->fsp_name, &sbuf);
else
- ret = SMB_VFS_FSTAT(fsp,fsp->fh->fd,&sbuf);
+ ret = SMB_VFS_FSTAT(fsp, &sbuf);
if(ret != 0)
return map_nt_error_from_unix(errno);
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 910e3a27a6..27f380a627 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2835,7 +2835,7 @@ void reply_readbraw(struct smb_request *req)
return;
}
- if (SMB_VFS_FSTAT(fsp,fsp->fh->fd,&st) == 0) {
+ if (SMB_VFS_FSTAT(fsp, &st) == 0) {
size = st.st_size;
}
@@ -3096,7 +3096,7 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
SMB_STRUCT_STAT sbuf;
ssize_t nread = -1;
- if(SMB_VFS_FSTAT(fsp,fsp->fh->fd, &sbuf) == -1) {
+ if(SMB_VFS_FSTAT(fsp, &sbuf) == -1) {
reply_unixerror(req, ERRDOS, ERRnoaccess);
return;
}
@@ -4096,7 +4096,7 @@ void reply_lseek(struct smb_request *req)
SMB_OFF_T current_pos = startpos;
SMB_STRUCT_STAT sbuf;
- if(SMB_VFS_FSTAT(fsp,fsp->fh->fd, &sbuf) == -1) {
+ if(SMB_VFS_FSTAT(fsp, &sbuf) == -1) {
reply_unixerror(req, ERRDOS,
ERRnoaccess);
END_PROFILE(SMBlseek);
@@ -5485,7 +5485,7 @@ NTSTATUS rename_internals_fsp(connection_struct *conn,
/* Ensure we have a valid stat struct for the source. */
if (fsp->fh->fd != -1) {
- if (SMB_VFS_FSTAT(fsp,fsp->fh->fd,&sbuf) == -1) {
+ if (SMB_VFS_FSTAT(fsp, &sbuf) == -1) {
return map_nt_error_from_unix(errno);
}
} else {
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index c3b5f9fa2f..ab6706aec7 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -3663,7 +3663,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
return;
}
- if (SMB_VFS_FSTAT(fsp,fsp->fh->fd,&sbuf) != 0) {
+ if (SMB_VFS_FSTAT(fsp, &sbuf) != 0) {
DEBUG(3,("fstat of fnum %d failed (%s)\n", fsp->fnum, strerror(errno)));
reply_unixerror(req, ERRDOS, ERRbadfid);
return;
@@ -6346,7 +6346,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
return;
}
- if (SMB_VFS_FSTAT(fsp, fsp->fh->fd, &sbuf) != 0) {
+ if (SMB_VFS_FSTAT(fsp, &sbuf) != 0) {
DEBUG(3,("call_trans2setfilepathinfo: fstat of fnum %d failed (%s)\n",fsp->fnum, strerror(errno)));
reply_unixerror(req, ERRDOS, ERRbadfid);
return;
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index aa914797d1..c7edac7b7a 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -525,7 +525,7 @@ int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len)
return -1;
}
- ret = SMB_VFS_FSTAT(fsp,fsp->fh->fd,&st);
+ ret = SMB_VFS_FSTAT(fsp, &st);
if (ret == -1)
return ret;
@@ -612,7 +612,7 @@ int vfs_fill_sparse(files_struct *fsp, SMB_OFF_T len)
ssize_t pwrite_ret;
release_level_2_oplocks_on_change(fsp);
- ret = SMB_VFS_FSTAT(fsp,fsp->fh->fd,&st);
+ ret = SMB_VFS_FSTAT(fsp, &st);
if (ret == -1) {
return ret;
}