mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
mit_samba: Add function for handling bad password count
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
9734b5d9ed
commit
23c249a88b
@ -33,6 +33,7 @@
|
||||
#include "kdc/db-glue.h"
|
||||
#include "auth/auth.h"
|
||||
#include "kdc/kpasswd_glue.h"
|
||||
#include "auth/auth_sam.h"
|
||||
|
||||
#include "mit_samba.h"
|
||||
|
||||
@ -688,3 +689,30 @@ out:
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
void mit_samba_zero_bad_password_count(krb5_db_entry *db_entry)
|
||||
{
|
||||
struct samba_kdc_entry *p;
|
||||
struct ldb_dn *domain_dn;
|
||||
|
||||
p = (struct samba_kdc_entry *)db_entry->e_data;
|
||||
|
||||
domain_dn = ldb_get_default_basedn(p->kdc_db_ctx->samdb);
|
||||
|
||||
authsam_logon_success_accounting(p->kdc_db_ctx->samdb,
|
||||
p->msg,
|
||||
domain_dn,
|
||||
true);
|
||||
}
|
||||
|
||||
|
||||
void mit_samba_update_bad_password_count(krb5_db_entry *db_entry)
|
||||
{
|
||||
struct samba_kdc_entry *p;
|
||||
|
||||
p = (struct samba_kdc_entry *)db_entry->e_data;
|
||||
|
||||
authsam_update_bad_pwd_count(p->kdc_db_ctx->samdb,
|
||||
p->msg,
|
||||
ldb_get_default_basedn(p->kdc_db_ctx->samdb));
|
||||
}
|
||||
|
@ -79,4 +79,8 @@ int mit_samba_kpasswd_change_password(struct mit_samba_context *ctx,
|
||||
char *pwd,
|
||||
krb5_db_entry *db_entry);
|
||||
|
||||
void mit_samba_zero_bad_password_count(krb5_db_entry *db_entry);
|
||||
|
||||
void mit_samba_update_bad_password_count(krb5_db_entry *db_entry);
|
||||
|
||||
#endif /* _MIT_SAMBA_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user