OpenLDAP entryUUID generation

At work I've been fighting with OpenLDAP, hoping to update some really old servers (as in 2.0.xx), and possibly using syncrepl instead of slurpd to replicate between servers. One thing that's been holding me up is that it wasn't obvious at all how entryUUID and entryCSN attributes get generated.

Turns out that if you have lastmod off in your slapd.conf, as I did, that seems to suppress generating those attributes, in addition to the ones that are actually documented (modifiersName, modifyTimestamp, ...). I had left lastmod off because I was getting info from an Netscape Directory Server, which already put in that info, and didn't want OpenLDAP messing with it. Turns out that wasn't a concern, and from what I can tell from the sourcecode, OpenLDAP only adds modification attributes if they don't already exist.

Overall I've been pretty frustrated with OpenLDAP documentation through the years, and reading the sourcecode isn't much better, since comments at least in the files I looked at are sparse to nonexistant.