mirror of
https://github.com/bklang/ldap2dns.git
synced 2025-10-26 14:04:14 -04:00
Typo fix LDAP2DNS_TINYDNSDIR check
Add missing check for LDAP2DNS_URI git-svn-id: https://svn.alkaloid.net/gpl/ldap2dns/trunk@389 06cd67b6-e706-0410-b29e-9de616bca6e9
This commit is contained in:
@@ -139,8 +139,8 @@ static void die_exit(const char* message)
|
||||
static void set_datadir(void)
|
||||
{
|
||||
char* ev = getenv("TINYDNSDIR");
|
||||
if (ev == NULL)
|
||||
char* ev = getenv("LDAP2DNS_TINYDNSDIR");
|
||||
if (!ev)
|
||||
ev = getenv("LDAP2DNS_TINYDNSDIR");
|
||||
int len;
|
||||
|
||||
tinydns_textfile[0] = '\0';
|
||||
@@ -324,6 +324,11 @@ static int parse_options()
|
||||
for (i = 0; i<MAXHOSTS; i++)
|
||||
options.port[i] = tmp;
|
||||
}
|
||||
ev = getenv("LDAP2DNS_URI");
|
||||
if (ev) {
|
||||
if (sscanf(ev, "%512[A-Za-z0-9 .:/_+-]", value)==1)
|
||||
parse_hosts(value);
|
||||
}
|
||||
ev = getenv("LDAP2DNS_TIMEOUT");
|
||||
if (ev && sscanf(ev, "%hd", &options.searchtimeout.tv_sec) != 1)
|
||||
options.searchtimeout.tv_sec = DEF_SEARCHTIMEOUT;
|
||||
|
||||
Reference in New Issue
Block a user