< prev index next >

test/sun/security/krb5/config/Include.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8029994
  27  * @summary Support "include" and "includedir" in krb5.conf

  28  * @compile -XDignore.symbol.file Include.java
  29  * @run main/othervm Include
  30  */
  31 import sun.security.krb5.Config;
  32 import sun.security.krb5.KrbException;
  33 
  34 import java.nio.file.Files;
  35 import java.nio.file.Path;
  36 import java.nio.file.Paths;
  37 
  38 public class Include {
  39     public static void main(String[] args) throws Exception {
  40 
  41         String krb5Conf = "[section]\nkey=";        // Skeleton of a section
  42 
  43         Path conf = Paths.get("krb5.conf");         // base krb5.conf
  44 
  45         Path ifile = Paths.get("f");                // include f
  46         Path idir = Paths.get("x");                 // includedir fx
  47         Path idirdir = Paths.get("x/xx");           // sub dir, will be ignored




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8029994
  27  * @summary Support "include" and "includedir" in krb5.conf
  28  * @modules java.security.jgss/sun.security.krb5
  29  * @compile -XDignore.symbol.file Include.java
  30  * @run main/othervm Include
  31  */
  32 import sun.security.krb5.Config;
  33 import sun.security.krb5.KrbException;
  34 
  35 import java.nio.file.Files;
  36 import java.nio.file.Path;
  37 import java.nio.file.Paths;
  38 
  39 public class Include {
  40     public static void main(String[] args) throws Exception {
  41 
  42         String krb5Conf = "[section]\nkey=";        // Skeleton of a section
  43 
  44         Path conf = Paths.get("krb5.conf");         // base krb5.conf
  45 
  46         Path ifile = Paths.get("f");                // include f
  47         Path idir = Paths.get("x");                 // includedir fx
  48         Path idirdir = Paths.get("x/xx");           // sub dir, will be ignored


< prev index next >