summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2008-04-21 11:38:20 +0400
committerAlexander Bokovoy <ab@samba.org>2008-04-21 11:38:20 +0400
commitff615f232968979f57a31f43a4f668c2c4fd20df (patch)
tree8e4d6e1181001dd35e32008a3401020c013e288b /source3/modules
parent09caab9f37d6ecd4fd6fe9ce3c284730b232651a (diff)
parent0db7aba8af80a01150d1061a4192ab814e4234b7 (diff)
downloadsamba-ff615f232968979f57a31f43a4f668c2c4fd20df.tar.gz
samba-ff615f232968979f57a31f43a4f668c2c4fd20df.tar.bz2
samba-ff615f232968979f57a31f43a4f668c2c4fd20df.zip
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 2c3ffc1c53550c8e6feeca8fc0270ef9ac1ec70a)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_audit.c8
-rw-r--r--source3/modules/vfs_cacheprime.c2
-rw-r--r--source3/modules/vfs_commit.c5
-rw-r--r--source3/modules/vfs_default.c5
-rw-r--r--source3/modules/vfs_extd_audit.c10
-rw-r--r--source3/modules/vfs_full_audit.c6
-rw-r--r--source3/modules/vfs_streams_xattr.c2
-rw-r--r--source3/modules/vfs_syncops.c6
8 files changed, 21 insertions, 23 deletions
diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
index cfb4ddf590..4000580c42 100644
--- a/source3/modules/vfs_audit.c
+++ b/source3/modules/vfs_audit.c
@@ -34,7 +34,7 @@ static SMB_STRUCT_DIR *audit_opendir(vfs_handle_struct *handle, const char *fnam
static int audit_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode);
static int audit_rmdir(vfs_handle_struct *handle, const char *path);
static int audit_open(vfs_handle_struct *handle, const char *fname, files_struct *fsp, int flags, mode_t mode);
-static int audit_close(vfs_handle_struct *handle, files_struct *fsp, int fd);
+static int audit_close(vfs_handle_struct *handle, files_struct *fsp);
static int audit_rename(vfs_handle_struct *handle, const char *oldname, const char *newname);
static int audit_unlink(vfs_handle_struct *handle, const char *path);
static int audit_chmod(vfs_handle_struct *handle, const char *path, mode_t mode);
@@ -202,14 +202,14 @@ static int audit_open(vfs_handle_struct *handle, const char *fname, files_struct
return result;
}
-static int audit_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
+static int audit_close(vfs_handle_struct *handle, files_struct *fsp)
{
int result;
- result = SMB_VFS_NEXT_CLOSE(handle, fsp, fd);
+ result = SMB_VFS_NEXT_CLOSE(handle, fsp);
syslog(audit_syslog_priority(handle), "close fd %d %s%s\n",
- fd,
+ fsp->fh->fd,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
diff --git a/source3/modules/vfs_cacheprime.c b/source3/modules/vfs_cacheprime.c
index be934f6bd6..fed051ca8d 100644
--- a/source3/modules/vfs_cacheprime.c
+++ b/source3/modules/vfs_cacheprime.c
@@ -54,7 +54,7 @@ static bool prime_cache(
SMB_OFF_T * last;
ssize_t nread;
- last = VFS_ADD_FSP_EXTENSION(handle, fsp, SMB_OFF_T);
+ last = (SMB_OFF_T *)VFS_ADD_FSP_EXTENSION(handle, fsp, SMB_OFF_T);
if (!last) {
return False;
}
diff --git a/source3/modules/vfs_commit.c b/source3/modules/vfs_commit.c
index ac391cf007..1cef6d0243 100644
--- a/source3/modules/vfs_commit.c
+++ b/source3/modules/vfs_commit.c
@@ -265,12 +265,11 @@ static ssize_t commit_pwrite(
static int commit_close(
vfs_handle_struct * handle,
- files_struct * fsp,
- int fd)
+ files_struct * fsp)
{
/* Commit errors not checked, close() will find them again */
commit_all(handle, fsp);
- return SMB_VFS_NEXT_CLOSE(handle, fsp, fd);
+ return SMB_VFS_NEXT_CLOSE(handle, fsp);
}
static int commit_ftruncate(
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 31ebb6352a..de801a2041 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -208,13 +208,12 @@ static int vfswrap_open(vfs_handle_struct *handle, const char *fname,
return result;
}
-static int vfswrap_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
+static int vfswrap_close(vfs_handle_struct *handle, files_struct *fsp)
{
int result;
START_PROFILE(syscall_close);
-
- result = close(fd);
+ result = fd_close_posix(fsp);
END_PROFILE(syscall_close);
return result;
}
diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c
index 926ec36259..7516cba1d3 100644
--- a/source3/modules/vfs_extd_audit.c
+++ b/source3/modules/vfs_extd_audit.c
@@ -37,7 +37,7 @@ static SMB_STRUCT_DIR *audit_opendir(vfs_handle_struct *handle, const char *fnam
static int audit_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode);
static int audit_rmdir(vfs_handle_struct *handle, const char *path);
static int audit_open(vfs_handle_struct *handle, const char *fname, files_struct *fsp, int flags, mode_t mode);
-static int audit_close(vfs_handle_struct *handle, files_struct *fsp, int fd);
+static int audit_close(vfs_handle_struct *handle, files_struct *fsp);
static int audit_rename(vfs_handle_struct *handle, const char *oldname, const char *newname);
static int audit_unlink(vfs_handle_struct *handle, const char *path);
static int audit_chmod(vfs_handle_struct *handle, const char *path, mode_t mode);
@@ -224,18 +224,18 @@ static int audit_open(vfs_handle_struct *handle, const char *fname, files_struct
return result;
}
-static int audit_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
+static int audit_close(vfs_handle_struct *handle, files_struct *fsp)
{
int result;
- result = SMB_VFS_NEXT_CLOSE(handle, fsp, fd);
+ result = SMB_VFS_NEXT_CLOSE(handle, fsp);
syslog(audit_syslog_priority(handle), "close fd %d %s%s\n",
- fd,
+ fsp->fh->fd,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
DEBUG(2, ("vfs_extd_audit: close fd %d %s %s\n",
- fd,
+ fsp->fh->fd,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : ""));
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 19218cc47d..2f8098de9b 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -111,7 +111,7 @@ static int smb_full_audit_closedir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp);
static int smb_full_audit_open(vfs_handle_struct *handle,
const char *fname, files_struct *fsp, int flags, mode_t mode);
-static int smb_full_audit_close(vfs_handle_struct *handle, files_struct *fsp, int fd);
+static int smb_full_audit_close(vfs_handle_struct *handle, files_struct *fsp);
static ssize_t smb_full_audit_read(vfs_handle_struct *handle, files_struct *fsp,
void *data, size_t n);
static ssize_t smb_full_audit_pread(vfs_handle_struct *handle, files_struct *fsp,
@@ -1083,11 +1083,11 @@ static int smb_full_audit_open(vfs_handle_struct *handle,
return result;
}
-static int smb_full_audit_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
+static int smb_full_audit_close(vfs_handle_struct *handle, files_struct *fsp)
{
int result;
- result = SMB_VFS_NEXT_CLOSE(handle, fsp, fd);
+ result = SMB_VFS_NEXT_CLOSE(handle, fsp);
do_log(SMB_VFS_OP_CLOSE, (result >= 0), handle, "%s", fsp->fsp_name);
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index 766e7d10ab..b74c4f7902 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -345,7 +345,7 @@ static int streams_xattr_open(vfs_handle_struct *handle, const char *fname,
* BUGBUGBUG -- we would need to call fd_close_posix here, but
* we don't have a full fsp yet
*/
- SMB_VFS_CLOSE(fsp, hostfd);
+ SMB_VFS_CLOSE(fsp);
}
TALLOC_FREE(frame);
diff --git a/source3/modules/vfs_syncops.c b/source3/modules/vfs_syncops.c
index 3aa89b40a6..d3f7868400 100644
--- a/source3/modules/vfs_syncops.c
+++ b/source3/modules/vfs_syncops.c
@@ -165,14 +165,14 @@ static int syncops_rmdir(vfs_handle_struct *handle, const char *fname)
}
/* close needs to be handled specially */
-static int syncops_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
+static int syncops_close(vfs_handle_struct *handle, files_struct *fsp)
{
if (fsp->can_write && sync_onclose) {
/* ideally we'd only do this if we have written some
data, but there is no flag for that in fsp yet. */
- fsync(fd);
+ fsync(fsp->fh->fd);
}
- return SMB_VFS_NEXT_CLOSE(handle, fsp, fd);
+ return SMB_VFS_NEXT_CLOSE(handle, fsp);
}