"Richard A. Secor" wrote:
>
> I was sick of having the wrong Date/Time stamps in my lastauth table so
> here's the fix:
>
> File: vmysql.c
> Around lines: 1046-1048
> Note: I just added:
> FROM_UNIXTIME( )
>
> snprintf( SqlBufUpdate, SQL_BUF_SIZE,
> "replace into lastauth set user='%s', domain='%s', \
> remote_ip='%s', timestamp=FROM_UNIXTIME(%lu)", user, domain, remoteip,
> time(NUL
> L));
The new development version no longer uses the mysql time stamp
type. It uses a bigint and stores the unix time value.
This is to provide compatibily across auth modules, cdb, mysql
oracle, ldap, etc.
If you upgrade to the development version in the future be
sure to drop your lastauth table and let vpopmail re-create it.
[root@localhost vpopmail-4.10.29]# ./configure --enable-mysql=y
--enable-clear-passwd=y --enable-auth-logging=y
...
make ; make install-strip
./vadddomain test.com test
[root@localhost vpopmail-4.10.29]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
+OK <[EMAIL PROTECTED]>
user [EMAIL PROTECTED]
+OK
pass test
+OK
quit
+OK
Connection closed by foreign host.
[root@localhost vpopmail-4.10.29]# ./vuserinfo [EMAIL PROTECTED]
last auth: Wed Jul 11 11:38:03 2001
[root@localhost vpopmail-4.10.29]# date
Wed Jul 11 11:38:16 CEST 2001
As you can see, the last auth works correctly in the
development version.
Hope that helps
Ken Jones