1 /* |
1 /* |
2 * Portions Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. |
2 * Portions Copyright 2000-2009 Sun Microsystems, Inc. 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. Sun designates this |
7 * published by the Free Software Foundation. Sun designates this |
250 if (DEBUG) { |
250 if (DEBUG) { |
251 System.out.println("Kinit: PREAUTH FAILED/REQ, re-send AS-REQ"); |
251 System.out.println("Kinit: PREAUTH FAILED/REQ, re-send AS-REQ"); |
252 } |
252 } |
253 KRBError error = ke.getError(); |
253 KRBError error = ke.getError(); |
254 int etype = error.getEType(); |
254 int etype = error.getEType(); |
255 byte[] salt = error.getSalt(); |
255 String salt = error.getSalt(); |
256 byte[] s2kparams = error.getParams(); |
256 byte[] s2kparams = error.getParams(); |
257 if (useKeytab) { |
257 if (useKeytab) { |
258 as_req = new KrbAsReq(skeys, true, etype, salt, s2kparams, |
258 as_req = new KrbAsReq(skeys, true, etype, salt, |
259 opt, principal, sname, |
259 s2kparams, opt, principal, sname, |
260 null, null, null, null, addresses, null); |
260 null, null, null, null, addresses, null); |
261 } else { |
261 } else { |
262 as_req = new KrbAsReq(psswd, true, etype, salt, s2kparams, |
262 as_req = new KrbAsReq(psswd, true, etype, salt, |
263 opt, principal, sname, |
263 s2kparams, opt, principal, sname, |
264 null, null, null, null, addresses, null); |
264 null, null, null, null, addresses, null); |
265 } |
265 } |
266 as_rep = sendASRequest(as_req, useKeytab, realm, psswd, skeys); |
266 as_rep = sendASRequest(as_req, useKeytab, realm, psswd, skeys); |
267 } else { |
267 } else { |
268 throw ke; |
268 throw ke; |