mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3: Remove talloc_autofree_context() from files.c
This commit is contained in:
parent
eadc4b5b78
commit
d26d79b640
@ -4753,7 +4753,7 @@ NTSTATUS file_new(struct smb_request *req, connection_struct *conn,
|
||||
void file_close_conn(connection_struct *conn);
|
||||
void file_close_pid(struct smbd_server_connection *sconn, uint16 smbpid,
|
||||
int vuid);
|
||||
void file_init(void);
|
||||
bool file_init(struct smbd_server_connection *sconn);
|
||||
void file_close_user(struct smbd_server_connection *sconn, int vuid);
|
||||
struct files_struct *files_forall(
|
||||
struct smbd_server_connection *sconn,
|
||||
|
@ -172,7 +172,7 @@ void file_close_pid(struct smbd_server_connection *sconn, uint16 smbpid,
|
||||
Initialise file structures.
|
||||
****************************************************************************/
|
||||
|
||||
void file_init(void)
|
||||
bool file_init(struct smbd_server_connection *sconn)
|
||||
{
|
||||
int request_max_open_files = lp_max_open_files();
|
||||
int real_lim;
|
||||
@ -197,12 +197,12 @@ void file_init(void)
|
||||
|
||||
SMB_ASSERT(real_max_open_files > 100);
|
||||
|
||||
file_bmap = bitmap_talloc(talloc_autofree_context(),
|
||||
real_max_open_files);
|
||||
file_bmap = bitmap_talloc(sconn, real_max_open_files);
|
||||
|
||||
if (!file_bmap) {
|
||||
exit_server("out of memory in file_init");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -794,8 +794,6 @@ static bool init_structs(void )
|
||||
if (!init_names())
|
||||
return False;
|
||||
|
||||
file_init();
|
||||
|
||||
if (!secrets_init())
|
||||
return False;
|
||||
|
||||
@ -1168,6 +1166,11 @@ extern void build_options(bool screen);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!file_init(smbd_server_conn)) {
|
||||
DEBUG(0, ("ERROR: file_init failed\n"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize spoolss with an init function to convert printers first.
|
||||
* static_init_rpc will try to initialize the spoolss server too but you
|
||||
|
Loading…
Reference in New Issue
Block a user