mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-06-09 08:34:02 -04:00
- review fixes from Willem.
git-svn-id: file:///svn/unbound/trunk@2945 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
c845aceee4
commit
5db366f99f
8 changed files with 29 additions and 2 deletions
|
|
@ -521,7 +521,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
|
|||
/* setusercontext does initgroups, setuid, setgid, and
|
||||
* also resource limits from login config, but we
|
||||
* still call setresuid, setresgid to be sure to set all uid*/
|
||||
if(setusercontext(NULL, pwd, uid,
|
||||
if(setusercontext(NULL, pwd, uid, (unsigned)
|
||||
LOGIN_SETALL & ~LOGIN_SETUSER & ~LOGIN_SETGROUP) != 0)
|
||||
log_warn("unable to setusercontext %s: %s",
|
||||
cfg->username, strerror(errno));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
22 Aug 2013: Wouter
|
||||
- more fixes that I overlooked.
|
||||
- review fixes from Willem.
|
||||
|
||||
21 Aug 2013: Wouter
|
||||
- Fix#520: Errors found by static analysis from Tomas Hozza(redhat).
|
||||
|
|
|
|||
|
|
@ -321,6 +321,8 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
|
|||
}
|
||||
#ifdef UNBOUND_DEBUG
|
||||
n =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
rbtree_insert(&mesh->all, &s->node);
|
||||
log_assert(n != NULL);
|
||||
|
|
@ -390,6 +392,8 @@ mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo,
|
|||
}
|
||||
#ifdef UNBOUND_DEBUG
|
||||
n =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
rbtree_insert(&mesh->all, &s->node);
|
||||
log_assert(n != NULL);
|
||||
|
|
@ -450,6 +454,8 @@ void mesh_new_prefetch(struct mesh_area* mesh, struct query_info* qinfo,
|
|||
}
|
||||
#ifdef UNBOUND_DEBUG
|
||||
n =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
rbtree_insert(&mesh->all, &s->node);
|
||||
log_assert(n != NULL);
|
||||
|
|
@ -657,6 +663,8 @@ void mesh_detach_subs(struct module_qstate* qstate)
|
|||
RBTREE_FOR(ref, struct mesh_state_ref*, &qstate->mesh_info->sub_set) {
|
||||
#ifdef UNBOUND_DEBUG
|
||||
n =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
rbtree_delete(&ref->s->super_set, &lookup);
|
||||
log_assert(n != NULL); /* must have been present */
|
||||
|
|
@ -693,6 +701,8 @@ int mesh_attach_sub(struct module_qstate* qstate, struct query_info* qinfo,
|
|||
}
|
||||
#ifdef UNBOUND_DEBUG
|
||||
n =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
rbtree_insert(&mesh->all, &sub->node);
|
||||
log_assert(n != NULL);
|
||||
|
|
@ -701,6 +711,8 @@ int mesh_attach_sub(struct module_qstate* qstate, struct query_info* qinfo,
|
|||
/* set new query state to run */
|
||||
#ifdef UNBOUND_DEBUG
|
||||
n =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
rbtree_insert(&mesh->run, &sub->run_node);
|
||||
log_assert(n != NULL);
|
||||
|
|
@ -749,6 +761,8 @@ int mesh_state_attachment(struct mesh_state* super, struct mesh_state* sub)
|
|||
}
|
||||
#ifdef UNBOUND_DEBUG
|
||||
n =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
rbtree_insert(&super->sub_set, &subref->node);
|
||||
log_assert(n != NULL); /* we checked above if statement, the reverse
|
||||
|
|
|
|||
|
|
@ -1210,6 +1210,8 @@ serviced_create(struct outside_network* outnet, ldns_buffer* buff, int dnssec,
|
|||
sq->to_be_deleted = 0;
|
||||
#ifdef UNBOUND_DEBUG
|
||||
ins =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
rbtree_insert(outnet->serviced, &sq->node);
|
||||
log_assert(ins != NULL); /* must not be already present */
|
||||
|
|
@ -1449,6 +1451,8 @@ serviced_callbacks(struct serviced_query* sq, int error, struct comm_point* c,
|
|||
size_t backlen = 0;
|
||||
#ifdef UNBOUND_DEBUG
|
||||
rbnode_t* rem =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
/* remove from tree, and schedule for deletion, so that callbacks
|
||||
* can safely deregister themselves and even create new serviced
|
||||
|
|
@ -1866,6 +1870,8 @@ void outnet_serviced_query_stop(struct serviced_query* sq, void* cb_arg)
|
|||
if(!sq->cblist && !sq->to_be_deleted) {
|
||||
#ifdef UNBOUND_DEBUG
|
||||
rbnode_t* rem =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
rbtree_delete(sq->outnet->serviced, sq);
|
||||
log_assert(rem); /* should be present */
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
|
|||
#endif
|
||||
|
||||
/* random initial value */
|
||||
static uint32_t raninit = 0xdeadbeef;
|
||||
static uint32_t raninit = (uint32_t)0xdeadbeef;
|
||||
|
||||
void
|
||||
hash_set_raninit(uint32_t v)
|
||||
|
|
|
|||
|
|
@ -881,6 +881,8 @@ print_id(FILE* out, char* fname, struct module_env* env,
|
|||
ldns_buffer_clear(env->scratch_buffer);
|
||||
#ifdef UNBOUND_DEBUG
|
||||
s =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
ldns_rdf2buffer_str_dname(env->scratch_buffer, &rdf);
|
||||
log_assert(s == LDNS_STATUS_OK);
|
||||
|
|
|
|||
|
|
@ -242,6 +242,8 @@ anchor_new_ta(struct val_anchors* anchors, uint8_t* name, int namelabs,
|
|||
}
|
||||
#ifdef UNBOUND_DEBUG
|
||||
r =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
rbtree_insert(anchors->tree, &ta->node);
|
||||
if(lockit) {
|
||||
|
|
|
|||
|
|
@ -713,6 +713,8 @@ nsec3_hash_name(rbtree_t* table, struct regional* region, ldns_buffer* buf,
|
|||
return r;
|
||||
#ifdef UNBOUND_DEBUG
|
||||
n =
|
||||
#else
|
||||
(void)
|
||||
#endif
|
||||
rbtree_insert(table, &c->node);
|
||||
log_assert(n); /* cannot be duplicate, just did lookup */
|
||||
|
|
|
|||
Loading…
Reference in a new issue