1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:smbd: conn_free_internal() can be static now

metze
This commit is contained in:
Stefan Metzmacher 2009-08-07 11:48:03 +02:00
parent c54e6b19e3
commit 70afd419a6
6 changed files with 24 additions and 25 deletions

View File

@ -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,

View File

@ -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;
}

View File

@ -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:

View File

@ -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 */

View File

@ -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;
}

View File

@ -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;
}