summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-08-07 11:48:03 +0200
committerStefan Metzmacher <metze@samba.org>2009-08-07 14:18:15 +0200
commit70afd419a602ff4067bf3c25cf25a5d4084b4164 (patch)
tree56cee4190c5662d3020a0c57a504baef72010eec
parentc54e6b19e395724eb84f6e7157073e8772bc8594 (diff)
downloadsamba-70afd419a602ff4067bf3c25cf25a5d4084b4164.tar.gz
samba-70afd419a602ff4067bf3c25cf25a5d4084b4164.tar.bz2
samba-70afd419a602ff4067bf3c25cf25a5d4084b4164.zip
s3:smbd: conn_free_internal() can be static now
metze
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/printing/nt_printing.c6
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c8
-rw-r--r--source3/smbd/conn.c4
-rw-r--r--source3/smbd/msdfs.c22
-rw-r--r--source3/smbd/posix_acls.c8
6 files changed, 24 insertions, 25 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 667e847485..e4523a1625 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6144,7 +6144,6 @@ connection_struct *conn_new(struct smbd_server_connection *sconn);
bool conn_close_all(struct smbd_server_connection *sconn);
bool conn_idle_all(struct smbd_server_connection *sconn, time_t t);
void conn_clear_vuid_caches(struct smbd_server_connection *sconn, uint16 vuid);
-void conn_free_internal(connection_struct *conn);
void conn_free(connection_struct *conn);
void msg_force_tdis(struct messaging_context *msg,
void *private_data,
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 26b8d9d81d..b2815c221d 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1590,7 +1590,7 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
}
if (conn != NULL) {
vfs_ChDir(conn, oldcwd);
- conn_free_internal(conn);
+ conn_free(conn);
}
if (cversion != -1) {
*perr = WERR_OK;
@@ -2072,7 +2072,7 @@ WERROR move_driver_to_download_area(struct pipes_struct *p,
if (conn != NULL) {
vfs_ChDir(conn, oldcwd);
- conn_free_internal(conn);
+ conn_free(conn);
}
if (W_ERROR_EQUAL(*perr, WERR_OK)) {
@@ -5267,7 +5267,7 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
done:
if (conn != NULL) {
vfs_ChDir(conn, oldcwd);
- conn_free_internal(conn);
+ conn_free(conn);
}
return ret;
}
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 15b2290805..01ffcd837a 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -2133,7 +2133,7 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
close_file(NULL, fsp, NORMAL_CLOSE);
vfs_ChDir(conn, oldcwd);
- conn_free_internal(conn);
+ conn_free(conn);
werr = WERR_OK;
goto done;
@@ -2148,7 +2148,7 @@ error_exit:
}
if (conn) {
- conn_free_internal(conn);
+ conn_free(conn);
}
done:
@@ -2267,7 +2267,7 @@ WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p,
close_file(NULL, fsp, NORMAL_CLOSE);
vfs_ChDir(conn, oldcwd);
- conn_free_internal(conn);
+ conn_free(conn);
werr = WERR_OK;
goto done;
@@ -2282,7 +2282,7 @@ error_exit:
}
if (conn) {
- conn_free_internal(conn);
+ conn_free(conn);
}
done:
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index 9d1bbee8c9..da67db978b 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -257,9 +257,9 @@ void conn_clear_vuid_caches(struct smbd_server_connection *sconn,uint16_t vuid)
Free a conn structure - internal part.
****************************************************************************/
-void conn_free_internal(connection_struct *conn)
+static void conn_free_internal(connection_struct *conn)
{
- vfs_handle_struct *handle = NULL, *thandle = NULL;
+ vfs_handle_struct *handle = NULL, *thandle = NULL;
struct trans_state *state = NULL;
/* Free vfs_connection_struct */
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 22fb8c3ad6..767c8fe297 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -268,7 +268,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
if (!smbd_vfs_init(conn)) {
NTSTATUS status = map_nt_error_from_unix(errno);
DEBUG(0,("create_conn_struct: smbd_vfs_init failed.\n"));
- conn_free_internal(conn);
+ conn_free(conn);
return status;
}
@@ -284,7 +284,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
if (oldcwd == NULL) {
NTSTATUS status = map_nt_error_from_unix(errno);
DEBUG(3, ("vfs_GetWd failed: %s\n", strerror(errno)));
- conn_free_internal(conn);
+ conn_free(conn);
return status;
}
@@ -293,7 +293,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
DEBUG(3,("create_conn_struct: Can't ChDir to new conn path %s. "
"Error was %s\n",
conn->connectpath, strerror(errno) ));
- conn_free_internal(conn);
+ conn_free(conn);
return status;
}
@@ -939,7 +939,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
DEBUG(3,("get_referred_path: No valid referrals for path %s\n",
dfs_path));
vfs_ChDir(conn, oldpath);
- conn_free_internal(conn);
+ conn_free(conn);
TALLOC_FREE(pdp);
return status;
}
@@ -951,13 +951,13 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
DEBUG(3,("get_referred_path: failed to parse symlink "
"target %s\n", targetpath ));
vfs_ChDir(conn, oldpath);
- conn_free_internal(conn);
+ conn_free(conn);
TALLOC_FREE(pdp);
return NT_STATUS_NOT_FOUND;
}
vfs_ChDir(conn, oldpath);
- conn_free_internal(conn);
+ conn_free(conn);
TALLOC_FREE(pdp);
return NT_STATUS_OK;
}
@@ -1374,7 +1374,7 @@ static bool junction_to_local_path(const struct junction_map *jucn,
jucn->volume_name);
if (!*pp_path_out) {
vfs_ChDir(*conn_out, *oldpath);
- conn_free_internal(*conn_out);
+ conn_free(*conn_out);
return False;
}
return True;
@@ -1462,7 +1462,7 @@ bool create_msdfs_link(const struct junction_map *jucn)
out:
vfs_ChDir(conn, cwd);
- conn_free_internal(conn);
+ conn_free(conn);
return ret;
}
@@ -1493,7 +1493,7 @@ bool remove_msdfs_link(const struct junction_map *jucn)
TALLOC_FREE(smb_fname);
vfs_ChDir(conn, cwd);
- conn_free_internal(conn);
+ conn_free(conn);
return ret;
}
@@ -1554,7 +1554,7 @@ static int count_dfs_links(TALLOC_CTX *ctx, int snum)
out:
vfs_ChDir(conn, cwd);
- conn_free_internal(conn);
+ conn_free(conn);
return cnt;
}
@@ -1680,7 +1680,7 @@ out:
}
vfs_ChDir(conn, cwd);
- conn_free_internal(conn);
+ conn_free(conn);
return cnt;
}
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 8c5393871f..b61421dc8f 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -4616,7 +4616,7 @@ SEC_DESC *get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname)
if (!smbd_vfs_init(conn)) {
DEBUG(0,("get_nt_acl_no_snum: Unable to create a fake connection struct!\n"));
- conn_free_internal( conn );
+ conn_free(conn);
return NULL;
}
@@ -4631,21 +4631,21 @@ SEC_DESC *get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname)
status = create_synthetic_smb_fname(talloc_tos(), fname, NULL, NULL,
&finfo.fsp_name);
if (!NT_STATUS_IS_OK(status)) {
- conn_free_internal( conn );
+ conn_free(conn);
return NULL;
}
if (!NT_STATUS_IS_OK(SMB_VFS_FGET_NT_ACL( &finfo, DACL_SECURITY_INFORMATION, &psd))) {
DEBUG(0,("get_nt_acl_no_snum: get_nt_acl returned zero.\n"));
TALLOC_FREE(finfo.fsp_name);
- conn_free_internal( conn );
+ conn_free(conn);
return NULL;
}
ret_sd = dup_sec_desc( ctx, psd );
TALLOC_FREE(finfo.fsp_name);
- conn_free_internal( conn );
+ conn_free(conn);
return ret_sd;
}