diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-07-06 03:39:12 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-07-10 01:36:07 +0200 |
commit | abb6c01519a0318d7165dc9dc5b7d185353f93d6 (patch) | |
tree | 3b6fa1fc13fba77efc13ee3283c3e6c145bd4252 | |
parent | 493ae7a6bb0c3ad50615db0090e7ae8d391bc327 (diff) |
replace usage of whitelist with allowlist
Background and motivation:
https://tools.ietf.org/html/draft-knodel-terminology-02
[API CHANGE] officecfg::Office::Common::Misc::OpenCLWhiteList -> OpenCLAllowList
Change-Id: I65636b19b13e4af1e4851f70e78053f3443d6bb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98181
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
39 files changed, 180 insertions, 181 deletions
diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects index 11f587363f90..89b46d16cd2e 100755 --- a/bin/check-elf-dynamic-objects +++ b/bin/check-elf-dynamic-objects @@ -84,106 +84,106 @@ files=$(find "${check_path}/program" "${check_path}/sdk/bin" -type f) # all RPATHs should point to ${INSTDIR}/program so that's the files they find programfiles=$(echo ${files} | grep -o '/program/[^/]* ' | xargs -n 1 basename) -# whitelists should contain only system libraries that have a good reputation +# allowlists should contain only system libraries that have a good reputation # of maintaining ABI stability -# allow extending the whitelist using the environment variable to be able to work +# allow extending the allowlist using the environment variable to be able to work # on the installer stuff without the need for a baseline setup -globalwhitelist="ld-linux-x86-64.so.2 ld-linux.so.2 libc.so.6 libm.so.6 libdl.so.2 libpthread.so.0 librt.so.1 libutil.so.1 libnsl.so.1 libcrypt.so.1 libgcc_s.so.1 libstdc++.so.6 libz.so.1 libfontconfig.so.1 libfreetype.so.6 libxml2.so.2 libxslt.so.1 libexslt.so.0 ${LO_ELFCHECK_WHITELIST-}" -x11whitelist="libX11.so.6 libX11-xcb.so.1 libXext.so.6 libSM.so.6 libICE.so.6 libXinerama.so.1 libXrender.so.1 libXrandr.so.2 libcairo.so.2" -openglwhitelist="libGL.so.1" -giowhitelist="libgio-2.0.so.0 libgobject-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 libglib-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3" -gstreamerwhitelist="libgstaudio-1.0.so.0 libgstpbutils-1.0.so.0 libgstvideo-1.0.so.0 libgstbase-1.0.so.0 libgstreamer-1.0.so.0" -gtk3whitelist="libgtk-3.so.0 libgdk-3.so.0 libcairo-gobject.so.2 libpangocairo-1.0.so.0 libfribidi.so.0 libatk-1.0.so.0 libcairo.so.2 libgio-2.0.so.0 libpangoft2-1.0.so.0 libpango-1.0.so.0 libfontconfig.so.1 libfreetype.so.6 libgdk_pixbuf-2.0.so.0 libgobject-2.0.so.0 libglib-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3 libharfbuzz.so.0" -qt5whitelist="libQt5Core.so.5 libQt5Gui.so.5 libQt5Network.so.5 libQt5Widgets.so.5 libQt5X11Extras.so.5 libcairo.so.2 libglib-2.0.so.0 libgobject-2.0.so.0 libxcb.so.1 libxcb-icccm.so.4" -kf5whitelist="libKF5ConfigCore.so.5 libKF5CoreAddons.so.5 libKF5I18n.so.5 libKF5KIOCore.so.5 libKF5KIOFileWidgets.so.5 libKF5KIOWidgets.so.5 libKF5WindowSystem.so.5" -avahiwhitelist="libdbus-glib-1.so.2 libdbus-1.so.3 libgobject-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 libglib-2.0.so.0 libavahi-common.so.3 libavahi-client.so.3" -kerberoswhitelist="libgssapi_krb5.so.2 libcom_err.so.2 libkrb5.so.3" -dconfwhitelist="libdconf.so.1 libgio-2.0.so.0 libglib-2.0.so.0 libgobject-2.0.so.0" +globalallowlist="ld-linux-x86-64.so.2 ld-linux.so.2 libc.so.6 libm.so.6 libdl.so.2 libpthread.so.0 librt.so.1 libutil.so.1 libnsl.so.1 libcrypt.so.1 libgcc_s.so.1 libstdc++.so.6 libz.so.1 libfontconfig.so.1 libfreetype.so.6 libxml2.so.2 libxslt.so.1 libexslt.so.0 ${LO_ELFCHECK_ALLOWLIST-}" +x11allowlist="libX11.so.6 libX11-xcb.so.1 libXext.so.6 libSM.so.6 libICE.so.6 libXinerama.so.1 libXrender.so.1 libXrandr.so.2 libcairo.so.2" +openglallowlist="libGL.so.1" +gioallowlist="libgio-2.0.so.0 libgobject-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 libglib-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3" +gstreamerallowlist="libgstaudio-1.0.so.0 libgstpbutils-1.0.so.0 libgstvideo-1.0.so.0 libgstbase-1.0.so.0 libgstreamer-1.0.so.0" +gtk3allowlist="libgtk-3.so.0 libgdk-3.so.0 libcairo-gobject.so.2 libpangocairo-1.0.so.0 libfribidi.so.0 libatk-1.0.so.0 libcairo.so.2 libgio-2.0.so.0 libpangoft2-1.0.so.0 libpango-1.0.so.0 libfontconfig.so.1 libfreetype.so.6 libgdk_pixbuf-2.0.so.0 libgobject-2.0.so.0 libglib-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3 libharfbuzz.so.0" +qt5allowlist="libQt5Core.so.5 libQt5Gui.so.5 libQt5Network.so.5 libQt5Widgets.so.5 libQt5X11Extras.so.5 libcairo.so.2 libglib-2.0.so.0 libgobject-2.0.so.0 libxcb.so.1 libxcb-icccm.so.4" +kf5allowlist="libKF5ConfigCore.so.5 libKF5CoreAddons.so.5 libKF5I18n.so.5 libKF5KIOCore.so.5 libKF5KIOFileWidgets.so.5 libKF5KIOWidgets.so.5 libKF5WindowSystem.so.5" +avahiallowlist="libdbus-glib-1.so.2 libdbus-1.so.3 libgobject-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 libglib-2.0.so.0 libavahi-common.so.3 libavahi-client.so.3" +kerberosallowlist="libgssapi_krb5.so.2 libcom_err.so.2 libkrb5.so.3" +dconfallowlist="libdconf.so.1 libgio-2.0.so.0 libglib-2.0.so.0 libgobject-2.0.so.0" check_one_file() { local file="$1" skip=0 - whitelist="${globalwhitelist}" + allowlist="${globalallowlist}" case "${file}" in */sdk/docs/*) # skip the majority of files, no ELF binaries here skip=1 ;; */_uuid.cpython-*.so) - whitelist="${whitelist} libuuid.so.1" + allowlist="${allowlist} libuuid.so.1" ;; */libcairo.so.2) - whitelist="${whitelist} ${x11whitelist} libxcb-shm.so.0 libxcb.so.1 libxcb-render.so.0" + allowlist="${allowlist} ${x11allowlist} libxcb-shm.so.0 libxcb.so.1 libxcb-render.so.0" ;; */libcairocanvaslo.so) - whitelist="${whitelist} libcairo.so.2" + allowlist="${allowlist} libcairo.so.2" ;; */libucpgio1lo.so|*/liblosessioninstalllo.so|*/libevoablo.so) - whitelist="${whitelist} ${giowhitelist}" + allowlist="${allowlist} ${gioallowlist}" ;; */libavmediagst.so) - whitelist="${whitelist} ${gtk3whitelist} ${gstreamerwhitelist}" + allowlist="${allowlist} ${gtk3allowlist} ${gstreamerallowlist}" ;; */libvclplug_kf5lo.so|*/libkf5be1lo.so) if [ "$ENABLE_KF5" = TRUE ]; then - whitelist="${whitelist} ${qt5whitelist} ${kf5whitelist}" + allowlist="${allowlist} ${qt5allowlist} ${kf5allowlist}" fi ;; */libvclplug_gtk3lo.so|*/updater) - whitelist="${whitelist} ${x11whitelist} ${gtk3whitelist}" + allowlist="${allowlist} ${x11allowlist} ${gtk3allowlist}" ;; */libvclplug_qt5lo.so) if [ "$ENABLE_QT5" = TRUE ]; then - whitelist="${whitelist} ${qt5whitelist}" + allowlist="${allowlist} ${qt5allowlist}" fi ;; */libvclplug_gtk3_kde5lo.so) if [ "$ENABLE_GTK3_KDE5" = TRUE ]; then - whitelist="${whitelist} ${x11whitelist} ${gtk3whitelist} ${qt5whitelist} ${kf5whitelist}" + allowlist="${allowlist} ${x11allowlist} ${gtk3allowlist} ${qt5allowlist} ${kf5allowlist}" fi ;; */lo_kde5filepicker) if [ "$ENABLE_GTK3_KDE5" = TRUE ]; then - whitelist="${whitelist} ${x11whitelist} ${gtk3whitelist} ${qt5whitelist} \ - ${kf5whitelist}" + allowlist="${allowlist} ${x11allowlist} ${gtk3allowlist} ${qt5allowlist} \ + ${kf5allowlist}" fi ;; */libdesktop_detectorlo.so|*/ui-previewer|*/oosplash|*/gengal.bin) - whitelist="${whitelist} ${x11whitelist}" + allowlist="${allowlist} ${x11allowlist}" ;; */libvclplug_genlo.so|*/libchartcorelo.so|*/libavmediaogl.so|*/libOGLTranslo.so|*/liboglcanvaslo.so) - whitelist="${whitelist} ${x11whitelist} ${openglwhitelist}" + allowlist="${allowlist} ${x11allowlist} ${openglallowlist}" ;; */libvcllo.so) - whitelist="${whitelist} ${x11whitelist} ${openglwhitelist} ${giowhitelist} libcups.so.2" + allowlist="${allowlist} ${x11allowlist} ${openglallowlist} ${gioallowlist} libcups.so.2" ;; */libsofficeapp.so) - whitelist="${whitelist} ${x11whitelist} ${openglwhitelist} ${giowhitelist} libcups.so.2" + allowlist="${allowlist} ${x11allowlist} ${openglallowlist} ${gioallowlist} libcups.so.2" ;; */liblibreofficekitgtk.so) - whitelist="${whitelist} ${gtk3whitelist}" + allowlist="${allowlist} ${gtk3allowlist}" ;; */libsdlo.so) - whitelist="${whitelist} ${avahiwhitelist}" + allowlist="${allowlist} ${avahiallowlist}" ;; */libskialo.so) - whitelist="${whitelist} ${openglwhitelist} ${x11whitelist}" + allowlist="${allowlist} ${openglallowlist} ${x11allowlist}" ;; */libofficebean.so) - whitelist="${whitelist} libjawt.so" + allowlist="${allowlist} libjawt.so" ;; */libpostgresql-sdbc-impllo.so) - whitelist="${whitelist} ${kerberoswhitelist}" + allowlist="${allowlist} ${kerberosallowlist}" ;; */libconfigmgrlo.so) if [ "$ENABLE_DCONF" = TRUE ]; then - whitelist="${whitelist} ${dconfwhitelist}" + allowlist="${allowlist} ${dconfallowlist}" fi ;; */libmergedlo.so) - whitelist="${whitelist} ${x11whitelist} ${openglwhitelist} ${giowhitelist} libcups.so.2 libcairo.so.2" + allowlist="${allowlist} ${x11allowlist} ${openglallowlist} ${gioallowlist} libcups.so.2 libcairo.so.2" ;; esac if test "${skip}" = 0 && readelf -d "${file}" &> /dev/null ; then @@ -192,7 +192,7 @@ local file="$1" neededsinternal= for needed in ${neededs} do - if ! echo ${whitelist} | grep -q -w "${needed}" ; then + if ! echo ${allowlist} | grep -q -w "${needed}" ; then neededsinternal="${neededsinternal} ${needed}" if ! echo ${programfiles} | grep -q -w "${needed}" ; then echo "${file}" has suspicious NEEDED: "${needed}" diff --git a/bin/find-german-comments b/bin/find-german-comments index bb76941c118d..f26de960f2d9 100755 --- a/bin/find-german-comments +++ b/bin/find-german-comments @@ -210,7 +210,7 @@ class Parser: def first_elem(self, path): """ - Returns the root directory in our repo of a given path, so we can check against the whitelist. + Returns the root directory in our repo of a given path, so we can check against the allowlist. """ lastElem = os.path.dirname(path) done = False @@ -227,7 +227,7 @@ class Parser: checks each _tracked_ file in a directory recursively """ - # top-level project directory -> use whitelist. + # top-level project directory -> use allowlist. globalscan = False if os.path.exists(directory + "/.git/config"): globalscan = True @@ -240,7 +240,7 @@ class Parser: sock.close() # Helps to speedup a global scan - directory_whitelist = { + directory_allowlist = { "ure" : 1, "ios" : 1, "bean" : 1, @@ -376,17 +376,17 @@ class Parser: for path in lines: baseDir = self.first_elem(path) - # If we have a globalscan use the whitelist. + # If we have a globalscan use the allowlist. if globalscan: - if not baseDir in directory_whitelist: + if not baseDir in directory_allowlist: sys.stderr.write("\n - Error: Missing path %s -\n\n" % baseDir) sys.exit(1) - elif directory_whitelist[baseDir] is 0: + elif directory_allowlist[baseDir] is 0: self.check_file(path.strip()) num_checked = num_checked + 1 - elif directory_whitelist[baseDir] is 1: - sys.stderr.write("Skipping whitelisted directory %s\n" % baseDir) - directory_whitelist[baseDir] = 2 + elif directory_allowlist[baseDir] is 1: + sys.stderr.write("Skipping excluded directory %s\n" % baseDir) + directory_allowlist[baseDir] = 2 elif not globalscan: self.check_file(path.strip()) num_checked = num_checked + 1 diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx index 3659ac3b7380..0c8667c5f7ea 100644 --- a/canvas/source/directx/dx_9rm.cxx +++ b/canvas/source/directx/dx_9rm.cxx @@ -617,7 +617,7 @@ namespace dxcanvas return false; maPageSize = ::basegfx::B2IVector(aCaps.MaxTextureWidth,aCaps.MaxTextureHeight); - // check device against white & denylist entries + // check device against allow & denylist entries D3DADAPTER_IDENTIFIER9 aIdent; if(FAILED(mpDirect3D9->GetAdapterIdentifier(nAdapter,0,&aIdent))) return false; diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx index 236f326be09b..8f26be08c49d 100644 --- a/comphelper/source/misc/lok.cxx +++ b/comphelper/source/misc/lok.cxx @@ -206,7 +206,7 @@ const LanguageTag& getLanguageTag() return rLanguage; } -bool isWhitelistedLanguage(const OUString& lang) +bool isAllowlistedLanguage(const OUString& lang) { if (!isActive()) return true; @@ -216,37 +216,37 @@ bool isWhitelistedLanguage(const OUString& lang) return true; #else static bool bInitialized = false; - static std::vector<OUString> aWhitelist; + static std::vector<OUString> aAllowlist; if (!bInitialized) { // coverity[tainted_data] - we trust the contents of this variable - const char* pWhitelist = getenv("LOK_WHITELIST_LANGUAGES"); - if (pWhitelist) + const char* pAllowlist = getenv("LOK_ALLOWLIST_LANGUAGES"); + if (pAllowlist) { - std::stringstream stream(pWhitelist); + std::stringstream stream(pAllowlist); std::string s; - std::cerr << "Whitelisted languages: "; + std::cerr << "Allowlisted languages: "; while (getline(stream, s, ' ')) { if (s.length() == 0) continue; std::cerr << s << " "; - aWhitelist.emplace_back(OStringToOUString(s.c_str(), RTL_TEXTENCODING_UTF8)); + aAllowlist.emplace_back(OStringToOUString(s.c_str(), RTL_TEXTENCODING_UTF8)); } std::cerr << std::endl; } - if (aWhitelist.empty()) - std::cerr << "No language whitelisted, turning off the language support." << std::endl; + if (aAllowlist.empty()) + std::cerr << "No language allowlisted, turning off the language support." << std::endl; bInitialized = true; } - if (aWhitelist.empty()) + if (aAllowlist.empty()) return false; - for (const auto& entry : aWhitelist) + for (const auto& entry : aAllowlist) { if (lang.startsWith(entry)) return true; diff --git a/compilerplugins/clang/bufferadd.cxx b/compilerplugins/clang/bufferadd.cxx index ab619f523622..fd32d4874e64 100644 --- a/compilerplugins/clang/bufferadd.cxx +++ b/compilerplugins/clang/bufferadd.cxx @@ -342,7 +342,7 @@ bool BufferAdd::isSideEffectFree(Expr const* expr) if (name == "OUStringToOString" || name == "OStringToOUString") if (isSideEffectFree(callExpr->getArg(0))) return true; - // whitelist some known-safe methods + // allowlist some known-safe methods if (name.endswith("ResId") || name == "GetXMLToken") if (isSideEffectFree(callExpr->getArg(0))) return true; diff --git a/compilerplugins/clang/noexceptmove.cxx b/compilerplugins/clang/noexceptmove.cxx index b2679024e97b..c2cbdcf0c2a3 100644 --- a/compilerplugins/clang/noexceptmove.cxx +++ b/compilerplugins/clang/noexceptmove.cxx @@ -265,7 +265,7 @@ llvm::Optional<bool> NoExceptMove::IsCallThrows(const CallExpr* callExpr) else m_CannotFix.back() = true; } - // Whitelist of functions that could be noexcept, but we can't change them because of backwards-compatibility reasons + // Allowlist of functions that could be noexcept, but we can't change them because of backwards-compatibility reasons // css::uno::XInterface::acquire // css::uno::XInterface::release if (calleeFunctionDecl->getIdentifier()) @@ -305,7 +305,7 @@ llvm::Optional<bool> NoExceptMove::IsCallThrows(const CallExpr* callExpr) return llvm::Optional<bool>(); } - // whitelist of functions that could be noexcept, but we can't change them because of backwards-compatibility reasons + // allowlist of functions that could be noexcept, but we can't change them because of backwards-compatibility reasons if (auto typedefType = calleeType->getAs<TypedefType>()) if (typedefType->getDecl()->getName() == "uno_ReleaseMappingFunc") return false; diff --git a/compilerplugins/clang/staticvar.cxx b/compilerplugins/clang/staticvar.cxx index ca1a3b81d37e..10f38f5f71ea 100644 --- a/compilerplugins/clang/staticvar.cxx +++ b/compilerplugins/clang/staticvar.cxx @@ -172,11 +172,11 @@ bool StaticVar::VisitVarDecl(VarDecl const* varDecl) return true; if (varDecl->isLocalVarDecl()) - report(DiagnosticsEngine::Warning, "var should be static const, or whitelisted", + report(DiagnosticsEngine::Warning, "var should be static const, or allowlisted", varDecl->getLocation()) << varDecl->getSourceRange(); else - report(DiagnosticsEngine::Warning, "var should be const, or whitelisted", + report(DiagnosticsEngine::Warning, "var should be const, or allowlisted", varDecl->getLocation()) << varDecl->getSourceRange(); } diff --git a/compilerplugins/clang/store/deletedspecial.cxx b/compilerplugins/clang/store/deletedspecial.cxx index bb6eb5cc6c43..52e717d340e7 100644 --- a/compilerplugins/clang/store/deletedspecial.cxx +++ b/compilerplugins/clang/store/deletedspecial.cxx @@ -42,7 +42,7 @@ public: bool VisitCXXMethodDecl(CXXMethodDecl const * decl); private: - bool whitelist( + bool allowlist( CXXMethodDecl const * decl, std::string const & name, std::string const & path); }; @@ -64,8 +64,8 @@ bool DeletedSpecial::VisitCXXMethodDecl(CXXMethodDecl const * decl) { } std::string desc; if (decl->isCopyAssignmentOperator()) { - if (whitelist(decl, "ImpGraphic", "vcl/inc/impgraph.hxx") - || whitelist(decl, "SwSubFont", "sw/source/core/inc/swfont.hxx")) + if (allowlist(decl, "ImpGraphic", "vcl/inc/impgraph.hxx") + || allowlist(decl, "SwSubFont", "sw/source/core/inc/swfont.hxx")) { return true; } @@ -76,24 +76,24 @@ bool DeletedSpecial::VisitCXXMethodDecl(CXXMethodDecl const * decl) { CXXConstructorDecl const * ctor = dyn_cast<CXXConstructorDecl>(decl); CXXRecordDecl const * cls = getClass(decl); if (ctor != nullptr && ctor->isCopyConstructor()) { - if (whitelist(decl, "ImpGraphic", "vcl/inc/impgraph.hxx") - || whitelist(decl, "SbMethod", "include/basic/sbmeth.hxx") - || whitelist(decl, "ScDBCollection::NamedDBs", "sc/inc/dbdata.hxx") - || whitelist(decl, "ScDrawPage", "sc/inc/drawpage.hxx") - || whitelist(decl, "SmEditSource", "starmath/source/accessibility.hxx") - || whitelist(decl, "SwChartDataSequence", "sw/inc/unochart.hxx") - || whitelist(decl, "SwDPage", "sw/inc/dpage.hxx") - || whitelist(decl, "SwRedlineExtraData_Format", "sw/inc/redline.hxx") - || whitelist(decl, "SwRedlineExtraData_FormattingChanges", "sw/inc/redline.hxx") - || whitelist(decl, "SwTextAPIEditSource", "sw/source/core/inc/textapi.hxx") - || whitelist(decl, "XclImpBiff5Decrypter", "sc/source/filter/inc/xistream.hxx") - || whitelist(decl, "XclImpBiff8Decrypter", "sc/source/filter/inc/xistream.hxx") - || whitelist(decl, "configmgr::LocalizedPropertyNode", "configmgr/source/localizedpropertynode.hxx") - || whitelist(decl, "configmgr::LocalizedValueNode", "configmgr/source/localizedvaluenode.hxx") - || whitelist(decl, "configmgr::PropertyNode", "configmgr/source/propertynode.hxx") - || whitelist(decl, "oox::xls::BiffDecoder_RCF", "sc/source/filter/inc/biffcodec.hxx") - || whitelist(decl, "oox::xls::BiffDecoder_XOR", "sc/source/filter/inc/biffcodec.hxx") - || whitelist(decl, "rptui::OReportPage", "reportdesign/inc/RptPage.hxx")) + if (allowlist(decl, "ImpGraphic", "vcl/inc/impgraph.hxx") + || allowlist(decl, "SbMethod", "include/basic/sbmeth.hxx") + || allowlist(decl, "ScDBCollection::NamedDBs", "sc/inc/dbdata.hxx") + || allowlist(decl, "ScDrawPage", "sc/inc/drawpage.hxx") + || allowlist(decl, "SmEditSource", "starmath/source/accessibility.hxx") + || allowlist(decl, "SwChartDataSequence", "sw/inc/unochart.hxx") + || allowlist(decl, "SwDPage", "sw/inc/dpage.hxx") + || allowlist(decl, "SwRedlineExtraData_Format", "sw/inc/redline.hxx") + || allowlist(decl, "SwRedlineExtraData_FormattingChanges", "sw/inc/redline.hxx") + || allowlist(decl, "SwTextAPIEditSource", "sw/source/core/inc/textapi.hxx") + || allowlist(decl, "XclImpBiff5Decrypter", "sc/source/filter/inc/xistream.hxx") + || allowlist(decl, "XclImpBiff8Decrypter", "sc/source/filter/inc/xistream.hxx") + || allowlist(decl, "configmgr::LocalizedPropertyNode", "configmgr/source/localizedpropertynode.hxx") + || allowlist(decl, "configmgr::LocalizedValueNode", "configmgr/source/localizedvaluenode.hxx") + || allowlist(decl, "configmgr::PropertyNode", "configmgr/source/propertynode.hxx") + || allowlist(decl, "oox::xls::BiffDecoder_RCF", "sc/source/filter/inc/biffcodec.hxx") + || allowlist(decl, "oox::xls::BiffDecoder_XOR", "sc/source/filter/inc/biffcodec.hxx") + || allowlist(decl, "rptui::OReportPage", "reportdesign/inc/RptPage.hxx")) { return true; } @@ -103,22 +103,22 @@ bool DeletedSpecial::VisitCXXMethodDecl(CXXMethodDecl const * decl) { } else if (ctor != nullptr && ctor->isDefaultConstructor() && std::distance(cls->ctor_begin(), cls->ctor_end()) == 1) { - if (whitelist(decl, "AquaA11yFocusListener", "vcl/osx/a11yfocuslistener.hxx") - || whitelist(decl, "DocTemplLocaleHelper", "sfx2/source/doc/doctemplateslocal.hxx") - || whitelist(decl, "ScViewDataTable", "sc/source/filter/excel/../../ui/inc/viewdata.hxx") - || whitelist(decl, "ScViewDataTable", "sc/source/ui/inc/viewdata.hxx") - || whitelist(decl, "SwLineInfo", "sw/source/core/text/inftxt.hxx") - || whitelist(decl, "XRenderPeer", "vcl/unx/generic/gdi/xrender_peer.hxx") - || whitelist(decl, "desktop::DispatchWatcher", "desktop/source/app/dispatchwatcher.hxx") - || whitelist(decl, "desktop::RequestHandler", "desktop/source/app/officeipcthread.hxx") - || whitelist(decl, "desktop::RequestHandler", "desktop/source/lib/../app/officeipcthread.hxx") - || whitelist(decl, "sd::DiscoveryService", "sd/source/ui/remotecontrol/DiscoveryService.hxx") - || whitelist(decl, "sd::IconCache", "sd/source/ui/inc/tools/IconCache.hxx") - || whitelist(decl, "sd::RemoteServer", "sd/source/ui/inc/RemoteServer.hxx") - || whitelist(decl, "sd::slidesorter::cache::PageCacheManager", "sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx") - || whitelist(decl, "framework::CommandInfoProvider", "include/framework/commandinfoprovider.hxx") - || whitelist(decl, "vcl::SettingsConfigItem", "vcl/inc/configsettings.hxx") - || whitelist(decl, "writerfilter::ooxml::OOXMLFactory", "writerfilter/source/ooxml/OOXMLFactory.hxx")) + if (allowlist(decl, "AquaA11yFocusListener", "vcl/osx/a11yfocuslistener.hxx") + || allowlist(decl, "DocTemplLocaleHelper", "sfx2/source/doc/doctemplateslocal.hxx") + || allowlist(decl, "ScViewDataTable", "sc/source/filter/excel/../../ui/inc/viewdata.hxx") + || allowlist(decl, "ScViewDataTable", "sc/source/ui/inc/viewdata.hxx") + || allowlist(decl, "SwLineInfo", "sw/source/core/text/inftxt.hxx") + || allowlist(decl, "XRenderPeer", "vcl/unx/generic/gdi/xrender_peer.hxx") + || allowlist(decl, "desktop::DispatchWatcher", "desktop/source/app/dispatchwatcher.hxx") + || allowlist(decl, "desktop::RequestHandler", "desktop/source/app/officeipcthread.hxx") + || allowlist(decl, "desktop::RequestHandler", "desktop/source/lib/../app/officeipcthread.hxx") + || allowlist(decl, "sd::DiscoveryService", "sd/source/ui/remotecontrol/DiscoveryService.hxx") + || allowlist(decl, "sd::IconCache", "sd/source/ui/inc/tools/IconCache.hxx") + || allowlist(decl, "sd::RemoteServer", "sd/source/ui/inc/RemoteServer.hxx") + || allowlist(decl, "sd::slidesorter::cache::PageCacheManager", "sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx") + || allowlist(decl, "framework::CommandInfoProvider", "include/framework/commandinfoprovider.hxx") + || allowlist(decl, "vcl::SettingsConfigItem", "vcl/inc/configsettings.hxx") + || allowlist(decl, "writerfilter::ooxml::OOXMLFactory", "writerfilter/source/ooxml/OOXMLFactory.hxx")) { return true; } @@ -136,7 +136,7 @@ bool DeletedSpecial::VisitCXXMethodDecl(CXXMethodDecl const * decl) { return true; } -bool DeletedSpecial::whitelist( +bool DeletedSpecial::allowlist( CXXMethodDecl const * decl, std::string const & name, std::string const & path) { diff --git a/compilerplugins/clang/stringadd.cxx b/compilerplugins/clang/stringadd.cxx index e9df02bd10c0..288e19c95981 100644 --- a/compilerplugins/clang/stringadd.cxx +++ b/compilerplugins/clang/stringadd.cxx @@ -314,7 +314,7 @@ bool StringAdd::isSideEffectFree(Expr const* expr) if (name == "OUStringToOString" || name == "OStringToOUString") if (isSideEffectFree(callExpr->getArg(0))) return true; - // whitelist some known-safe methods + // allowlist some known-safe methods if (name.endswith("ResId") || name == "GetXMLToken") if (isSideEffectFree(callExpr->getArg(0))) return true; diff --git a/compilerplugins/clang/test/staticvar.cxx b/compilerplugins/clang/test/staticvar.cxx index 639e6cce46d3..3ae040a2e5a0 100644 --- a/compilerplugins/clang/test/staticvar.cxx +++ b/compilerplugins/clang/test/staticvar.cxx @@ -19,7 +19,7 @@ struct S1 S1 const& f1(int a) { static S1 s1[]{ - // expected-error@-1 {{var should be static const, or whitelisted [loplugin:staticvar]}} + // expected-error@-1 {{var should be static const, or allowlisted [loplugin:staticvar]}} { 1, 1 } }; // no warning expected diff --git a/compilerplugins/clang/test/useuniqueptr.cxx b/compilerplugins/clang/test/useuniqueptr.cxx index 3d4f62d5dfa8..f169959d650b 100644 --- a/compilerplugins/clang/test/useuniqueptr.cxx +++ b/compilerplugins/clang/test/useuniqueptr.cxx @@ -195,17 +195,17 @@ class Foo14 { void Foo15(int * p) { - delete p; // expected-error {{calling delete on a pointer param, should be either whitelisted or simplified [loplugin:useuniqueptr]}} + delete p; // expected-error {{calling delete on a pointer param, should be either allowlisted or simplified [loplugin:useuniqueptr]}} }; class Foo16 { Foo16(int * p) { - delete p; // expected-error {{calling delete on a pointer param, should be either whitelisted or simplified [loplugin:useuniqueptr]}} + delete p; // expected-error {{calling delete on a pointer param, should be either allowlisted or simplified [loplugin:useuniqueptr]}} }; void foo(int * p) { - delete p; // expected-error {{calling delete on a pointer param, should be either whitelisted or simplified [loplugin:useuniqueptr]}} + delete p; // expected-error {{calling delete on a pointer param, should be either allowlisted or simplified [loplugin:useuniqueptr]}} }; }; diff --git a/compilerplugins/clang/unusedvariableplus.cxx b/compilerplugins/clang/unusedvariableplus.cxx index fa0e9e3992b1..e3e5000d0627 100644 --- a/compilerplugins/clang/unusedvariableplus.cxx +++ b/compilerplugins/clang/unusedvariableplus.cxx @@ -15,7 +15,7 @@ #include <unordered_set> /* - * Very aggressive unused variable checker, we whitelist types that are known + * Very aggressive unused variable checker, we allowlist types that are known * good when unused. */ diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx index 564e81c442e7..3445510a206d 100644 --- a/compilerplugins/clang/useuniqueptr.cxx +++ b/compilerplugins/clang/useuniqueptr.cxx @@ -1296,7 +1296,7 @@ void UseUniquePtr::CheckDeleteParmVar(const CXXDeleteExpr* deleteExpr, const Par */ report( DiagnosticsEngine::Warning, - "calling delete on a pointer param, should be either whitelisted or simplified", + "calling delete on a pointer param, should be either allowlisted or simplified", compat::getBeginLoc(deleteExpr)) << deleteExpr->getSourceRange(); } diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx index 305defbf014e..61805ff5ad03 100644 --- a/compilerplugins/clang/vclwidgets.cxx +++ b/compilerplugins/clang/vclwidgets.cxx @@ -366,7 +366,7 @@ bool VCLWidgets::VisitVarDecl(const VarDecl * pVarDecl) { return true; if (loplugin::isSamePathname(aFileName, SRCDIR "/vcl/source/window/layout.cxx")) return true; - // whitelist the valid things that can contain pointers. + // allowlist the valid things that can contain pointers. // It is containing stuff like std::unique_ptr we get worried if (pVarDecl->getType()->isArrayType()) { return true; diff --git a/compilerplugins/clang/weakobject.cxx b/compilerplugins/clang/weakobject.cxx index afa652befc1a..055110ef9331 100644 --- a/compilerplugins/clang/weakobject.cxx +++ b/compilerplugins/clang/weakobject.cxx @@ -133,7 +133,7 @@ public: } } - // whitelist + // allowlist auto tc = loplugin::TypeCheck(pMethodDecl->getParent()); if ( tc.Class("OWeakAggObject").Namespace("cppu").GlobalNamespace() // conditional call || tc.Class("WeakComponentImplHelperBase").Namespace("cppu").GlobalNamespace() // extra magic diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b69986d0ad01..7365e52db5a2 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5979,7 +5979,7 @@ static void preloadData() // Hack to load and cache the module liblocaledata_others.so which is not loaded normally // (when loading dictionaries of just non-Asian locales). Creating a XCalendar4 of one Asian locale // will cheaply load this missing "others" locale library. Appending an Asian locale in - // LOK_WHITELIST_LANGUAGES env-var also works but at the cost of loading that dictionary. + // LOK_ALLOWLIST_LANGUAGES env-var also works but at the cost of loading that dictionary. css::uno::Reference< css::i18n::XCalendar4 > xCal = css::i18n::LocaleCalendar2::create(comphelper::getProcessComponentContext()); css::lang::Locale aAsianLocale = {"hi", "IN", ""}; xCal->loadDefaultCalendar(aAsianLocale); diff --git a/include/comphelper/lok.hxx b/include/comphelper/lok.hxx index dfbc1a2ce6c0..a457c47b00a5 100644 --- a/include/comphelper/lok.hxx +++ b/include/comphelper/lok.hxx @@ -109,7 +109,7 @@ COMPHELPER_DLLPUBLIC void setLanguageTag(const LanguageTag& languageTag); /// Get the current LOK's language. COMPHELPER_DLLPUBLIC const LanguageTag& getLanguageTag(); /// If the language name should be used for this LOK instance. -COMPHELPER_DLLPUBLIC bool isWhitelistedLanguage(const OUString& lang); +COMPHELPER_DLLPUBLIC bool isAllowlistedLanguage(const OUString& lang); // Status indicator handling. Even if in theory there could be several status indicators active at // the same time, in practice there is only one at a time, so we don't handle any identification of diff --git a/include/opencl/openclconfig.hxx b/include/opencl/openclconfig.hxx index c1b73a66485a..7247b4fa6e62 100644 --- a/include/opencl/openclconfig.hxx +++ b/include/opencl/openclconfig.hxx @@ -77,7 +77,7 @@ struct OPENCL_DLLPUBLIC OpenCLConfig typedef std::set<ImplMatcher> ImplMatcherSet; ImplMatcherSet maDenyList; - ImplMatcherSet maWhiteList; + ImplMatcherSet maAllowList; OpenCLConfig(); diff --git a/libreofficekit/qa/tilebench/tilebench.cxx b/libreofficekit/qa/tilebench/tilebench.cxx index 54a05c653e34..f2fbd1752c75 100644 --- a/libreofficekit/qa/tilebench/tilebench.cxx +++ b/libreofficekit/qa/tilebench/tilebench.cxx @@ -582,7 +582,7 @@ int main( int argc, char* argv[] ) if (pre_init) { aTimes.emplace_back("pre-initialization"); - setenv("LOK_WHITELIST_LANGUAGES", "en_US", 0); + setenv("LOK_ALLOWLIST_LANGUAGES", "en_US", 0); // coverity[tainted_string] - build time test tool lok_preinit(argv[1], user_url.c_str()); aTimes.emplace_back(); diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 04fc7d8e2b0d..3a6a39e92a12 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -162,7 +162,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales() { for (auto const& locale : aLocaleNames) { - if (!comphelper::LibreOfficeKit::isWhitelistedLanguage(locale)) + if (!comphelper::LibreOfficeKit::isAllowlistedLanguage(locale)) continue; aLocaleNamesSet.insert(locale); diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index e165d0962918..b24b8beb51f4 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -139,7 +139,7 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales() { for (const auto& rLocaleName : dict.aLocaleNames) { - if (!comphelper::LibreOfficeKit::isWhitelistedLanguage(rLocaleName)) + if (!comphelper::LibreOfficeKit::isAllowlistedLanguage(rLocaleName)) continue; aLocaleNamesSet.insert( rLocaleName ); diff --git a/offapi/util/types-whitelist b/offapi/util/types-whitelist deleted file mode 100644 index 343bede08724..000000000000 --- a/offapi/util/types-whitelist +++ /dev/null @@ -1 +0,0 @@ --x /UCR/com/sun/star/drawing/TextFitToSizeType diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 5e6999d62089..867c73bbb024 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -5625,11 +5625,11 @@ <prop oor:name="OpenCLDenyList" oor:type="oor:string-list" oor:nillable="false"> <!-- UIHints: Tools - Options General OpenCL --> <info> - <desc>Combinations of (OS, OS version, OpenCL platform vendor, OpenCL device name, OpenCL driver version) that are known to be bad. Each entry is a string consisting of five parts separated by slashes. An empty part matches anything. In case a slash, percent or semicolon occurs inside a part, it is replaced by a percent followed by the corresponding number as two hex digits. The parts except OS can contain regular expressions. Inside these regular expressions the usual characters .*()[]\ are special and should be quoted with a backslash to be interpreted literally. OS should be just one of "Linux", "OS X" (including the space) or "Windows" (without quotes). Has higher priority than OpenCLWhiteList.</desc> + <desc>Combinations of (OS, OS version, OpenCL platform vendor, OpenCL device name, OpenCL driver version) that are known to be bad. Each entry is a string consisting of five parts separated by slashes. An empty part matches anything. In case a slash, percent or semicolon occurs inside a part, it is replaced by a percent followed by the corresponding number as two hex digits. The parts except OS can contain regular expressions. Inside these regular expressions the usual characters .*()[]\ are special and should be quoted with a backslash to be interpreted literally. OS should be just one of "Linux", "OS X" (including the space) or "Windows" (without quotes). Has higher priority than OpenCLAllowList.</desc> </info> <value oor:separator=";">Windows//Intel\(R\) Corporation//9\.17\.10\.2884;Windows//Intel\(R\) Corporation//4\.2\.0\.99;Windows//Intel\(R\) Corporation//5\.2\.0\.10049;Windows//Intel\(R\) Corporation//3\.0\.1\.10891</value> </prop> - <prop oor:name="OpenCLWhiteList" oor:type="oor:string-list" oor:nillable="false"> + <prop oor:name="OpenCLAllowList" oor:type="oor:string-list" oor:nillable="false"> <!-- UIHints: Tools - Options General OpenCL --> <info> <desc>Like OpenCLDenyList, but for combinations known to be good.</desc> diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 36b361db9a3b..babc65ac88c7 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -340,7 +340,7 @@ void ConstraintAtom::accept( LayoutAtomVisitor& rVisitor ) void ConstraintAtom::parseConstraint(std::vector<Constraint>& rConstraints, bool bRequireForName) const { - // Whitelist for cases where empty forName is handled. + // Allowlist for cases where empty forName is handled. if (bRequireForName) { switch (maConstraint.mnType) diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 09c5bc386eac..6ca713ade63d 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -585,14 +585,14 @@ static bool lcl_IsOnDenylist(OUString const & rShapeType) return std::find(vDenylist.begin(), vDenylist.end(), rShapeType) != vDenylist.end(); } -static bool lcl_IsOnWhitelist(OUString const & rShapeType) +static bool lcl_IsOnAllowlist(OUString const & rShapeType) { - static const std::initializer_list<OUStringLiteral> vWhitelist = { + static const std::initializer_list<OUStringLiteral> vAllowlist = { "heart", "puzzle" }; - return std::find(vWhitelist.begin(), vWhitelist.end(), rShapeType) != vWhitelist.end(); + return std::find(vAllowlist.begin(), vAllowlist.end(), rShapeType) != vAllowlist.end(); } static bool lcl_GetHandlePosition( sal_Int32 &nValue, const EnhancedCustomShapeParameter &rParam, Sequence< EnhancedCustomShapeAdjustmentValue > &rSeq) @@ -813,14 +813,14 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape ) // we also export non-ooxml shapes which have handles/equations to custom geometry, because // we cannot convert ODF equations to DrawingML equations. TODO: see what binary DOC export filter does. // but our WritePolyPolygon()/WriteCustomGeometry() functions are incomplete, therefore we use a denylist - // we use a whitelist for shapes where mapping to MSO preset shape is not optimal + // we use a allowlist for shapes where mapping to MSO preset shape is not optimal bool bCustGeom = true; bool bOnDenylist = false; if( sShapeType == "ooxml-non-primitive" ) bCustGeom = true; else if( sShapeType.startsWith("ooxml") ) bCustGeom = false; - else if( lcl_IsOnWhitelist(sShapeType) ) + else if( lcl_IsOnAllowlist(sShapeType) ) bCustGeom = true; else if( lcl_IsOnDenylist(sShapeType) ) { diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx index 971c63ee3fe0..f0f4a07fe6b1 100644 --- a/opencl/source/opencl_device.cxx +++ b/opencl/source/opencl_device.cxx @@ -345,7 +345,7 @@ int pickBestDevice(std::unique_ptr<ds_profile> const & profile) { ds_device& device = profile->devices[d]; - // Check denylist and whitelist for actual devices + // Check denylist and allowlist for actual devices if (device.eType == DeviceType::OpenCLDevice) { // There is a silly impedance mismatch here. Why do we @@ -360,10 +360,10 @@ int pickBestDevice(std::unique_ptr<ds_profile> const & profile) aDevice.maName = OStringToOUString(device.sDeviceName, RTL_TEXTENCODING_UTF8); aDevice.maDriver = OStringToOUString(device.sDriverVersion, RTL_TEXTENCODING_UTF8); - // If denylisted or not whitelisted, ignore it + // If denylisted or not allowlisted, ignore it if (OpenCLConfig::get().checkImplementation(aPlatform, aDevice)) { - SAL_INFO("opencl.device", "Device[" << d << "] " << device.sDeviceName << " is denylisted or not whitelisted"); + SAL_INFO("opencl.device", "Device[" << d << "] " << device.sDeviceName << " is denylisted or not allowlisted"); device.fTime = DBL_MAX; device.bErrors = false; } diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx index 9a4b1d6bc4c0..46f1ef90a576 100644 --- a/opencl/source/openclconfig.cxx +++ b/opencl/source/openclconfig.cxx @@ -31,19 +31,19 @@ OpenCLConfig::OpenCLConfig() : maDenyList.insert(ImplMatcher("Windows", "", "Intel\\(R\\) Corporation", "", "9\\.17\\.10\\.2884")); // This is what I have tested on Linux and it works for our unit tests. - maWhiteList.insert(ImplMatcher("Linux", "", "Advanced Micro Devices, Inc\\.", "", "1445\\.5 \\(sse2,avx\\)")); + maAllowList.insert(ImplMatcher("Linux", "", "Advanced Micro Devices, Inc\\.", "", "1445\\.5 \\(sse2,avx\\)")); // For now, assume that AMD, Intel and NVIDIA drivers are good - maWhiteList.insert(ImplMatcher("", "", "Advanced Micro Devices, Inc\\.", "", "")); - maWhiteList.insert(ImplMatcher("", "", "Intel\\(R\\) Corporation", "", "")); - maWhiteList.insert(ImplMatcher("", "", "NVIDIA Corporation", "", "")); + maAllowList.insert(ImplMatcher("", "", "Advanced Micro Devices, Inc\\.", "", "")); + maAllowList.insert(ImplMatcher("", "", "Intel\\(R\\) Corporation", "", "")); + maAllowList.insert(ImplMatcher("", "", "NVIDIA Corporation", "", "")); } bool OpenCLConfig::operator== (const OpenCLConfig& r) const { return (mbUseOpenCL == r.mbUseOpenCL && maDenyList == r.maDenyList && - maWhiteList == r.maWhiteList); + maAllowList == r.maAllowList); } bool OpenCLConfig::operator!= (const OpenCLConfig& r) const @@ -181,7 +181,7 @@ OpenCLConfig OpenCLConfig::get() result.mbUseOpenCL = officecfg::Office::Common::Misc::UseOpenCL::get(); result.maDenyList = StringSequenceToSetOfImplMatcher(officecfg::Office::Common::Misc::OpenCLDenyList::get()); - result.maWhiteList = StringSequenceToSetOfImplMatcher(officecfg::Office::Common::Misc::OpenCLWhiteList::get()); + result.maAllowList = StringSequenceToSetOfImplMatcher(officecfg::Office::Common::Misc::OpenCLAllowList::get()); return result; } @@ -192,7 +192,7 @@ void OpenCLConfig::set() officecfg::Office::Common::Misc::UseOpenCL::set(mbUseOpenCL, batch); officecfg::Office::Common::Misc::OpenCLDenyList::set(SetOfImplMatcherToStringSequence(maDenyList), batch); - officecfg::Office::Common::Misc::OpenCLWhiteList::set(SetOfImplMatcherToStringSequence(maWhiteList), batch); + officecfg::Office::Common::Misc::OpenCLAllowList::set(SetOfImplMatcherToStringSequence(maAllowList), batch); batch->commit(); } @@ -206,8 +206,8 @@ bool OpenCLConfig::checkImplementation(const OpenCLPlatformInfo& rPlatform, cons return true; } - // Check for whitelist of known good OpenCL implementations - if (match(maWhiteList, rPlatform, rDevice, "whitelist")) + // Check for allowlist of known good OpenCL implementations + if (match(maAllowList, rPlatform, rDevice, "allowlist")) { SAL_INFO("opencl", "Approving"); return false; @@ -223,7 +223,7 @@ std::ostream& operator<<(std::ostream& rStream, const OpenCLConfig& rConfig) rStream << "{" "UseOpenCL=" << (rConfig.mbUseOpenCL ? "YES" : "NO") << "," "DenyList=" << rConfig.maDenyList << "," - "WhiteList=" << rConfig.maWhiteList << + "AllowList=" << rConfig.maAllowList << "}"; return rStream; } diff --git a/solenv/gbuild/platform/filter-showIncludes.awk b/solenv/gbuild/platform/filter-showIncludes.awk index b8a1db052701..7803e376c9ed 100755 --- a/solenv/gbuild/platform/filter-showIncludes.awk +++ b/solenv/gbuild/platform/filter-showIncludes.awk @@ -32,9 +32,9 @@ BEGIN { showincludes_prefix = "Note: including file:" } - # to match especially drive letters in whitelist case insensitive + # to match especially drive letters in allowlist case insensitive IGNORECASE = 1 - whitelist = \ + allowlist = \ "^(" ENVIRON["SRCDIR"] "|" ENVIRON["WORKDIR"] ")" firstline = 1 } @@ -54,7 +54,7 @@ BEGIN { gsub(/\\/, "/") gsub(/ /, "\\ ") - if ($0 ~ whitelist) { # filter out system headers + if ($0 ~ allowlist) { # filter out system headers if (!($0 in incfiles)) { incfiles[$0] print " " $0 " \\" > tempfile diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 1112129ae02d..27a361484e28 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -47,12 +47,12 @@ protected: */ bool mustValidate(const char* filename) const override { - const char* aWhitelist[] = { + const char* aAllowlist[] = { "paragraph-mark-nonempty.odt" }; - std::vector<const char*> vWhitelist(aWhitelist, aWhitelist + SAL_N_ELEMENTS(aWhitelist)); + std::vector<const char*> vAllowlist(aAllowlist, aAllowlist + SAL_N_ELEMENTS(aAllowlist)); - return std::find(vWhitelist.begin(), vWhitelist.end(), filename) != vWhitelist.end(); + return std::find(vAllowlist.begin(), vAllowlist.end(), filename) != vAllowlist.end(); } }; diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx index 3ea718c07f6c..1676fa8c09e5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx @@ -55,16 +55,16 @@ protected: */ bool mustValidate(const char* filename) const override { - const char* aWhitelist[] = { + const char* aAllowlist[] = { "page-graphic-background.odt", "zoom.docx", "empty.odt", "fdo38244.docx", "comments-nested.odt" }; - std::vector<const char*> vWhitelist(aWhitelist, aWhitelist + SAL_N_ELEMENTS(aWhitelist)); + std::vector<const char*> vAllowlist(aAllowlist, aAllowlist + SAL_N_ELEMENTS(aAllowlist)); - return std::find(vWhitelist.begin(), vWhitelist.end(), filename) != vWhitelist.end(); + return std::find(vAllowlist.begin(), vAllowlist.end(), filename) != vAllowlist.end(); } }; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 1f4684e3f255..76d067390cf1 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -5986,7 +5986,7 @@ static bool lcl_guessQFormat(const OUString& rName, sal_uInt16 nWwId) nWwId == ww::stiEmphasis ) return true; - static o3tl::sorted_vector<OUString, OUStringIgnoreCase> const aWhitelist + static o3tl::sorted_vector<OUString, OUStringIgnoreCase> const aAllowlist { "No Spacing", "List Paragraph", @@ -6000,7 +6000,7 @@ static bool lcl_guessQFormat(const OUString& rName, sal_uInt16 nWwId) "TOC Heading", }; // Not custom style? Then we have a list of standard styles which should be qFormat. - return aWhitelist.find(rName) != aWhitelist.end(); + return aAllowlist.find(rName) != aAllowlist.end(); } void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType, diff --git a/vcl/inc/driverblocklist.hxx b/vcl/inc/driverblocklist.hxx index a3564bd1ab79..d8f8a40dfdbd 100644 --- a/vcl/inc/driverblocklist.hxx +++ b/vcl/inc/driverblocklist.hxx @@ -77,7 +77,7 @@ enum VersionComparisonOp struct DriverInfo { DriverInfo(OperatingSystem os, const OUString& vendor, VersionComparisonOp op, - uint64_t driverVersion, bool bWhiteListed = false, + uint64_t driverVersion, bool bAllowListed = false, const char* suggestedVersion = nullptr); DriverInfo(); @@ -86,7 +86,7 @@ struct DriverInfo OUString maAdapterVendor; std::vector<OUString> maDevices; - bool mbWhitelisted; + bool mbAllowlisted; VersionComparisonOp meComparisonOp; @@ -113,7 +113,7 @@ private: enum class BlockType { - WHITELIST, + ALLOWLIST, DENYLIST, UNKNOWN }; diff --git a/vcl/opengl/README.opengl b/vcl/opengl/README.opengl index ad5f31c9e5a8..d1b6cf2d1bd1 100644 --- a/vcl/opengl/README.opengl +++ b/vcl/opengl/README.opengl @@ -7,7 +7,7 @@ Environment variables used: SAL_USE_VCLPLUGIN - use the specified VCL plugin (GTK2 in this case - currently needed on Linux because the default GTK3 doesn't support OpenGL yet) -SAL_FORCEGL - enable OpenGL even if the card is whitelisted. +SAL_FORCEGL - enable OpenGL even if the card would be excluded. Other variables: diff --git a/vcl/opengl/opengl_denylist_windows.xml b/vcl/opengl/opengl_denylist_windows.xml index 7419be7c5d8b..e2025c94a624 100644 --- a/vcl/opengl/opengl_denylist_windows.xml +++ b/vcl/opengl/opengl_denylist_windows.xml @@ -18,8 +18,8 @@ --> <root> - <whitelist> - </whitelist> + <allowlist> + </allowlist> <denylist> <entry os="all" vendor="intel" compare="less" version="10.18.14.4264"> <device id="all"/> diff --git a/vcl/qa/cppunit/blocklistparsertest.cxx b/vcl/qa/cppunit/blocklistparsertest.cxx index 1a22d61e3577..b79de071d319 100644 --- a/vcl/qa/cppunit/blocklistparsertest.cxx +++ b/vcl/qa/cppunit/blocklistparsertest.cxx @@ -46,46 +46,46 @@ void BlocklistParserTest::testParse() size_t i = 0; - for (bool bIsWhitelisted : {true, false}) + for (bool bIsAllowlisted : {true, false}) { DriverInfo& aDriveInfo = aDriveInfos[i++]; - CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted); + CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted); CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorAll), aDriveInfo.maAdapterVendor); // "all" CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_LESS_THAN, aDriveInfo.meComparisonOp); CPPUNIT_ASSERT_EQUAL(V(10,20,30,40), aDriveInfo.mnDriverVersion); aDriveInfo = aDriveInfos[i++]; - CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted); + CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted); CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorNVIDIA), aDriveInfo.maAdapterVendor); CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_EQUAL, aDriveInfo.meComparisonOp); aDriveInfo = aDriveInfos[i++]; - CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted); + CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted); CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorMicrosoft), aDriveInfo.maAdapterVendor); CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_NOT_EQUAL, aDriveInfo.meComparisonOp); aDriveInfo = aDriveInfos[i++]; - CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted); + CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted); CPPUNIT_ASSERT_EQUAL(OUString("0xcafe"), aDriveInfo.maAdapterVendor); CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_NOT_EQUAL, aDriveInfo.meComparisonOp); aDriveInfo = aDriveInfos[i++]; - CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted); + CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted); CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorAll), aDriveInfo.maAdapterVendor); CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_BETWEEN_EXCLUSIVE, aDriveInfo.meComparisonOp); aDriveInfo = aDriveInfos[i++]; - CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted); + CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted); CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorAll), aDriveInfo.maAdapterVendor); CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_BETWEEN_INCLUSIVE, aDriveInfo.meComparisonOp); aDriveInfo = aDriveInfos[i++]; - CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted); + CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted); CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorAll), aDriveInfo.maAdapterVendor); CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_BETWEEN_INCLUSIVE_START, aDriveInfo.meComparisonOp); aDriveInfo = aDriveInfos[i++]; - CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted); + CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted); CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorAll), aDriveInfo.maAdapterVendor); CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_COMPARISON_IGNORED, aDriveInfo.meComparisonOp); } diff --git a/vcl/qa/cppunit/test_blocklist_evaluate.xml b/vcl/qa/cppunit/test_blocklist_evaluate.xml index 7c0527f849ec..9184a9c9bd30 100644 --- a/vcl/qa/cppunit/test_blocklist_evaluate.xml +++ b/vcl/qa/cppunit/test_blocklist_evaluate.xml @@ -18,8 +18,8 @@ --> <root> - <whitelist> - </whitelist> + <allowlist> + </allowlist> <denylist> <entry os="all" vendor="amd" compare="less" version="10.20.30.40"> diff --git a/vcl/qa/cppunit/test_blocklist_parse.xml b/vcl/qa/cppunit/test_blocklist_parse.xml index 212e61bd8443..9a0f6acc574f 100644 --- a/vcl/qa/cppunit/test_blocklist_parse.xml +++ b/vcl/qa/cppunit/test_blocklist_parse.xml @@ -8,7 +8,7 @@ --> <root> - <whitelist> + <allowlist> <entry os="all" vendor="all" compare="less" version="10.20.30.40"> <device id="all"/> </entry> @@ -33,7 +33,7 @@ <entry os="all"> <device id="all"/> </entry> - </whitelist> + </allowlist> <denylist> <entry os="all" vendor="all" compare="less" version="10.20.30.40"> <device id="all"/> diff --git a/vcl/skia/skia_denylist_vulkan.xml b/vcl/skia/skia_denylist_vulkan.xml index 4c62ca4b04a9..43143548cd5a 100644 --- a/vcl/skia/skia_denylist_vulkan.xml +++ b/vcl/skia/skia_denylist_vulkan.xml @@ -18,8 +18,8 @@ --> <root> - <whitelist> - </whitelist> + <allowlist> + </allowlist> <denylist> <entry os="all" vendor="intel" compare="less_equal" version="0.16.2"> <device id="all"/> diff --git a/vcl/source/helper/driverblocklist.cxx b/vcl/source/helper/driverblocklist.cxx index 09ce2f9b7165..49bc819b54d6 100644 --- a/vcl/source/helper/driverblocklist.cxx +++ b/vcl/source/helper/driverblocklist.cxx @@ -372,13 +372,13 @@ void Parser::handleDevices(DriverInfo& rDriver, xmlreader::XmlReader& rReader) void Parser::handleEntry(DriverInfo& rDriver, xmlreader::XmlReader& rReader) { - if (meBlockType == BlockType::WHITELIST) + if (meBlockType == BlockType::ALLOWLIST) { - rDriver.mbWhitelisted = true; + rDriver.mbAllowlisted = true; } else if (meBlockType == BlockType::DENYLIST) { - rDriver.mbWhitelisted = false; + rDriver.mbAllowlisted = false; } else if (meBlockType == BlockType::UNKNOWN) { @@ -484,9 +484,9 @@ void Parser::handleContent(xmlreader::XmlReader& rReader) if (res == xmlreader::XmlReader::Result::Begin) { - if (name == "whitelist") + if (name == "allowlist") { - meBlockType = BlockType::WHITELIST; + meBlockType = BlockType::ALLOWLIST; handleList(rReader); } else if (name == "denylist") @@ -504,7 +504,7 @@ void Parser::handleContent(xmlreader::XmlReader& rReader) } else if (res == xmlreader::XmlReader::Result::End) { - if (name == "whitelist" || name == "denylist") + if (name == "allowlist" || name == "denylist") { meBlockType = BlockType::UNKNOWN; } @@ -562,7 +562,7 @@ const uint64_t allDriverVersions = ~(uint64_t(0)); DriverInfo::DriverInfo() : meOperatingSystem(DRIVER_OS_UNKNOWN) , maAdapterVendor(GetVendorId(VendorAll)) - , mbWhitelisted(false) + , mbAllowlisted(false) , meComparisonOp(DRIVER_COMPARISON_IGNORED) , mnDriverVersion(0) , mnDriverVersionMax(0) @@ -570,11 +570,11 @@ DriverInfo::DriverInfo() } DriverInfo::DriverInfo(OperatingSystem os, const OUString& vendor, VersionComparisonOp op, - uint64_t driverVersion, bool bWhitelisted, + uint64_t driverVersion, bool bAllowlisted, const char* suggestedVersion /* = nullptr */) : meOperatingSystem(os) , maAdapterVendor(vendor) - , mbWhitelisted(bWhitelisted) + , mbAllowlisted(bAllowlisted) , meComparisonOp(op) , mnDriverVersion(driverVersion) , mnDriverVersionMax(0) @@ -658,9 +658,9 @@ bool FindBlocklistedDeviceInList(std::vector<DriverInfo>& aDeviceInfos, if (match || aDeviceInfos[i].mnDriverVersion == allDriverVersions) { // white listed drivers - if (aDeviceInfos[i].mbWhitelisted) + if (aDeviceInfos[i].mbAllowlisted) { - SAL_INFO("vcl.driver", "whitelisted driver"); + SAL_INFO("vcl.driver", "allowlisted driver"); return false; } |