• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PowerDNS / pdns / 20646266139

31 Dec 2025 12:53PM UTC coverage: 59.966% (-13.4%) from 73.336%
20646266139

push

github

web-flow
Merge pull request #16678 from miodvallat/cold_turkey

auth: deaden dead code

40880 of 106016 branches covered (38.56%)

Branch coverage included in aggregate %.

100063 of 129022 relevant lines covered (77.55%)

8147966.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.57
/pdns/bindparserclasses.hh
1
/*
2
 * This file is part of PowerDNS or dnsdist.
3
 * Copyright -- PowerDNS.COM B.V. and its contributors
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of version 2 of the GNU General Public License as
7
 * published by the Free Software Foundation.
8
 *
9
 * In addition, for the avoidance of any doubt, permission is granted to
10
 * link this program with OpenSSL and to (re)distribute the binaries
11
 * produced as the result of such linking.
12
 *
13
 * This program 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.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
 */
22
#pragma once
23
#include <string>
24
#include <map>
25
#include <vector>
26
#include <set>
27
#include <stdio.h>
28
#include <sys/stat.h>
29

30
#include "namespaces.hh"
31
#include "iputils.hh"
32

33
class BindDomainInfo 
34
{
35
public:
36
  void clear() 
11✔
37
  {
11✔
38
    name=ZoneName();
11✔
39
    filename=type="";
11✔
40
    primaries.clear();
11✔
41
    alsoNotify.clear();
11✔
42
    d_dev=0;
11✔
43
    d_ino=0;
11✔
44
  }
45
  ZoneName name;
46
  string viewName;
47
  string filename;
48
  vector<ComboAddress> primaries;
49
  set<string> alsoNotify;
50
  string type;
51
  bool hadFileDirective{false};
52

53
  dev_t d_dev{0};
54
  ino_t d_ino{0};
55

56
  bool operator<(const BindDomainInfo& b) const
×
57
  {
×
58
    return pair(d_dev, d_ino) < pair(b.d_dev, b.d_ino);
×
59
  }
60
};
61

62
extern const char *bind_directory;
63
extern FILE *yyin;
64
class BindParser
65
{
66
 public:
67
   BindParser()
1✔
68
   {
1✔
69
     yyin = 0;
1✔
70
     extern int include_stack_ptr;
1✔
71
     include_stack_ptr = 0;
72

1✔
73
     bind_directory = d_dir.c_str();
1✔
74
   }
75
  ~BindParser()
1✔
76
  {
1!
77
    if(yyin) {
1!
78
      fclose(yyin);
1✔
79
      yyin=0;
1✔
80
    }
1✔
81
  }
82
  void parse(const string &fname);
83
  void commit(BindDomainInfo DI);
84
  void setDirectory(const string &dir);
85
  const string &getDirectory();
86
  const vector<BindDomainInfo>& getDomains();
87
  void setVerbose(bool verbose);
88
  void addAlsoNotify(const string &host);
×
89
  set<string> & getAlsoNotify() { return this->alsoNotify; } 
90
private:
91
  string d_dir{"."};
92
  set<string> alsoNotify;
93
  vector<BindDomainInfo> d_zonedomains;
94
  bool d_verbose{false};
95
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc