src/java.security.jgss/share/classes/sun/security/krb5/internal/rcache/DflCache.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
34 import java.nio.file.Files; |
34 import java.nio.file.Files; |
35 import java.nio.file.Path; |
35 import java.nio.file.Path; |
36 import java.nio.file.StandardCopyOption; |
36 import java.nio.file.StandardCopyOption; |
37 import java.nio.file.StandardOpenOption; |
37 import java.nio.file.StandardOpenOption; |
38 import java.nio.file.attribute.PosixFilePermission; |
38 import java.nio.file.attribute.PosixFilePermission; |
39 import java.security.AccessController; |
|
40 import java.util.*; |
39 import java.util.*; |
41 |
40 |
42 import sun.security.action.GetPropertyAction; |
41 import sun.security.action.GetPropertyAction; |
43 import sun.security.krb5.internal.KerberosTime; |
42 import sun.security.krb5.internal.KerberosTime; |
44 import sun.security.krb5.internal.Krb5; |
43 import sun.security.krb5.internal.Krb5; |
115 public DflCache (String source) { |
114 public DflCache (String source) { |
116 this.source = source; |
115 this.source = source; |
117 } |
116 } |
118 |
117 |
119 private static String defaultPath() { |
118 private static String defaultPath() { |
120 return AccessController.doPrivileged( |
119 return GetPropertyAction.privilegedGetProperty("java.io.tmpdir"); |
121 new GetPropertyAction("java.io.tmpdir")); |
|
122 } |
120 } |
123 |
121 |
124 private static String defaultFile(String server) { |
122 private static String defaultFile(String server) { |
125 // service/host@REALM -> service |
123 // service/host@REALM -> service |
126 int slash = server.indexOf('/'); |
124 int slash = server.indexOf('/'); |