summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Change the compile flags to use -std=gnu99HEADmasterMartin Nagy2010-03-231-1/+1
|
* Don't loop if the connection fails at startMartin Nagy2010-03-231-0/+2
| | | | Resolves ticket #25
* Fail over to passwordless login if other method failsMartin Nagy2010-03-231-1/+14
| | | | Resolves ticket #26
* Add a fake_mname optionMartin Nagy2010-03-231-4/+15
| | | | | | | | The fake_mname option is optional and will cause the LDAP driver to ignore idnsSOAmName LDAP attribute and use the value of this option instead. Resolves ticket #17
* Remove duplicate get_soa_record() callMartin Nagy2009-09-161-2/+0
|
* Fix a typo in previous commitMartin Nagy2009-09-041-1/+1
|
* Fix the reconnection codeMartin Nagy2009-09-041-5/+5
| | | | | | | | We only did a new ldap bind with the old ldap handle, which didn't work. We fix this by getting rid of the old handle and do a brand new init and bind. Resolves ticket #20
* Fix a memory leak in ldap instance creationMartin Nagy2009-09-041-0/+1
| | | | | When destroying an ldap instance we didn't destroy the sasl_realm setting string.
* Use uppercase LDAP booleans according to RFC 2252Martin Nagy2009-08-312-2/+2
| | | | | | The search filter for active zones used value "True" for attribute "idnsZoneActive". This is incorrect according to section 6.4 of RFC 2252 which states that boolean syntax is either "TRUE" or "FALSE".
* Change license: GPLv2 or laterMartin Nagy2009-08-0425-50/+75
| | | | | Allow publishing the code under GPL version 2 or later. Before that, we only allowed to use version 2.
* Document SASL authentication settings in READMEMartin Nagy2009-08-041-20/+39
|
* Consolidate the SASL authenticationMartin Nagy2009-08-041-8/+15
| | | | | | | | * Change the default authentication method to GSSAPI * Add "sasl_auth_name" setting for SASL_CB_AUTHNAME * Add "sasl_password" setting for SASL_CB_PASS to be used instead of ordinary password, which will now be only used for simple authentication
* Cleanup of authentication codeMartin Nagy2009-08-041-29/+18
| | | | Mostly adding logging statements and removing some olds stuff.
* Gracefully fail if no zones are found in the initial lookupMartin Nagy2009-08-042-5/+19
| | | | | | | | If the initial search fails to find any zones, destroy the database instance, but return ISC_R_SUCCESS to BIND, since this is not technically a fault because of which BIND should abort. We do this because there is no point in refreshing zones if there are not any and it is not possible to add them later.
* Periodically refresh zone settingsMartin Nagy2009-08-047-89/+94
| | | | | | | | | | | | | | The original intent was to add and remove zones periodically, based on changes in the LDAP database. It seems, however, that this is not possible with the way BIND views are working. Each view can have zones added during the configuration phase, but not after that. Luckily, we can at least change their SSU table without the need to reload named. This commit also has some changes to the function interfaces and makes the whole thing a lot simpler. Creation of the ldap instances and cache instances is now left on the zone manager. Additionally, we now put view and zonemgr pointers right into into the ldap instance. This makes the API for refresh_zones_from_ldap() and create_zone() much more simpler.
* Use the zone register for internal storage of zonesMartin Nagy2009-08-044-182/+132
| | | | | | | | | | | Moving the zone registration into a separate file will make the code more modular and easier to read and change. Also, we are preparing the refresh_zones_from_ldap() function for it's intended purpose of being able to add zones and later modify them if something has changed. Unfortunately, we will only be able to change some of the zone attributes (for now the update policy). We will not be able to create new zones as they are added to LDAP because that requires a reload of the name server.
* Add CHECK_NEXT() macro similar to CHECK()Martin Nagy2009-08-041-2/+11
| | | | | | | The CHECK_NEXT() macro behaves exactly as the CHECK() macro, with the difference that it jumps to the 'next' label. This is useful if we need to cleanup after every loop cycle, but don't want to abort the whole function if error is found.
* Add a new structure: zone registerMartin Nagy2009-08-043-2/+318
| | | | | | | | | Zone register is used for storing pointers to zones and their corresponding LDAP distinguished names. These can then be accessed by dns name of the zone. The data is needed for conversion of a dns name to DN and to get a pointer of a zone when we need to make changes to it. We could use dns_view_findzone() for this, but that way we would not have any assurance that the found zone is really managed by us.
* Introduce macros log_bug() and log_error_r()Martin Nagy2009-08-041-0/+6
| | | | | | | The log_bug() is to be used when a condition that should never happen occurs. The log_error_r() will also log the reason of failure, which it will derive from variable 'result' that must be defined and of type isc_result_t.
* Tidy up log.c and log.h and introduce LOG_AS_ERRORMartin Nagy2009-08-042-34/+7
| | | | | | | The LOG_AS_ERROR conditional macro can be defined when compiling the sources to make log_debug() behave in the same way as log_error(). This is helpful for debugging, as specifying a debug level will introduce a lot of unwanted log messages.
* Fix cleanup logic in dn_to_dnsname()Martin Nagy2009-08-041-1/+3
|
* Add FOR_EACH style macrosMartin Nagy2009-08-041-0/+15
| | | | | | | | | | | | | | | | | The FOR_EACH() macro will simply traverse the given list. Usage: FOR_EACH(element, list) do_something(element); The FOR_EACH_UNLINK() macro will traverse the list and unlink each element. Useful when destroying a whole list. Usage: FOR_EACH_UNLINK(element, list) { destroy(&element); } END_FOR_EACH_UNLINK(element); All these macros assume that 'link' is used to connect list elements, as used in standard ISC list macros.
* Allow updating of the SOA recordMartin Nagy2009-08-041-11/+49
| | | | | | | | | Since the SOA record is special for us, as we store it in multiple LDAP attributes, it was ignored until now. This is now fixed, but we only allow changes to the numeric attributes: serial, refresh, retry, expire and minimum. Resolves ticket #5
* Cosmetic changes to ldap_rdttl_to_ldapmod()Martin Nagy2009-08-041-6/+4
|
* Add idnsUpdatePolicy to the idnsZone object classMartin Nagy2009-08-041-0/+1
| | | | | The idnsUpdatePolicy attribute was in the schema, but not in the zone object class.
* Fix memory leak in ldap_rdttl_to_ldapmod()Martin Nagy2009-08-041-2/+1
|
* Improve addition operation by using ldap_add_ext_s()Martin Nagy2009-08-041-12/+46
| | | | | | | | | Until now, we only used ldap_modify_ext_s() when adding a new record. This is not right, because the label might have not existed before. We solve this now by checking for LDAP_NO_SUCH_OBJECT error and using ldap_add_ext_s() if needed. Partially resolves ticket #1
* Fix a crash bug in findnode()Martin Nagy2009-08-042-12/+7
| | | | | | | | | | If the create argument was set to ISC_TRUE and nothing was found by cached_ldap_rdatalist_get(), the rdatalist variable was left uninitialized. This later caused crash in ldapdb_rdatalist_findrdatatype(), when trying to access memory that rdatalist pointed to. Resolves ticket #18
* Add annotations to printf-like functionsMartin Nagy2009-08-045-5/+8
| | | | | | The ISC_FORMAT_PRINTF() macro will make sure that gcc checks if these functions are used correctly. Also fix bugs that were found along the way.
* Remove unneeded castsMartin Nagy2009-08-042-5/+5
|
* Don't use IGNORE() and IGNORE_R() macrosMartin Nagy2009-08-041-14/+24
| | | | | We didn't use them at too many places, so using the code directly will make it easier to read.
* Rename ldap_record_to_rdatatype to ldap_attribute_to_rdatatypeMartin Nagy2009-08-043-4/+4
|
* Rename ldap_db_t to ldap_instance_tMartin Nagy2009-08-049-193/+193
| | | | | | | | | Equivalent to: s/new_ldap_db/new_ldap_instance/ s/destroy_ldap_db/destroy_ldap_instance/ s/manager_get_ldap_db_and_cache/manager_get_ldap_instance_and_cache/ s/ldap_db_t/ldap_instance_t/ s/ldap_db/ldap_db/
* Rename ldap_instance_t to ldap_connection_tMartin Nagy2009-08-042-172/+172
| | | | | | | | | Equivalent to: s/ldap_instance/ldap_connection s/ldap_inst/ldap_conn This commit starts a series of larger code refactoring effort. More changes and renames will follow.
* Fix the docdir definition for old autoconfMartin Nagy2009-06-021-1/+1
| | | | | | Using the test [ -n "$docdir" ] was actually the opposite of what we really wanted. Also, autoconf 2.59 doesn't know datarootdir, but only datadir, so change that as well.
* Get rid of some compiler warningsMartin Nagy2009-06-022-1/+3
| | | | | Don't use the -pedantic flags and include forgotten string.h header file needed in zone_manager.c for strcmp().
* More compatibility fixesMartin Nagy2009-06-024-0/+73
| | | | | | | This will now compile and work fairly well on a RHEL5 system with the newest BIND (9.3.6-2.P1, some stuff is back-ported here). We added a compat.h header file which contains a replacement for two functions. We also did some ifdef-ing in acl.c.
* Define docdir if autoconf (older versions, 2.59, for example) doesn't define it.Adam Tkac2009-06-021-0/+4
|
* Add basic support to get a tgt autonomouslySimo Sorce2009-05-254-0/+225
| | | | | Use mutex to serialize kinit. Reuse existing valid creedentials if any.
* Fix caching bug.Simo Sorce2009-05-251-0/+1
| | | | | | | We failed to delete the cache after a remove operation. This made a DNS Update against a cached entry fail (we would remove the attributes from ldap but never readd them back if they were unchanged).
* Let DNS Updates set the TTLSimo Sorce2009-05-251-4/+60
| | | | A bit hackish, but it does the job.
* Enable reading TTL for ldap entrySimo Sorce2009-05-251-14/+17
|
* Re-enable SASL/GSSAPI with fixes to make it work.Simo Sorce2009-05-221-11/+18
| | | | | | Still requires a manual kinit as the named user. also requires to set the sasl user in named.conf ex: arg "sasl_user DNS/ipaserver.example.com";
* Remove forgotten garbage from log.cMartin Nagy2009-05-121-5/+0
|
* Remove -Werror from CFLAGSMartin Nagy2009-04-301-1/+1
|
* Add a README filev0.1.0-a1Martin Nagy2009-04-302-0/+145
|
* Add a sample zone ldifMartin Nagy2009-04-302-1/+62
|
* Add doc directory and the schema fileMartin Nagy2009-04-304-3/+295
|
* ldap_helper.c: Shut up gcc warningsMartin Nagy2009-04-281-2/+3
|
* Add -Werror and -O2 to CFLAGSMartin Nagy2009-04-281-1/+1
|