diff options
author | Volker Lendecke <vl@samba.org> | 2012-10-19 07:15:31 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2012-10-19 20:39:56 +0200 |
commit | 9a2db48e7ebe808019d1bd2bfc2bd3c77204d4b2 (patch) | |
tree | f5780e11a5555a6fbffeb75e4137b662ba40508d /source3/rpc_server | |
parent | 7d05ff77264cf48d1ee82ca19c8c7e6951e64cf5 (diff) | |
download | samba-9a2db48e7ebe808019d1bd2bfc2bd3c77204d4b2.tar.gz samba-9a2db48e7ebe808019d1bd2bfc2bd3c77204d4b2.tar.bz2 samba-9a2db48e7ebe808019d1bd2bfc2bd3c77204d4b2.zip |
s3: Remove some calls to procid_self
The goal is to have procid_self handling completely in the messaging_context.
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Oct 19 20:39:56 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/epmd.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/lsasd.c | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/source3/rpc_server/epmd.c b/source3/rpc_server/epmd.c index f30372edad..0e7b430213 100644 --- a/source3/rpc_server/epmd.c +++ b/source3/rpc_server/epmd.c @@ -173,7 +173,7 @@ void start_epmd(struct tevent_context *ev_ctx, epmd_setup_sig_term_handler(ev_ctx); epmd_setup_sig_hup_handler(ev_ctx, msg_ctx); - ok = serverid_register(procid_self(), + ok = serverid_register(messaging_server_id(msg_ctx), FLAG_MSG_GENERAL | FLAG_MSG_PRINT_GENERAL); if (!ok) { diff --git a/source3/rpc_server/lsasd.c b/source3/rpc_server/lsasd.c index fd6c248294..a1ac49a47a 100644 --- a/source3/rpc_server/lsasd.c +++ b/source3/rpc_server/lsasd.c @@ -261,7 +261,8 @@ static bool lsasd_child_init(struct tevent_context *ev_ctx, return false; } - if (!serverid_register(procid_self(), FLAG_MSG_GENERAL)) { + if (!serverid_register(messaging_server_id(msg_ctx), + FLAG_MSG_GENERAL)) { return false; } @@ -878,9 +879,6 @@ void start_lsasd(struct tevent_context *ev_ctx, return; } - /* save the parent process id so the children can use it later */ - parent_id = procid_self(); - status = reinit_after_fork(msg_ctx, ev_ctx, true); @@ -889,6 +887,9 @@ void start_lsasd(struct tevent_context *ev_ctx, smb_panic("reinit_after_fork() failed"); } + /* save the parent process id so the children can use it later */ + parent_id = messaging_server_id(msg_ctx); + lsasd_reopen_logs(0); pfh_daemon_config(DAEMON_NAME, &pf_lsasd_cfg, @@ -920,7 +921,8 @@ void start_lsasd(struct tevent_context *ev_ctx, exit(1); } - if (!serverid_register(procid_self(), FLAG_MSG_GENERAL)) { + if (!serverid_register(messaging_server_id(msg_ctx), + FLAG_MSG_GENERAL)) { exit(1); } |