The attached is an updated patch against the trunk that incorporates Qing's changes plus addition corrections for the 32-bit time_t mess. Qing's changes for src/windows/identity are not included. They will be integrated into the next netidmgr update.