From c0aff53501ad45dba1425951a8cc2cd3d1697a8d Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: Tue, 10 Feb 2009 18:55:56 +0100 Subject: Add helper functions for LDAP related conversions. --- ldap_convert.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ldap_convert.h (limited to 'ldap_convert.h') diff --git a/ldap_convert.h b/ldap_convert.h new file mode 100644 index 0000000..1fb77e4 --- /dev/null +++ b/ldap_convert.h @@ -0,0 +1,31 @@ +/* Authors: Martin Nagy + * + * Copyright (C) 2009 Red Hat + * see file 'COPYING' for use and warranty information + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 only + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _LD_LDAP_CONVERT_H_ +#define _LD_LDAP_CONVERT_H_ + +/* + * Convert LDAP DN 'dn', to dns_name_t 'target'. 'target' needs to be + * initialized with dns_name_init() before the call and freed by the caller + * after it using dns_name_free(). + */ +isc_result_t dn_to_dnsname(isc_mem_t *mctx, const char *dn, const char *root_dn, + dns_name_t *target); + +#endif /* !_LD_LDAP_CONVERT_H_ */ -- cgit