per standard the buffer status is undefined. While there also introduce a new spearate variable to return the final error and keep using ret for local error checks. This avoid potentially overwriting the correct return value when checking for asprintf ...
This is an implementation of the RFC3244 kpasswd protocol. It is used to proxy password change operations to Directory Server.