entropy.c \
error.c \
event.c \
+ fsaccess_common.c \
glob.c \
hash.c \
hp.c \
pthreads/mutex.c \
pthreads/thread.c \
entropy_private.h \
+ fsaccess_common_p.h \
mem_p.h \
task_p.h \
timer_p.h
#include <stdbool.h>
#include <isc/fsaccess.h>
-#include <isc/print.h>
#include <isc/result.h>
+#include <isc/types.h>
#include <isc/util.h>
-/*!
- * Shorthand. Maybe ISC__FSACCESS_PERMISSIONBITS should not even be in
- * <isc/fsaccess.h>. Could check consistency with sizeof(isc_fsaccess_t)
- * and the number of bits in each function.
- */
-#define STEP (ISC__FSACCESS_PERMISSIONBITS)
-#define GROUP (STEP)
-#define OTHER (STEP * 2)
+#include "fsaccess_common_p.h"
void
isc_fsaccess_add(int trustee, int permission, isc_fsaccess_t *access) {
}
}
-static isc_result_t
-check_bad_bits(isc_fsaccess_t access, bool is_dir) {
+isc_result_t
+isc__fsaccess_check_bad_bits(isc_fsaccess_t access, bool is_dir) {
isc_fsaccess_t bits;
/*
--- /dev/null
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+#pragma once
+
+/*!
+ * Shorthand. Maybe ISC__FSACCESS_PERMISSIONBITS should not even be in
+ * <isc/fsaccess.h>. Could check consistency with sizeof(isc_fsaccess_t)
+ * and the number of bits in each function.
+ */
+#define STEP (ISC__FSACCESS_PERMISSIONBITS)
+#define GROUP (STEP)
+#define OTHER (STEP * 2)
+
+isc_result_t
+isc__fsaccess_check_bad_bits(isc_fsaccess_t access, bool is_dir);
#include <errno.h>
#include <stdbool.h>
#include <sys/stat.h>
-#include <sys/types.h>
-#include "errno2result.h"
+#include <isc/fsaccess.h>
+#include <isc/result.h>
+#include <isc/types.h>
+#include <isc/util.h>
-/*! \file
- * \brief
- * The OS-independent part of the API is in lib/isc.
- */
-#include "../fsaccess.c"
+#include "../fsaccess_common_p.h"
+#include "errno2result.h"
isc_result_t
isc_fsaccess_set(const char *path, isc_fsaccess_t access) {
return (ISC_R_INVALIDFILE);
}
- result = check_bad_bits(access, is_dir);
+ result = isc__fsaccess_check_bad_bits(access, is_dir);
if (result != ISC_R_SUCCESS) {
return (result);
}
#include <sys/types.h>
#include <isc/file.h>
+#include <isc/fsaccess.h>
+#include <isc/result.h>
#include <isc/stat.h>
#include <isc/string.h>
+#include <isc/util.h>
+#include "../fsaccess_common_p.h"
#include "errno2result.h"
-/*
- * The OS-independent part of the API is in lib/isc.
- */
-#include "../fsaccess.c"
-
/* Store the user account name locally */
static char username[255] = "\0";
static DWORD namelen = 0;
return (ISC_R_INVALIDFILE);
}
- result = check_bad_bits(access, is_dir);
+ result = isc__fsaccess_check_bad_bits(access, is_dir);
if (result != ISC_R_SUCCESS) {
return (result);
}
<ClInclude Include="..\entropy_private.h">
<Filter>Win32 Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\fsaccess_common_p.h">
+ <Filter>Win32 Header Files</Filter>
+ </ClInclude>
<ClInclude Include="..\openssl_shim.h">
<Filter>Win32 Header Files</Filter>
</ClInclude>
<ClCompile Include="..\entropy.c">
<Filter>Library Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\fsaccess_common.c">
+ <Filter>Library Source Files</Filter>
+ </ClCompile>
<ClCompile Include="..\hash.c">
<Filter>Library Source Files</Filter>
</ClCompile>
<ClInclude Include="include\isc\time.h" />
<ClInclude Include="include\isc\win32os.h" />
<ClInclude Include="..\entropy_private.h" />
+ <ClInclude Include="..\fsaccess_common_p.h" />
<ClInclude Include="..\openssl_shim.h" />
<ClInclude Include="syslog.h" />
<ClInclude Include="unistd.h" />
<ClCompile Include="..\entropy.c" />
<ClCompile Include="..\error.c" />
<ClCompile Include="..\event.c" />
+ <ClCompile Include="..\fsaccess_common.c" />
<ClCompile Include="..\glob.c" />
<ClCompile Include="..\hash.c" />
<ClCompile Include="..\heap.c" />
./lib/isc/entropy_private.h C 2018,2019,2020
./lib/isc/error.c C 1998,1999,2000,2001,2004,2005,2007,2015,2016,2018,2019,2020
./lib/isc/event.c C 1998,1999,2000,2001,2004,2005,2007,2014,2016,2017,2018,2019,2020
-./lib/isc/fsaccess.c C 2000,2001,2004,2005,2007,2016,2017,2018,2019,2020
+./lib/isc/fsaccess_common.c C 2000,2001,2004,2005,2007,2016,2017,2018,2019,2020
+./lib/isc/fsaccess_common_p.h C 2000,2001,2004,2005,2007,2016,2017,2018,2019,2020
./lib/isc/glob.c C 2020
./lib/isc/hash.c C 2003,2004,2005,2006,2007,2009,2013,2014,2015,2016,2017,2018,2019,2020
./lib/isc/heap.c C 1997,1998,1999,2000,2001,2004,2005,2006,2007,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020