mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
sanitize away the DNS_OPT_NEWCODES stuff
This commit is contained in:
parent
941d15a028
commit
ab3f2d77bd
@ -13,7 +13,7 @@
|
|||||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
# $Id: Makefile.in,v 1.114 2000/12/01 23:49:53 gson Exp $
|
# $Id: Makefile.in,v 1.115 2000/12/02 04:13:29 gson Exp $
|
||||||
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
@ -32,6 +32,11 @@ CWARNINGS =
|
|||||||
|
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
|
|
||||||
|
#ifdef DNS_OPT_NEWCODES
|
||||||
|
OTHEROBJS = opt.@O@
|
||||||
|
OTHERSRCS = opt.c
|
||||||
|
#endif /* DNS_OPT_NEWCODES */
|
||||||
|
|
||||||
# Alphabetically
|
# Alphabetically
|
||||||
|
|
||||||
CONFOBJS = config/confacl.@O@ config/confcache.@O@ config/confcommon.@O@ \
|
CONFOBJS = config/confacl.@O@ config/confcache.@O@ config/confcommon.@O@ \
|
||||||
@ -93,14 +98,14 @@ OBJS = a6.@O@ acl.@O@ adb.@O@ byaddr.@O@ \
|
|||||||
db.@O@ dbiterator.@O@ dbtable.@O@ dispatch.@O@ dnssec.@O@ \
|
db.@O@ dbiterator.@O@ dbtable.@O@ dispatch.@O@ dnssec.@O@ \
|
||||||
forward.@O@ journal.@O@ keytable.@O@ lib.@O@ log.@O@ \
|
forward.@O@ journal.@O@ keytable.@O@ lib.@O@ log.@O@ \
|
||||||
lookup.@O@ master.@O@ masterdump.@O@ message.@O@ \
|
lookup.@O@ master.@O@ masterdump.@O@ message.@O@ \
|
||||||
name.@O@ ncache.@O@ nxt.@O@ opt.@O@ peer.@O@ \
|
name.@O@ ncache.@O@ nxt.@O@ peer.@O@ \
|
||||||
rbt.@O@ rbtdb.@O@ rbtdb64.@O@ rdata.@O@ rdatalist.@O@ \
|
rbt.@O@ rbtdb.@O@ rbtdb64.@O@ rdata.@O@ rdatalist.@O@ \
|
||||||
rdataset.@O@ rdatasetiter.@O@ rdataslab.@O@ request.@O@ \
|
rdataset.@O@ rdatasetiter.@O@ rdataslab.@O@ request.@O@ \
|
||||||
resolver.@O@ result.@O@ rootns.@O@ sdb.@O@ ssu.@O@ \
|
resolver.@O@ result.@O@ rootns.@O@ sdb.@O@ ssu.@O@ \
|
||||||
stats.@O@ tcpmsg.@O@ time.@O@ timer.@O@ tkey.@O@ \
|
stats.@O@ tcpmsg.@O@ time.@O@ timer.@O@ tkey.@O@ \
|
||||||
tsig.@O@ ttl.@O@ validator.@O@ \
|
tsig.@O@ ttl.@O@ validator.@O@ \
|
||||||
version.@O@ view.@O@ xfrin.@O@ zone.@O@ zt.@O@ \
|
version.@O@ view.@O@ xfrin.@O@ zone.@O@ zt.@O@ \
|
||||||
${DSTOBJS} @DST_OPENSSL_OBJS@ ${CONFOBJS}
|
${OTHEROBJS} ${DSTOBJS} @DST_OPENSSL_OBJS@ ${CONFOBJS}
|
||||||
|
|
||||||
# Alphabetically
|
# Alphabetically
|
||||||
SRCS = a6.c acl.c adb.c byaddr.c \
|
SRCS = a6.c acl.c adb.c byaddr.c \
|
||||||
@ -108,13 +113,13 @@ SRCS = a6.c acl.c adb.c byaddr.c \
|
|||||||
db.c dbiterator.c dbtable.c dispatch.c dnssec.c \
|
db.c dbiterator.c dbtable.c dispatch.c dnssec.c \
|
||||||
forward.c journal.c keytable.c lib.c log.c \
|
forward.c journal.c keytable.c lib.c log.c \
|
||||||
lookup.c master.c masterdump.c message.c \
|
lookup.c master.c masterdump.c message.c \
|
||||||
name.c ncache.c nxt.c opt.c peer.c \
|
name.c ncache.c nxt.c peer.c \
|
||||||
rbt.c rbtdb.c rbtdb64.c rdata.c rdatalist.c \
|
rbt.c rbtdb.c rbtdb64.c rdata.c rdatalist.c \
|
||||||
rdataset.c rdatasetiter.c rdataslab.c request.c \
|
rdataset.c rdatasetiter.c rdataslab.c request.c \
|
||||||
resolver.c result.c rootns.c sdb.c ssu.c \
|
resolver.c result.c rootns.c sdb.c ssu.c \
|
||||||
stats.c tcpmsg.c time.c timer.c tkey.c \
|
stats.c tcpmsg.c time.c timer.c tkey.c \
|
||||||
tsig.c ttl.c validator.c \
|
tsig.c ttl.c validator.c \
|
||||||
version.c view.c xfrin.c zone.c zt.c
|
version.c view.c xfrin.c zone.c zt.c ${OTHERSRCS}
|
||||||
|
|
||||||
SUBDIRS = include sec config
|
SUBDIRS = include sec config
|
||||||
TARGETS = include/dns/enumtype.h include/dns/enumclass.h \
|
TARGETS = include/dns/enumtype.h include/dns/enumclass.h \
|
||||||
|
@ -15,7 +15,9 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: opt.h,v 1.4 2000/11/18 03:01:07 bwelling Exp $ */
|
/* $Id: opt.h,v 1.5 2000/12/02 04:13:33 gson Exp $ */
|
||||||
|
|
||||||
|
/* DNS_OPT_NEWCODES_KEEP */
|
||||||
|
|
||||||
#ifndef DNS_OPT_H
|
#ifndef DNS_OPT_H
|
||||||
#define DNS_OPT_H 1
|
#define DNS_OPT_H 1
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: message.c,v 1.159 2000/11/22 23:09:58 gson Exp $ */
|
/* $Id: message.c,v 1.160 2000/12/02 04:13:30 gson Exp $ */
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*** Imports
|
*** Imports
|
||||||
@ -2814,7 +2814,23 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
|
|||||||
ps = dns_message_getopt(msg);
|
ps = dns_message_getopt(msg);
|
||||||
if (ps == NULL)
|
if (ps == NULL)
|
||||||
return (ISC_R_SUCCESS);
|
return (ISC_R_SUCCESS);
|
||||||
|
#ifdef DNS_OPT_NEWCODES
|
||||||
result = dns_opt_totext(ps, target, flags);
|
result = dns_opt_totext(ps, target, flags);
|
||||||
|
#else /* DNS_OPT_NEWCODES */
|
||||||
|
result = dns_opt_totext(ps, target, flags);
|
||||||
|
if ((flags & DNS_MESSAGETEXTFLAG_NOCOMMENTS) == 0)
|
||||||
|
ADD_STRING(target, ";; OPT PSEUDOSECTION:\n");
|
||||||
|
ADD_STRING(target, "; EDNS: version: ");
|
||||||
|
sprintf(buf, "%4u",
|
||||||
|
(unsigned int)((ps->ttl &
|
||||||
|
0x00ff0000 >> 16)));
|
||||||
|
ADD_STRING(target, buf);
|
||||||
|
ADD_STRING(target, ", udp=");
|
||||||
|
sprintf(buf, "%7u\n",
|
||||||
|
(unsigned int)ps->rdclass);
|
||||||
|
ADD_STRING(target, buf);
|
||||||
|
result = ISC_R_SUCCESS;
|
||||||
|
#endif /* DNS_OPT_NEWCODES */
|
||||||
return (result);
|
return (result);
|
||||||
case DNS_PSEUDOSECTION_TSIG:
|
case DNS_PSEUDOSECTION_TSIG:
|
||||||
ps = dns_message_gettsig(msg, &name);
|
ps = dns_message_gettsig(msg, &name);
|
||||||
|
@ -15,7 +15,9 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: opt.c,v 1.9 2000/12/02 04:12:25 gson Exp $ */
|
/* $Id: opt.c,v 1.10 2000/12/02 04:13:32 gson Exp $ */
|
||||||
|
|
||||||
|
/* DNS_OPT_NEWCODES_KEEP */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
# $Id: sanitize.pl,v 1.13 2000/10/10 23:12:54 bwelling Exp $
|
# $Id: sanitize.pl,v 1.14 2000/12/02 04:13:34 gson Exp $
|
||||||
|
|
||||||
# Don't try and sanitize this file: NOMINUM_IGNORE
|
# Don't try and sanitize this file: NOMINUM_IGNORE
|
||||||
|
|
||||||
@ -34,7 +34,11 @@
|
|||||||
# in the file, and a warning is generated, unless the string
|
# in the file, and a warning is generated, unless the string
|
||||||
# NOMINUM_IGNORE appears before NOMINUM_.
|
# NOMINUM_IGNORE appears before NOMINUM_.
|
||||||
|
|
||||||
# If the string key_DELETE is present, delete the file.
|
# If the string key_DELETE is present, delete the file when the key
|
||||||
|
# is present.
|
||||||
|
|
||||||
|
# If the string key_KEEP is present, delete the file when the key
|
||||||
|
# is absent.
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# ./sanitize.pl -c - Check syntax only, don't change anything
|
# ./sanitize.pl -c - Check syntax only, don't change anything
|
||||||
@ -110,6 +114,14 @@ sub runfile($) {
|
|||||||
$deletefile = 1;
|
$deletefile = 1;
|
||||||
goto bailout;
|
goto bailout;
|
||||||
}
|
}
|
||||||
|
elsif ((/$key[$i]_KEEP/) &&
|
||||||
|
($showon[$i] == 2)) {
|
||||||
|
close(INFILE);
|
||||||
|
close(OUTFILE);
|
||||||
|
unlink($_[1]);
|
||||||
|
$deletefile = 1;
|
||||||
|
goto bailout;
|
||||||
|
}
|
||||||
elsif (/\#.*ifdef.+$key[$i]/) {
|
elsif (/\#.*ifdef.+$key[$i]/) {
|
||||||
if ($state[$i] != 0) {
|
if ($state[$i] != 0) {
|
||||||
print(STDERR "*** ERROR in file ".
|
print(STDERR "*** ERROR in file ".
|
||||||
|
@ -15,21 +15,22 @@
|
|||||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
# $Id: sanitize_all.sh,v 1.9 2000/11/22 23:28:27 bwelling Exp $
|
# $Id: sanitize_all.sh,v 1.10 2000/12/02 04:13:35 gson Exp $
|
||||||
|
|
||||||
PERL=perl5
|
PERL=perl5
|
||||||
|
|
||||||
# Run this shell script from a CVS export'ed source tree, and it will
|
# Run this shell script from a CVS export'ed source tree, and it will
|
||||||
# sanitize all of the files in that tree.
|
# sanitize all of the files in that tree.
|
||||||
|
|
||||||
find . -name '*.[ch]' | xargs $PERL util/sanitize.pl -kNOMINUM_PUBLIC \
|
SANITIZE_FLAGS="-kNOMINUM_PUBLIC -iDNS_OPT_NEWCODES -iDNS_OPT_NEWCODES_LIVE"
|
||||||
-iNOMINUM_GNS $*
|
|
||||||
find . -name '*.in' | xargs $PERL util/sanitize.pl -kNOMINUM_PUBLIC \
|
find . -name '*.[ch]' -o -name '*.in' |
|
||||||
-iNOMINUM_GNS $*
|
xargs $PERL util/sanitize.pl $SANITIZE_FLAGS
|
||||||
|
|
||||||
for file in `find . -name '*.dirty'`
|
for file in `find . -name '*.dirty'`
|
||||||
do
|
do
|
||||||
clean=`echo $file | sed 's/\.dirty$//'`
|
clean=`echo $file | sed 's/\.dirty$//'`
|
||||||
$PERL util/sanitize.pl -kNOMINUM_PUBLIC - < $file > $clean
|
$PERL util/sanitize.pl $SANITIZE_FLAGS - < $file > $clean
|
||||||
rm $file
|
rm $file
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user