diff options
Diffstat (limited to 'bin/named/unix')
| -rw-r--r-- | bin/named/unix/dlz_dlopen_driver.c | 8 | ||||
| -rw-r--r-- | bin/named/unix/os.c | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/bin/named/unix/dlz_dlopen_driver.c b/bin/named/unix/dlz_dlopen_driver.c index 2ba8a028a37a..e41cf00b77cb 100644 --- a/bin/named/unix/dlz_dlopen_driver.c +++ b/bin/named/unix/dlz_dlopen_driver.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2011-2014 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -243,11 +243,13 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]); if (cd->dl_path == NULL) { + result = ISC_R_NOMEMORY; goto failed; } cd->dlzname = isc_mem_strdup(cd->mctx, dlzname); if (cd->dlzname == NULL) { + result = ISC_R_NOMEMORY; goto failed; } @@ -277,6 +279,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], dlopen_log(ISC_LOG_ERROR, "dlz_dlopen failed to open library '%s' - %s", cd->dl_path, dlerror()); + result = ISC_R_FAILURE; goto failed; } @@ -295,6 +298,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], cd->dlz_findzonedb == NULL) { /* We're missing a required symbol */ + result = ISC_R_FAILURE; goto failed; } @@ -330,6 +334,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], "dlz_dlopen: incorrect version %d " "should be %d in '%s'", cd->version, DLZ_DLOPEN_VERSION, cd->dl_path); + result = ISC_R_FAILURE; goto failed; } @@ -373,7 +378,6 @@ failed: return (result); } - /* * Called when bind is shutting down */ diff --git a/bin/named/unix/os.c b/bin/named/unix/os.c index d6c82a764ad8..18e8c3910373 100644 --- a/bin/named/unix/os.c +++ b/bin/named/unix/os.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2011, 2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -197,8 +197,8 @@ linux_setcaps(cap_t caps) { #ifdef HAVE_LIBCAP #define SET_CAP(flag) \ do { \ - capval = (flag); \ cap_flag_value_t curval; \ + capval = (flag); \ err = cap_get_flag(curcaps, capval, CAP_PERMITTED, &curval); \ if (err != -1 && curval) { \ err = cap_set_flag(caps, CAP_EFFECTIVE, 1, &capval, CAP_SET); \ @@ -607,7 +607,7 @@ ns_os_changeuser(void) { } void -ns_os_adjustnofile() { +ns_os_adjustnofile(void) { #ifdef HAVE_LINUXTHREADS isc_result_t result; isc_resourcevalue_t newvalue; |
