s3-messaging Do not ever send a kill to -1
authorAndrew Bartlett <abartlet@samba.org>
Tue, 27 Sep 2011 16:54:37 +0000 (09:54 -0700)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 27 Sep 2011 22:23:44 +0000 (00:23 +0200)
This from a report by Olaf Flebbe <o.flebbe@science-computing.de>

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Sep 28 00:23:44 CEST 2011 on sn-devel-104

source3/lib/messages_local.c

index 346cd30b5b8f5cdb557f183af7f03542fe586851..67234d4d76dca6bfd6c4881c9cc058fe3d518caa 100644 (file)
@@ -282,6 +282,9 @@ static NTSTATUS message_notify(struct server_id procid)
         */
 
        SMB_ASSERT(pid > 0);
+       if (pid <= 0) {
+               return NT_STATUS_INVALID_HANDLE;
+       }
 
        if (euid != 0) {
                /* If we're not root become so to send the message. */