1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

s3-smbd: Cleanup the order of the init functions.

Signed-off-by: Simo Sorce <idra@samba.org>
This commit is contained in:
Andreas Schneider 2010-08-09 14:49:08 +02:00 committed by Simo Sorce
parent 120bd9775a
commit e18039062c

View File

@ -876,8 +876,6 @@ extern void build_options(bool screen);
setluid(0);
#endif
sec_init();
set_remote_machine_name("smbd", False);
if (interactive && (DEBUGLEVEL >= 9)) {
@ -893,9 +891,11 @@ extern void build_options(bool screen);
client problems at a later date. (tridge) */
generate_random_buffer(NULL, 0);
/* get initial effective uid and gid */
sec_init();
/* make absolutely sure we run as root - to handle cases where people
are crazy enough to have it setuid */
gain_root_privilege();
gain_root_group_privilege();
@ -930,8 +930,6 @@ extern void build_options(bool screen);
so set our umask to 0 */
umask(0);
init_sec_ctx();
reopen_logs();
DEBUG(0,("smbd version %s started.\n", samba_version_string()));
@ -953,6 +951,9 @@ extern void build_options(bool screen);
exit(1);
}
/* Init the security context and global current_user */
init_sec_ctx();
if (smbd_messaging_context() == NULL)
exit(1);