8177398: Exclude dot files ending with .conf from krb5.conf's includedir

Reviewed-by: mullan
This commit is contained in:
Weijun Wang 2018-01-26 09:37:10 +08:00
parent 6de0123fd7
commit 15ac25be9d
2 changed files with 8 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -578,7 +578,8 @@ public class Config {
if (Files.isDirectory(p)) continue;
String name = p.getFileName().toString();
if (name.matches("[a-zA-Z0-9_-]+") ||
name.endsWith(".conf")) {
(!name.startsWith(".") &&
name.endsWith(".conf"))) {
// if dir is absolute, so is p
readConfigFileLines(p, content, dups);
}