struct netr_Authenticator *return_authenticator,
enum dcerpc_AuthType auth_type,
enum dcerpc_AuthLevel auth_level,
+ NTSTATUS (*access_check_cb)(struct netlogon_creds_CredentialState *creds,
+ NTSTATUS step_status,
+ bool *store,
+ void *access_check_private),
+ void *access_check_private,
struct netlogon_creds_CredentialState **creds_out);
NTSTATUS schannel_get_challenge(struct loadparm_context *lp_ctx,
struct netr_Authenticator *return_authenticator,
enum dcerpc_AuthType auth_type,
enum dcerpc_AuthLevel auth_level,
+ NTSTATUS (*access_check_cb)(struct netlogon_creds_CredentialState *creds,
+ NTSTATUS step_status,
+ bool *store,
+ void *access_check_private),
+ void *access_check_private,
struct netlogon_creds_CredentialState **creds_out)
{
TALLOC_CTX *tmpctx;
char *keystr = NULL;
struct db_record *record;
TDB_DATA key;
+ bool store = true;
if (creds_out != NULL) {
*creds_out = NULL;
return_authenticator,
auth_type,
auth_level);
+ if (access_check_cb != NULL) {
+ NTSTATUS step_status = status;
+ status = access_check_cb(creds,
+ step_status,
+ &store,
+ access_check_private);
+ }
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
- status = schannel_store_session_key_tdb(db_sc, tmpctx, creds);
- if (!NT_STATUS_IS_OK(status)) {
- goto done;
+ if (store) {
+ status = schannel_store_session_key_tdb(db_sc, tmpctx, creds);
+ if (!NT_STATUS_IS_OK(status)) {
+ goto done;
+ }
}
if (creds_out) {
return_authenticator,
auth_type,
auth_level,
+ NULL, /* access_check_cb */
+ NULL, /* access_check_private */
&creds);
if (!NT_STATUS_IS_OK(nt_status)) {
ZERO_STRUCTP(return_authenticator);