changepw.c (505d05c7) | changepw.c (159d09a2) |
---|---|
1/* | 1/* |
2 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. | 2 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
3 * Use is subject to license terms. 4 */ 5 | 3 * Use is subject to license terms. 4 */ 5 |
6#pragma ident "%Z%%M% %I% %E% SMI" | |
7 8/* 9 * lib/krb5/os/changepw.c 10 * 11 * Copyright 1990,1999 by the Massachusetts Institute of Technology. 12 * All Rights Reserved. 13 * 14 * Export of this software from the United States of America may --- 13 unchanged lines hidden (view full) --- 28 * fashion that it might be confused with the original M.I.T. software. 29 * M.I.T. makes no representations about the suitability of 30 * this software for any purpose. It is provided "as is" without express 31 * or implied warranty. 32 * 33 */ 34 35#define NEED_SOCKETS | 6 7/* 8 * lib/krb5/os/changepw.c 9 * 10 * Copyright 1990,1999 by the Massachusetts Institute of Technology. 11 * All Rights Reserved. 12 * 13 * Export of this software from the United States of America may --- 13 unchanged lines hidden (view full) --- 27 * fashion that it might be confused with the original M.I.T. software. 28 * M.I.T. makes no representations about the suitability of 29 * this software for any purpose. It is provided "as is" without express 30 * or implied warranty. 31 * 32 */ 33 34#define NEED_SOCKETS |
36#include <krb5.h> | |
37#include <k5-int.h> 38#include <kadm5/admin.h> 39#include <client_internal.h> 40#include <gssapi/gssapi.h> 41#include <gssapi_krb5.h> 42#include <gssapiP_krb5.h> | 35#include <k5-int.h> 36#include <kadm5/admin.h> 37#include <client_internal.h> 38#include <gssapi/gssapi.h> 39#include <gssapi_krb5.h> 40#include <gssapiP_krb5.h> |
41#include <krb5.h> |
|
43 44/* #include "adm_err.h" */ 45#include <stdio.h> 46#include <errno.h> 47 | 42 43/* #include "adm_err.h" */ 44#include <stdio.h> 45#include <errno.h> 46 |
48extern krb5_error_code krb5_mk_chpw_req(krb5_context context, | 47extern krb5_error_code krb5int_mk_chpw_req(krb5_context context, |
49 krb5_auth_context auth_context, 50 krb5_data *ap_req, char *passwd, 51 krb5_data *packet); 52 | 48 krb5_auth_context auth_context, 49 krb5_data *ap_req, char *passwd, 50 krb5_data *packet); 51 |
53extern krb5_error_code krb5_rd_chpw_rep(krb5_context context, | 52extern krb5_error_code krb5int_rd_chpw_rep(krb5_context context, |
54 krb5_auth_context auth_context, 55 krb5_data *packet, int *result_code, 56 krb5_data *result_data); 57 58/* 59 * _kadm5_get_kpasswd_protocol 60 * 61 * returns the password change protocol value to the caller. --- 201 unchanged lines hidden (view full) --- 263 264 if (code = krb5_auth_con_setaddrs(context, auth_context, 265 &local_kaddr, NULL)) 266 { 267 code = errno; 268 goto cleanup; 269 } 270 | 53 krb5_auth_context auth_context, 54 krb5_data *packet, int *result_code, 55 krb5_data *result_data); 56 57/* 58 * _kadm5_get_kpasswd_protocol 59 * 60 * returns the password change protocol value to the caller. --- 201 unchanged lines hidden (view full) --- 262 263 if (code = krb5_auth_con_setaddrs(context, auth_context, 264 &local_kaddr, NULL)) 265 { 266 code = errno; 267 goto cleanup; 268 } 269 |
271 if (code = krb5_mk_chpw_req(context, auth_context, | 270 if (code = krb5int_mk_chpw_req(context, auth_context, |
272 &ap_req, newpw, &chpw_req)) 273 { 274 code = errno; 275 goto cleanup; 276 } 277 278 if ((cc = sendto(s1, chpw_req.data, chpw_req.length, 0, 279 (struct sockaddr *)&addr_p[i], --- 41 unchanged lines hidden (view full) --- 321 s2 = INVALID_SOCKET; 322 323 chpw_rep.length = cc; 324 325 if (code = krb5_auth_con_setaddrs(context, auth_context, 326 NULL, &remote_kaddr)) 327 goto cleanup; 328 | 271 &ap_req, newpw, &chpw_req)) 272 { 273 code = errno; 274 goto cleanup; 275 } 276 277 if ((cc = sendto(s1, chpw_req.data, chpw_req.length, 0, 278 (struct sockaddr *)&addr_p[i], --- 41 unchanged lines hidden (view full) --- 320 s2 = INVALID_SOCKET; 321 322 chpw_rep.length = cc; 323 324 if (code = krb5_auth_con_setaddrs(context, auth_context, 325 NULL, &remote_kaddr)) 326 goto cleanup; 327 |
329 if (code = krb5_rd_chpw_rep(context, auth_context, &chpw_rep, | 328 if (code = krb5int_rd_chpw_rep(context, auth_context, &chpw_rep, |
330 &local_result_code, srvr_msg)) 331 goto cleanup; 332 333 if (srvr_rsp_code) 334 *srvr_rsp_code = local_result_code; 335 336 code = 0; 337 goto cleanup; --- 100 unchanged lines hidden --- | 329 &local_result_code, srvr_msg)) 330 goto cleanup; 331 332 if (srvr_rsp_code) 333 *srvr_rsp_code = local_result_code; 334 335 code = 0; 336 goto cleanup; --- 100 unchanged lines hidden --- |