[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-844-gcebaa48
Michael Adam
obnox at samba.org
Sat Dec 22 01:28:34 GMT 2007
The branch, v3-2-test has been updated
via cebaa483e62910ac3f87cd135b2aff18dc880416 (commit)
via 3611cc8561cf837adea83fc7c16ca7535f188466 (commit)
via f3365b74ac016eaee1e82eef769dd618af5df201 (commit)
from a1482b09150f4d292965c77bc73d47fb14f5eb85 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit cebaa483e62910ac3f87cd135b2aff18dc880416
Author: Michael Adam <obnox at samba.org>
Date: Sat Dec 22 02:13:02 2007 +0100
Remove redundant connection_struct from check_magic() parameter list.
Michael
commit 3611cc8561cf837adea83fc7c16ca7535f188466
Author: Michael Adam <obnox at samba.org>
Date: Sat Dec 22 02:01:26 2007 +0100
Remove redundant connection_struct from fd_close() parameter list.
Michael
commit f3365b74ac016eaee1e82eef769dd618af5df201
Author: Michael Adam <obnox at samba.org>
Date: Sat Dec 22 01:49:29 2007 +0100
Remove redundant connection_struct from fd_close_posix() parameter list.
Michael
-----------------------------------------------------------------------
Summary of changes:
source/locking/posix.c | 4 ++--
source/smbd/close.c | 7 ++++---
source/smbd/open.c | 24 ++++++++++++------------
3 files changed, 18 insertions(+), 17 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/locking/posix.c b/source/locking/posix.c
index aef5c17..207ee57 100644
--- a/source/locking/posix.c
+++ b/source/locking/posix.c
@@ -607,14 +607,14 @@ static size_t get_posix_pending_close_entries(TALLOC_CTX *mem_ctx,
to delete all locks on this fsp before this function is called.
****************************************************************************/
-NTSTATUS fd_close_posix(struct connection_struct *conn, files_struct *fsp)
+NTSTATUS fd_close_posix(struct files_struct *fsp)
{
int saved_errno = 0;
int ret;
int *fd_array = NULL;
size_t count, i;
- if (!lp_locking(fsp->conn->params) || !lp_posix_locking(conn->params)) {
+ if (!lp_locking(fsp->conn->params) || !lp_posix_locking(fsp->conn->params)) {
/*
* No locking or POSIX to worry about or we want POSIX semantics
* which will lose all locks on all fd's open on this dev/inode,
diff --git a/source/smbd/close.c b/source/smbd/close.c
index eb610f7..5d30e46 100644
--- a/source/smbd/close.c
+++ b/source/smbd/close.c
@@ -27,7 +27,7 @@ extern struct current_user current_user;
Run a file if it is a magic script.
****************************************************************************/
-static void check_magic(files_struct *fsp,connection_struct *conn)
+static void check_magic(struct files_struct *fsp)
{
int ret;
const char *magic_output = NULL;
@@ -35,6 +35,7 @@ static void check_magic(files_struct *fsp,connection_struct *conn)
int tmp_fd, outfd;
TALLOC_CTX *ctx = NULL;
const char *p;
+ struct connection_struct *conn = fsp->conn;
if (!*lp_magicscript(SNUM(conn))) {
return;
@@ -389,11 +390,11 @@ static NTSTATUS close_normal_file(files_struct *fsp, enum file_close_type close_
locking_close_file(smbd_messaging_context(), fsp);
- status = fd_close(conn, fsp);
+ status = fd_close(fsp);
/* check for magic scripts */
if (close_type == NORMAL_CLOSE) {
- check_magic(fsp,conn);
+ check_magic(fsp);
}
/*
diff --git a/source/smbd/open.c b/source/smbd/open.c
index b83d684..9428b47 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -70,7 +70,7 @@ static NTSTATUS fd_open(struct connection_struct *conn,
Close the file associated with a fsp.
****************************************************************************/
-NTSTATUS fd_close(struct connection_struct *conn, files_struct *fsp)
+NTSTATUS fd_close(files_struct *fsp)
{
if (fsp->fh->fd == -1) {
return NT_STATUS_OK; /* What we used to call a stat open. */
@@ -78,7 +78,7 @@ NTSTATUS fd_close(struct connection_struct *conn, files_struct *fsp)
if (fsp->fh->ref_count > 1) {
return NT_STATUS_OK; /* Shared handle. Only close last reference. */
}
- return fd_close_posix(conn, fsp);
+ return fd_close_posix(fsp);
}
/****************************************************************************
@@ -353,7 +353,7 @@ static NTSTATUS open_file(files_struct *fsp,
/* For a non-io open, this stat failing means file not found. JRA */
if (ret == -1) {
status = map_nt_error_from_unix(errno);
- fd_close(conn, fsp);
+ fd_close(fsp);
return status;
}
}
@@ -365,7 +365,7 @@ static NTSTATUS open_file(files_struct *fsp,
*/
if(S_ISDIR(psbuf->st_mode)) {
- fd_close(conn, fsp);
+ fd_close(fsp);
errno = EISDIR;
return NT_STATUS_FILE_IS_A_DIRECTORY;
}
@@ -1688,7 +1688,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
if (lck == NULL) {
DEBUG(0, ("open_file_ntcreate: Could not get share "
"mode lock for %s\n", fname));
- fd_close(conn, fsp);
+ fd_close(fsp);
file_free(fsp);
return NT_STATUS_SHARING_VIOLATION;
}
@@ -1699,7 +1699,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
oplock_request)) {
schedule_defer_open(lck, request_time, req);
TALLOC_FREE(lck);
- fd_close(conn, fsp);
+ fd_close(fsp);
file_free(fsp);
return NT_STATUS_SHARING_VIOLATION;
}
@@ -1718,7 +1718,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
oplock_request)) {
schedule_defer_open(lck, request_time, req);
TALLOC_FREE(lck);
- fd_close(conn, fsp);
+ fd_close(fsp);
file_free(fsp);
return NT_STATUS_SHARING_VIOLATION;
}
@@ -1727,7 +1727,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
if (!NT_STATUS_IS_OK(status)) {
struct deferred_open_record state;
- fd_close(conn, fsp);
+ fd_close(fsp);
file_free(fsp);
state.delayed_for_oplocks = False;
@@ -1768,7 +1768,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
if(ret_flock == -1 ){
TALLOC_FREE(lck);
- fd_close(conn, fsp);
+ fd_close(fsp);
file_free(fsp);
return NT_STATUS_SHARING_VIOLATION;
@@ -1793,7 +1793,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
(SMB_VFS_FSTAT(fsp,fsp->fh->fd,psbuf)==-1)) {
status = map_nt_error_from_unix(errno);
TALLOC_FREE(lck);
- fd_close(conn,fsp);
+ fd_close(fsp);
file_free(fsp);
return status;
}
@@ -1850,7 +1850,7 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
/* Remember to delete the mode we just added. */
del_share_mode(lck, fsp);
TALLOC_FREE(lck);
- fd_close(conn,fsp);
+ fd_close(fsp);
file_free(fsp);
return status;
}
@@ -1974,7 +1974,7 @@ NTSTATUS open_file_fchmod(connection_struct *conn, const char *fname,
NTSTATUS close_file_fchmod(files_struct *fsp)
{
- NTSTATUS status = fd_close(fsp->conn, fsp);
+ NTSTATUS status = fd_close(fsp);
file_free(fsp);
return status;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list