LCOV - code coverage report
Current view: top level - source4/kdc/mit-kdb - kdb_samba_change_pwd.c (source / functions) Hit Total Coverage
Test: coverage report for vadcx-master-patch-75612 fe003de8 Lines: 0 9 0.0 %
Date: 2024-02-29 22:57:05 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /*
       2             :    Unix SMB/CIFS implementation.
       3             : 
       4             :    Samba KDB plugin for MIT Kerberos
       5             : 
       6             :    Copyright (c) 2010      Simo Sorce <idra@samba.org>.
       7             :    Copyright (c) 2014      Andreas Schneider <asn@samba.org>
       8             : 
       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.
      13             : 
      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.
      18             : 
      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/>.
      21             : */
      22             : 
      23             : #include "includes.h"
      24             : 
      25             : #include "system/kerberos.h"
      26             : 
      27             : #include <profile.h>
      28             : #include <kdb.h>
      29             : 
      30             : #include "kdc/mit_samba.h"
      31             : #include "kdb_samba.h"
      32             : 
      33             : #undef DBGC_CLASS
      34             : #define DBGC_CLASS DBGC_KERBEROS
      35             : 
      36           0 : 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)
      42             : {
      43             :         struct mit_samba_context *mit_ctx;
      44             :         krb5_error_code code;
      45             : 
      46           0 :         mit_ctx = ks_get_context(context);
      47           0 :         if (mit_ctx == NULL) {
      48           0 :                 return KRB5_KDB_DBNOTINITED;
      49             :         }
      50             : 
      51           0 :         code = mit_samba_kpasswd_change_password(mit_ctx, passwd, db_entry);
      52           0 :         if (code != 0) {
      53           0 :                 goto cleanup;
      54             :         }
      55             : 
      56           0 : cleanup:
      57             : 
      58           0 :         return code;
      59             : }

Generated by: LCOV version 1.14