mirror of
https://github.com/bklang/ldap2dns.git
synced 2025-10-27 14:24:15 -04:00
Fix one more Makefile formatting issue
Improve debugging support Make SRV records work for BIND outputs git-svn-id: https://svn.alkaloid.net/gpl/ldap2dns/trunk@321 06cd67b6-e706-0410-b29e-9de616bca6e9
This commit is contained in:
6
Makefile
6
Makefile
@@ -2,7 +2,7 @@
|
|||||||
VERSION=0.3.7
|
VERSION=0.3.7
|
||||||
RELEASE=0
|
RELEASE=0
|
||||||
CC=gcc -O2
|
CC=gcc -O2
|
||||||
CCDEBUG=gcc -g
|
CCDEBUG=gcc -g -ggdb
|
||||||
CFLAGS=$(INC) -DVERSION='"$(VERSION)"'
|
CFLAGS=$(INC) -DVERSION='"$(VERSION)"'
|
||||||
LIBS=-lldap -llber
|
LIBS=-lldap -llber
|
||||||
LD=gcc
|
LD=gcc
|
||||||
@@ -36,8 +36,8 @@ ldap2dns: ldap2dns.o
|
|||||||
ldap2dnsd: ldap2dns
|
ldap2dnsd: ldap2dns
|
||||||
ln -f ldap2dns ldap2dnsd
|
ln -f ldap2dns ldap2dnsd
|
||||||
|
|
||||||
ldap2dns-dbg: ldap2dns.o-dbg $(LIBS)
|
ldap2dns-dbg: ldap2dns.o-dbg
|
||||||
$(LD) $(LDFLAGS) -o $@ $+
|
$(LD) $(LDFLAGS) $(LIBS) -o $@ $+
|
||||||
|
|
||||||
ldap2dns.o: ldap2dns.c
|
ldap2dns.o: ldap2dns.c
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|||||||
@@ -492,7 +492,7 @@ static void write_rr(struct resourcerecord* rr, int ipdx, int znix)
|
|||||||
if (namedzone)
|
if (namedzone)
|
||||||
fprintf(namedzone, "%s.\tIN TXT\t%s.\n", rr->dnsdomainname, rr->cname);
|
fprintf(namedzone, "%s.\tIN TXT\t%s.\n", rr->dnsdomainname, rr->cname);
|
||||||
} else if (strcasecmp(rr->type, "SRV")==0) {
|
} else if (strcasecmp(rr->type, "SRV")==0) {
|
||||||
if (tinyfile)
|
if (tinyfile) {
|
||||||
fprintf(tinyfile, ":%s:33:\\%03o\\%03o\\%03o\\%03o\\%03o\\%03o", rr->dnsdomainname, rr->dnssrvpriority >> 8, rr->dnssrvpriority & 0xff, rr->dnssrvweight >> 8, rr->dnssrvweight & 0xff, rr->dnssrvport >> 8, rr->dnssrvport & 0xff);
|
fprintf(tinyfile, ":%s:33:\\%03o\\%03o\\%03o\\%03o\\%03o\\%03o", rr->dnsdomainname, rr->dnssrvpriority >> 8, rr->dnssrvpriority & 0xff, rr->dnssrvweight >> 8, rr->dnssrvweight & 0xff, rr->dnssrvport >> 8, rr->dnssrvport & 0xff);
|
||||||
tmp = strdup(rr->cname);
|
tmp = strdup(rr->cname);
|
||||||
while (p = strchr(tmp, '.')) {
|
while (p = strchr(tmp, '.')) {
|
||||||
@@ -504,6 +504,10 @@ static void write_rr(struct resourcerecord* rr, int ipdx, int znix)
|
|||||||
fprintf(tinyfile, "\\%03o%s", strlen(tmp), tmp);
|
fprintf(tinyfile, "\\%03o%s", strlen(tmp), tmp);
|
||||||
fprintf(tinyfile, "\\000:%s:%s:%s\n", rr->ttl, rr->timestamp, rr->location);
|
fprintf(tinyfile, "\\000:%s:%s:%s\n", rr->ttl, rr->timestamp, rr->location);
|
||||||
}
|
}
|
||||||
|
if (namedzone) {
|
||||||
|
fprintf(namedzone, "%s\tIN SRV\t%d\t%d\t%d\t%s.\n", rr->dnsdomainname, rr->dnssrvpriority, rr->dnssrvweight, rr->dnssrvport, rr->cname);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined DRAFT_RFC
|
#if defined DRAFT_RFC
|
||||||
|
|||||||
Reference in New Issue
Block a user