//+---------------------------------------------------------------------------
//
//  Microsoft Windows
//  Copyright (C) Microsoft Corporation, 1992 - 1996.
//
//  File:       ni_krb5.h
//
//  Contents:
//
//  Classes:
//
//  Functions:
//
//  History:    6-30-1997	Naomaru Itoi	Created
//
//----------------------------------------------------------------------------

//
// Make sure that you have defined UNICODE, _UNICODE, and WIN32 correctly in
// your build environment.
//

#include <windows.h>
#include <commctrl.h>
#include <lm.h>
#include <winwlx.h>
#include <stdio.h>
#include <krb5.h>
#include "ni_common2.h"

// for debugging
#ifdef _DEBUG
#define D(x) {wprintf(L"%s", x);}
#define DS(x,y) {wprintf(x, y);}
#else
#define D(x)
#define DS(x,y)
#endif

// constants
#define WINLOGON_KEY L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"
#define SERVICE_NAME	L"ni_gina"
#define RegValueLength	1024
#define DllNameLength	256
#define CF_REQUIRED_STR		L"required"
#define CF_REQUISITE_STR	L"requisite"
#define CF_OPTIONAL_STR		L"optional"
#define CF_SUFFICIENT_STR	L"sufficient"
#define CF_REQUIRED		1
#define CF_REQUISITE	2
#define CF_OPTIONAL		3
#define CF_SUFFICIENT	4
#define SEPARATORS		L" ,\t\n"
#define KRB5_DEFAULT_LIFE 60*60*10 /* 10 hours */
#define MISTYPED_PASS L"Sorry, kerberos passwords do not match."

// service module struct
typedef struct _ctstruct {
                           DWORD             cf;	// control flag
                           struct _ctstruct *next;
                           WCHAR             DllName[DllNameLength]; // SM path
                          } CTSTRUCT;

typedef CTSTRUCT *PCTSTRUCT;