jdk/src/solaris/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java
changeset 25396 5e73c95f95db
parent 23010 6dadb192ad81
equal deleted inserted replaced
25395:4c004dfa3340 25396:5e73c95f95db
    75     private String hostname;
    75     private String hostname;
    76     private static String defaultDomain; /* Domain to use if not specified by user */
    76     private static String defaultDomain; /* Domain to use if not specified by user */
    77 
    77 
    78     static {
    78     static {
    79         defaultDomain = java.security.AccessController.doPrivileged(
    79         defaultDomain = java.security.AccessController.doPrivileged(
    80             new sun.security.action.GetPropertyAction("http.auth.ntlm.domain",
    80             new sun.security.action.GetPropertyAction("http.auth.ntlm.domain", ""));
    81                                                       "domain"));
       
    82     };
    81     };
    83 
    82 
    84     public static boolean supportsTransparentAuth () {
    83     public static boolean supportsTransparentAuth () {
    85         return false;
    84         return false;
    86     }
    85     }
    98         hostname = java.security.AccessController.doPrivileged(
    97         hostname = java.security.AccessController.doPrivileged(
    99             new java.security.PrivilegedAction<String>() {
    98             new java.security.PrivilegedAction<String>() {
   100             public String run() {
    99             public String run() {
   101                 String localhost;
   100                 String localhost;
   102                 try {
   101                 try {
   103                     localhost = InetAddress.getLocalHost().getHostName().toUpperCase();
   102                     localhost = InetAddress.getLocalHost().getHostName();
   104                 } catch (UnknownHostException e) {
   103                 } catch (UnknownHostException e) {
   105                      localhost = "localhost";
   104                      localhost = "localhost";
   106                 }
   105                 }
   107                 return localhost;
   106                 return localhost;
   108             }
   107             }
   109         });
   108         });
   110         int x = hostname.indexOf ('.');
       
   111         if (x != -1) {
       
   112             hostname = hostname.substring (0, x);
       
   113         }
       
   114     };
   109     };
   115 
   110 
   116     PasswordAuthentication pw;
   111     PasswordAuthentication pw;
   117 
   112 
   118     Client client;
   113     Client client;