NTSTATUS samdb_result_passwords_no_lockout(TALLOC_CTX *mem_ctx,
					   struct loadparm_context *lp_ctx,
					   const struct ldb_message *msg,
					   struct samr_Password **nt_pwd)
{
	struct samr_Password *ntPwdHash;

	if (nt_pwd) {
		unsigned int num_nt;
		num_nt = samdb_result_hashes(mem_ctx, msg, "unicodePwd", &ntPwdHash);
		if (num_nt == 0) {
			*nt_pwd = NULL;
		} else if (num_nt > 1) {
			return NT_STATUS_INTERNAL_DB_CORRUPTION;
		} else {
			*nt_pwd = &ntPwdHash[0];
		}
	}
	return NT_STATUS_OK;
}
NTSTATUS samdb_result_passwords_no_lockout(TALLOC_CTX *mem_ctx,
					   struct loadparm_context *lp_ctx,
					   const struct ldb_message *msg,
					   struct samr_Password **nt_pwd)
{
	struct samr_Password *ntPwdHash;

	if (nt_pwd) {
		unsigned int num_nt;
		num_nt = samdb_result_hashes(mem_ctx, msg, "unicodePwd", &ntPwdHash);
		if (num_nt == 0) {
			*nt_pwd = NULL;
		} else if (num_nt > 1) {
			return NT_STATUS_INTERNAL_DB_CORRUPTION;
		} else {
			*nt_pwd = &ntPwdHash[0];
		}
	}
	return NT_STATUS_OK;
}