summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2020-01-25 10:58:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2020-01-25 10:58:22 +0000
commit0ac8030da1523190a39de61b865c7e075f80ec50 (patch)
tree91dc6965dd756dce3f2b9438e468e7c648d869e4
parent94b334ca7d92e2b18bc9e16dd6b288c141021b4b (diff)
isc_file_isdirwritable is not used (and besides, it uses access() which
hints all possible uses are TOCTOU)
-rw-r--r--usr.sbin/bind/lib/isc/include/isc/file.h8
-rw-r--r--usr.sbin/bind/lib/isc/unix/file.c7
2 files changed, 2 insertions, 13 deletions
diff --git a/usr.sbin/bind/lib/isc/include/isc/file.h b/usr.sbin/bind/lib/isc/include/isc/file.h
index f1ca8f32f95..d523564f5d6 100644
--- a/usr.sbin/bind/lib/isc/include/isc/file.h
+++ b/usr.sbin/bind/lib/isc/include/isc/file.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: file.h,v 1.4 2020/01/20 18:51:53 florian Exp $ */
+/* $Id: file.h,v 1.5 2020/01/25 10:58:21 deraadt Exp $ */
#ifndef ISC_FILE_H
#define ISC_FILE_H 1
@@ -363,12 +363,6 @@ isc_file_munmap(void *addr, size_t len);
* this platform, then we simply free the memory.
*/
-isc_boolean_t
-isc_file_isdirwritable(const char *path);
-/*%<
- * Return true if the path is a directory and is writable
- */
-
ISC_LANG_ENDDECLS
#endif /* ISC_FILE_H */
diff --git a/usr.sbin/bind/lib/isc/unix/file.c b/usr.sbin/bind/lib/isc/unix/file.c
index b6ff1c7556e..f6be77670dc 100644
--- a/usr.sbin/bind/lib/isc/unix/file.c
+++ b/usr.sbin/bind/lib/isc/unix/file.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*/
-/* $Id: file.c,v 1.14 2020/01/22 13:02:10 florian Exp $ */
+/* $Id: file.c,v 1.15 2020/01/25 10:58:21 deraadt Exp $ */
/*! \file */
@@ -659,8 +659,3 @@ int
isc_file_munmap(void *addr, size_t len) {
return (munmap(addr, len));
}
-
-isc_boolean_t
-isc_file_isdirwritable(const char *path) {
- return (ISC_TF(access(path, W_OK|X_OK) == 0));
-}