# HG changeset patch # User Javier Torres # Date 1288474699 -7200 # Node ID 76f3310ec113aba78d63a2ff9df6ddde3d4b59ec # Parent 8cd2fab3135ac43f78a811ab4e2cf68845959d31 mod_auth_dovecot: Use PID in handshake diff -r 8cd2fab3135a -r 76f3310ec113 mod_auth_dovecot/mod_auth_dovecot.lua --- a/mod_auth_dovecot/mod_auth_dovecot.lua Sat Oct 16 08:09:48 2010 +0500 +++ b/mod_auth_dovecot/mod_auth_dovecot.lua Sat Oct 30 23:38:19 2010 +0200 @@ -11,6 +11,7 @@ local new_sasl = require "util.sasl".new; local nodeprep = require "util.encodings".stringprep.nodeprep; local base64 = require "util.encodings".base64; +local pposix = require "util.pposix"; local prosody = _G.prosody; @@ -24,7 +25,7 @@ c = assert(socket.unix()); assert(c:connect("/var/run/dovecot/auth-login")); -- FIXME: Hardcoded is bad - local pid = "12345"; -- FIXME: this should be an unique number between processes, recommendation is PID + local pid = pposix.getpid(); -- Send our handshake -- FIXME: Oh no! There are asserts everywhere