diff options
Diffstat (limited to 'source/smbd')
-rw-r--r-- | source/smbd/session.c | 2 | ||||
-rw-r--r-- | source/smbd/sesssetup.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/smbd/session.c b/source/smbd/session.c index 30ade8aedfb..cd7511430e3 100644 --- a/source/smbd/session.c +++ b/source/smbd/session.c @@ -60,7 +60,7 @@ BOOL session_claim(user_struct *vuser) struct sockaddr sa; struct in_addr *client_ip; struct sessionid sessionid; - uint32 pid = (uint32)sys_getpid(); + struct server_id pid = procid_self(); fstring keystr; char * hostname; int tdb_store_flag; /* If using utmp, we do an inital 'lock hold' store, diff --git a/source/smbd/sesssetup.c b/source/smbd/sesssetup.c index 7dbf20a189e..d6cdf777d8a 100644 --- a/source/smbd/sesssetup.c +++ b/source/smbd/sesssetup.c @@ -1180,11 +1180,11 @@ static int shutdown_other_smbds(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, struct sessionid *sessionid = (struct sessionid *)dbuf.dptr; const char *ip = (const char *)p; - if (!process_exists(pid_to_procid(sessionid->pid))) { + if (!process_exists(sessionid->pid)) { return 0; } - if (sessionid->pid == sys_getpid()) { + if (procid_is_me(&sessionid->pid)) { return 0; } @@ -1192,7 +1192,7 @@ static int shutdown_other_smbds(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, return 0; } - message_send_pid(pid_to_procid(sessionid->pid), MSG_SHUTDOWN, + message_send_pid(sessionid->pid, MSG_SHUTDOWN, NULL, 0, True); return 0; } |