2 Unix SMB/CIFS implementation.
4 Samba KDB plugin for MIT Kerberos
6 Copyright (c) 2010 Simo Sorce <idra@samba.org>.
7 Copyright (c) 2014 Andreas Schneider <asn@samba.org>
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #include "system/kerberos.h"
30 #include "kdc/mit_samba.h"
31 #include "kdb_samba.h"
34 #define DBGC_CLASS DBGC_KERBEROS
36 krb5_error_code
kdb_samba_change_pwd(krb5_context context
,
37 krb5_keyblock
*master_key
,
38 krb5_key_salt_tuple
*ks_tuple
,
39 int ks_tuple_count
, char *passwd
,
40 int new_kvno
, krb5_boolean keepold
,
41 krb5_db_entry
*db_entry
)
43 struct mit_samba_context
*mit_ctx
;
46 mit_ctx
= ks_get_context(context
);
47 if (mit_ctx
== NULL
) {
48 return KRB5_KDB_DBNOTINITED
;
51 code
= mit_samba_kpasswd_change_password(mit_ctx
, passwd
, db_entry
);