changeset 1372:a573d64968e9

mod_auth_dovecot: Add a dependency to util.pposix to send the _real_ pid
author benjamin.podszun@gmail.com
date Fri, 28 Mar 2014 19:08:00 +0100
parents 945784087d27
children 985bfc6e8cad
files mod_auth_dovecot/auth_dovecot/sasl_dovecot.lib.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_auth_dovecot/auth_dovecot/sasl_dovecot.lib.lua	Mon Mar 24 13:04:44 2014 +0100
+++ b/mod_auth_dovecot/auth_dovecot/sasl_dovecot.lib.lua	Fri Mar 28 19:08:00 2014 +0100
@@ -32,6 +32,7 @@
 local jid_escape = require "util.jid".escape;
 local prepped_split = require "util.jid".prepped_split;
 local nodeprep = require "util.encodings".stringprep.nodeprep;
+local pposix = require "util.pposix";
 
 --module "sasl_dovecot"
 local _M = {};
@@ -67,7 +68,7 @@
 	end
 
 	-- Send our handshake
-	pid = tonumber(tostring(conn):match("0x%x*$"));
+	pid = pposix.getpid();
 	log("debug", "sending handshake to dovecot. version 1.1, cpid '%d'", pid);
 	local success,err = conn:send("VERSION\t1\t1\n");
 	if not success then