1
1
/* conff.c - Maintain configuration information
3
3
Copyright (C) 2000, 2001 Thomas Moestl
4
Copyright (C) 2002, 2003, 2004, 2005 Paul A. Rombouts
6
This file is part of the pdnsd package.
8
pdnsd is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2, or (at your option)
13
pdnsd is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with pdsnd; see the file COPYING. If not, write to
20
the Free Software Foundation, 59 Temple Place - Suite 330,
21
Boston, MA 02111-1307, USA. */
4
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Paul A. Rombouts
6
This file is part of the pdnsd package.
8
pdnsd is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 3 of the License, or
11
(at your option) any later version.
13
pdnsd is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with pdnsd; see the file COPYING. If not, see
20
<http://www.gnu.org/licenses/>.
23
23
#include <config.h>
386
398
fsprintf_or_return(f,"\tNegative domain policy: %s\n",const_name(global.neg_domain_pol));
387
399
fsprintf_or_return(f,"\tRun as: %s\n",global.run_as);
388
400
fsprintf_or_return(f,"\tStrict run as: %s\n",global.strict_suid?"on":"off");
401
fsprintf_or_return(f,"\tUse NSS: %s\n",global.use_nss?"on":"off");
389
402
fsprintf_or_return(f,"\tParanoid mode (cache pollution prevention): %s\n",global.paranoid?"on":"off");
390
403
fsprintf_or_return(f,"\tControl socket permissions (mode): %o\n",global.ctl_perms);
391
404
fsprintf_or_return(f,"\tMaximum parallel queries served: %i\n",global.proc_limit);
475
496
fsprintf_or_return(f,"\tlean query: %s\n",st->lean_query?"on":"off");
476
497
fsprintf_or_return(f,"\tUse only proxy?: %s\n",st->is_proxy?"on":"off");
477
498
fsprintf_or_return(f,"\tAssumed root server: %s\n",st->rootserver?"yes":"no");
499
fsprintf_or_return(f,"\tRandomize server query order: %s\n",st->rand_servers?"yes":"no");
478
500
fsprintf_or_return(f,"\tDefault policy: %s\n",const_name(st->policy));
479
fsprintf_or_return(f,"\tPolicies:\n");
480
if (st->alist==NULL) {
481
fsprintf_or_return(f,"\t\t(none)\n");
483
for (j=0;j<DA_NEL(st->alist);j++) {
484
slist_t *sl=&DA_INDEX(st->alist,j);
485
unsigned char buf[256];
486
fsprintf_or_return(f,"\t\t%s: %s%s\n",
487
sl->rule==C_INCLUDED?"include":"exclude",
489
rhn2str(sl->domain,buf,sizeof(buf)));
501
fsprintf_or_return(f,"\tPolicies:%s\n", st->alist?"":" (none)");
502
for (j=0;j<DA_NEL(st->alist);++j) {
503
slist_t *sl=&DA_INDEX(st->alist,j);
504
unsigned char buf[256];
505
fsprintf_or_return(f,"\t\t%s: %s%s\n",
506
sl->rule==C_INCLUDED?"include":"exclude",
508
rhn2str(sl->domain,buf,sizeof(buf)));
510
if(serv_has_rejectlist(st)) {
511
fsprintf_or_return(f,"\tAddresses which should be rejected in replies:\n");
512
for (j=0;j<DA_NEL(st->reject_a4);++j) {
513
addr4maskpair_t *am=&DA_INDEX(st->reject_a4,j);
514
char abuf[ADDRSTR_MAXLEN],mbuf[ADDRSTR_MAXLEN];
515
fsprintf_or_return(f,"\t\t%s/%s\n",inet_ntop(AF_INET,&am->a,abuf,sizeof(abuf)),
516
inet_ntop(AF_INET,&am->mask,mbuf,sizeof(mbuf)));
519
for (j=0;j<DA_NEL(st->reject_a6);++j) {
520
addr6maskpair_t *am=&DA_INDEX(st->reject_a6,j);
521
char abuf[INET6_ADDRSTRLEN],mbuf[INET6_ADDRSTRLEN];
522
fsprintf_or_return(f,"\t\t%s/%s\n",inet_ntop(AF_INET6,&am->a,abuf,sizeof(abuf)),
523
inet_ntop(AF_INET6,&am->mask,mbuf,sizeof(mbuf)));
526
fsprintf_or_return(f,"\tReject policy: %s\n",const_name(st->rejectpolicy));
527
fsprintf_or_return(f,"\tReject recursively: %s\n",st->rejectrecursively?"yes":"no");