Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
632
Issues
632
List
Boards
Labels
Service Desk
Milestones
Merge Requests
107
Merge Requests
107
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
fe6db06c
Commit
fe6db06c
authored
Jul 27, 2016
by
Witold Krecicki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4426. [bug] Addressed Coverity warnings. [RT #42908]
parent
49834f2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
CHANGES
CHANGES
+2
-0
bin/named/server.c
bin/named/server.c
+25
-8
No files found.
CHANGES
View file @
fe6db06c
4426. [bug] Addressed Coverity warnings. [RT #42908]
4425. [bug] arpaname, dnstap-read and named-rrchecker were not
being installed into ${prefix}/bin. Tidy up
installation issues with CHANGE 4421. [RT #42910]
...
...
bin/named/server.c
View file @
fe6db06c
...
...
@@ -10734,6 +10734,7 @@ nzf_append(dns_view_t *view, const cfg_obj_t *zconfig) {
isc_result_t result;
off_t offset;
FILE *fp = NULL;
isc_boolean_t offsetok = ISC_FALSE;
LOCK(&view->new_zone_lock);
...
...
@@ -10741,16 +10742,38 @@ nzf_append(dns_view_t *view, const cfg_obj_t *zconfig) {
CHECK(isc_stdio_seek(fp, 0, SEEK_END));
CHECK(isc_stdio_tell(fp, &offset));
offsetok = ISC_TRUE;
if (offset == 0)
CHECK(add_comment(fp, view->name));
CHECK(isc_stdio_write("zone ", 5, 1, fp, NULL));
cfg_printx(zconfig, CFG_PRINTER_ONELINE, dumpzone, fp);
CHECK(isc_stdio_write(";\n", 2, 1, fp, NULL));
CHECK(isc_stdio_flush(fp));
CHECK(isc_stdio_close(fp));
fp = NULL;
cleanup:
isc_stdio_flush(fp);
isc_stdio_close(fp);
if (fp != NULL) {
(void)isc_stdio_close(fp);
if (offsetok) {
isc_result_t result2;
result2 = isc_file_truncate(view->new_zone_file,
offset);
if (result2 != ISC_R_SUCCESS) {
isc_log_write(ns_g_lctx,
NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER,
ISC_LOG_ERROR,
"Error truncating NZF file '%s' "
"during rollback from append: "
"%s",
view->new_zone_file,
isc_result_totext(result2));
}
}
}
UNLOCK(&view->new_zone_lock);
return (result);
}
...
...
@@ -11871,7 +11894,6 @@ ns_server_delzone(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
dns_zone_t *mayberaw;
dns_view_t *view = NULL;
char zonename[DNS_NAME_FORMATSIZE];
isc_boolean_t exclusive = ISC_FALSE;
isc_boolean_t cleanup = ISC_FALSE;
const char *ptr;
isc_boolean_t added;
...
...
@@ -11935,7 +11957,6 @@ ns_server_delzone(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
dns_zone_gettask(zone, &task);
isc_task_send(task, &dzevent);
dz = NULL;
dzevent = NULL;
/* Inform user about cleaning up stub/slave zone files */
dns_zone_getraw(zone, &raw);
...
...
@@ -11989,16 +12010,12 @@ ns_server_delzone(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
result = ISC_R_SUCCESS;
cleanup:
if (exclusive)
isc_task_endexclusive(server->task);
if (isc_buffer_usedlength(*text) > 0)
(void) putnull(text);
if (raw != NULL)
dns_zone_detach(&raw);
if (zone != NULL)
dns_zone_detach(&zone);
if (dzevent != NULL)
isc_event_free(&dzevent);
if (dz != NULL) {
dns_zone_detach(&dz->zone);
isc_mem_put(ns_g_mctx, dz, sizeof(*dz));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment