summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLove Hörnquist Åstrand <lha@kth.se>2009-07-03 04:25:29 +0000
committerLove Hörnquist Åstrand <lha@kth.se>2009-07-03 04:25:29 +0000
commit5c104ef172e974a7eec47c65dd76d6b030bed2a1 (patch)
tree190b266435da00f388936e147ab7409b7f232273
parentf65f1f26ef9eaf746bddba03d583302dc1836f8d (diff)
downloadsamba-5c104ef172e974a7eec47c65dd76d6b030bed2a1.tar.gz
add ->hdb_password and ->hdb_auth_status
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25298 ec53bebd-3082-4978-b11e-865c3cabbd6b
-rw-r--r--lib/hdb/hdb.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/hdb/hdb.h b/lib/hdb/hdb.h
index d67bd16f2fa..1bf5a6233c5 100644
--- a/lib/hdb/hdb.h
+++ b/lib/hdb/hdb.h
@@ -56,6 +56,13 @@ enum hdb_lockop{ HDB_RLOCK, HDB_WLOCK };
/* hdb_capability_flags */
#define HDB_CAP_F_HANDLE_ENTERPRISE_PRINCIPAL 1
+#define HDB_CAP_F_HANDLE_PASSWORDS 2
+#define HDB_CAP_F_PASSWORD_UPDATE_KEYS 4
+
+/* auth status values */
+#define HDB_AUTH_SUCCESS 0
+#define HDB_AUTH_WRONG_PASSWORD 1
+#define HDB_AUTH_INVALID_SIGNATURE 2
/* key usage for master key */
#define HDB_KU_MKEY 0x484442
@@ -185,6 +192,30 @@ typedef struct HDB{
* point for the module.
*/
krb5_error_code (*hdb_destroy)(krb5_context, struct HDB*);
+ /**
+ * Change password.
+ *
+ * Will update keys for the entry when given password. The new
+ * keys must be written into the entry and and will then later be
+ * ->hdb_store() into the database. The backend will still perform
+ * all other operations, increasing the kvno, and update
+ * modification timestamp.
+ *
+ * The backen need to call _kadm5_set_keys() and perform password
+ * quality checks.
+ */
+ krb5_error_code (*hdb_password)(krb5_context, struct HDB*, hdb_entry_ex*, const char *, int);
+
+ /**
+ * Auth feedback
+ *
+ * This is a feedback call that allows backends that provides
+ * lockout functionality to register failure and/or successes.
+ *
+ * In case the entry is locked out, the backend should set the
+ * hdb_entry.flags.locked-out flag.
+ */
+ krb5_error_code (*hdb_auth_status)(krb5_context, struct HDB *, hdb_entry_ex *, int);
}HDB;
#define HDB_INTERFACE_VERSION 5