summaryrefslogtreecommitdiffstats
path: root/src/windows/identity/plugins
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
committerTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
commit02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch)
tree61b9147863cd8be3eff63903dc36cae168254bd5 /src/windows/identity/plugins
parent162ab371748cba0cc6f172419bd6e71fa04bb878 (diff)
downloadkrb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.gz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.xz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.zip
make mark-cstyle
make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/identity/plugins')
-rw-r--r--src/windows/identity/plugins/common/dynimport.c12
-rw-r--r--src/windows/identity/plugins/common/krb5common.c68
-rw-r--r--src/windows/identity/plugins/common/krb5common.h6
-rw-r--r--src/windows/identity/plugins/krb4/errorfuncs.c11
-rw-r--r--src/windows/identity/plugins/krb4/errorfuncs.h2
-rw-r--r--src/windows/identity/plugins/krb4/krb4configdlg.c14
-rw-r--r--src/windows/identity/plugins/krb4/krb4funcs.c76
-rw-r--r--src/windows/identity/plugins/krb4/krb4funcs.h6
-rw-r--r--src/windows/identity/plugins/krb4/krb4newcreds.c4
-rw-r--r--src/windows/identity/plugins/krb4/krb4plugin.c32
-rw-r--r--src/windows/identity/plugins/krb4/krbcred.h4
-rw-r--r--src/windows/identity/plugins/krb4/langres.h2
-rw-r--r--src/windows/identity/plugins/krb5/datarep.c13
-rw-r--r--src/windows/identity/plugins/krb5/errorfuncs.c14
-rw-r--r--src/windows/identity/plugins/krb5/errorfuncs.h8
-rw-r--r--src/windows/identity/plugins/krb5/krb5configcc.c8
-rw-r--r--src/windows/identity/plugins/krb5/krb5configdlg.c42
-rw-r--r--src/windows/identity/plugins/krb5/krb5configid.c2
-rw-r--r--src/windows/identity/plugins/krb5/krb5configids.c7
-rw-r--r--src/windows/identity/plugins/krb5/krb5funcs.c124
-rw-r--r--src/windows/identity/plugins/krb5/krb5funcs.h20
-rw-r--r--src/windows/identity/plugins/krb5/krb5identpro.c44
-rw-r--r--src/windows/identity/plugins/krb5/krb5main.c10
-rw-r--r--src/windows/identity/plugins/krb5/krb5newcreds.c186
-rw-r--r--src/windows/identity/plugins/krb5/krb5plugin.c18
-rw-r--r--src/windows/identity/plugins/krb5/krb5props.c15
-rw-r--r--src/windows/identity/plugins/krb5/krbcred.h32
-rw-r--r--src/windows/identity/plugins/krb5/langres.h2
28 files changed, 388 insertions, 394 deletions
diff --git a/src/windows/identity/plugins/common/dynimport.c b/src/windows/identity/plugins/common/dynimport.c
index 99a93dd256..bb1bb0412d 100644
--- a/src/windows/identity/plugins/common/dynimport.c
+++ b/src/windows/identity/plugins/common/dynimport.c
@@ -36,8 +36,8 @@ HINSTANCE hSecur32 = 0;
HINSTANCE hComErr = 0;
HINSTANCE hService = 0;
HINSTANCE hProfile = 0;
-HINSTANCE hPsapi = 0;
-HINSTANCE hToolHelp32 = 0;
+HINSTANCE hPsapi = 0;
+HINSTANCE hToolHelp32 = 0;
HINSTANCE hCCAPI = 0;
DWORD AfsAvailable = 0;
@@ -158,9 +158,9 @@ DECL_FUNC_PTR(com_err);
DECL_FUNC_PTR(error_message);
// Profile functions
-DECL_FUNC_PTR(profile_init);
+DECL_FUNC_PTR(profile_init);
DECL_FUNC_PTR(profile_flush);
-DECL_FUNC_PTR(profile_release);
+DECL_FUNC_PTR(profile_release);
DECL_FUNC_PTR(profile_get_subsection_names);
DECL_FUNC_PTR(profile_free_list);
DECL_FUNC_PTR(profile_get_string);
@@ -311,7 +311,7 @@ FUNC_INFO k524_fi[] = {
FUNC_INFO profile_fi[] = {
MAKE_FUNC_INFO(profile_init),
MAKE_FUNC_INFO(profile_flush),
- MAKE_FUNC_INFO(profile_release),
+ MAKE_FUNC_INFO(profile_release),
MAKE_FUNC_INFO(profile_get_subsection_names),
MAKE_FUNC_INFO(profile_free_list),
MAKE_FUNC_INFO(profile_get_string),
@@ -428,7 +428,7 @@ khm_int32 init_imports(void) {
CKRV(TOOLHELPDLL);
hPsapi = 0;
- }
+ }
else if(osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
// Windows NT
diff --git a/src/windows/identity/plugins/common/krb5common.c b/src/windows/identity/plugins/common/krb5common.c
index 36d647cc77..f3a5e988e1 100644
--- a/src/windows/identity/plugins/common/krb5common.c
+++ b/src/windows/identity/plugins/common/krb5common.c
@@ -36,9 +36,9 @@
/**************************************/
/* khm_krb5_error(): */
/**************************************/
-int
-khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
- int FreeContextFlag, krb5_context * ctx,
+int
+khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
+ int FreeContextFlag, krb5_context * ctx,
krb5_ccache * cache)
{
#ifdef NO_KRB5
@@ -48,17 +48,17 @@ khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
#ifdef SHOW_MESSAGE_IN_AN_ANNOYING_WAY
char message[256];
const char *errText;
- int krb5Error = ((int)(rc & 255));
+ int krb5Error = ((int)(rc & 255));
- errText = perror_message(rc);
- _snprintf(message, sizeof(message),
- "%s\n(Kerberos error %ld)\n\n%s failed",
- errText,
- krb5Error,
+ errText = perror_message(rc);
+ _snprintf(message, sizeof(message),
+ "%s\n(Kerberos error %ld)\n\n%s failed",
+ errText,
+ krb5Error,
FailedFunctionName);
- MessageBoxA(NULL, message, "Kerberos Five", MB_OK | MB_ICONERROR |
- MB_TASKMODAL |
+ MessageBoxA(NULL, message, "Kerberos Five", MB_OK | MB_ICONERROR |
+ MB_TASKMODAL |
MB_SETFOREGROUND);
#endif
@@ -81,9 +81,9 @@ khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
#endif //!NO_KRB5
}
-int
-khm_krb5_initialize(khm_handle ident,
- krb5_context *ctx,
+int
+khm_krb5_initialize(khm_handle ident,
+ krb5_context *ctx,
krb5_ccache *cache)
{
#ifdef NO_KRB5
@@ -161,7 +161,7 @@ khm_krb5_initialize(khm_handle ident,
if ((rc = (*pkrb5_cc_set_flags)(*ctx, *cache, flags)))
{
if (rc != KRB5_FCC_NOFILE && rc != KRB5_CC_NOTFOUND)
- khm_krb5_error(rc, "krb5_cc_set_flags()", 0, ctx,
+ khm_krb5_error(rc, "krb5_cc_set_flags()", 0, ctx,
cache);
else if ((rc == KRB5_FCC_NOFILE || rc == KRB5_CC_NOTFOUND) && *ctx != NULL) {
if (*cache != NULL) {
@@ -181,8 +181,8 @@ on_error:
#define TIMET_TOLERANCE (60*5)
khm_int32 KHMAPI
-khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
- khm_handle ident,
+khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
+ khm_handle ident,
krb5_timestamp * pexpiration)
{
krb5_principal principal = 0;
@@ -238,20 +238,20 @@ khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
krb5_data * c1 = krb5_princ_component(ctx, creds.server, 1);
krb5_data * r = krb5_princ_realm(ctx, creds.server);
- if ( c0 && c1 && r && c1->length == r->length &&
+ if ( c0 && c1 && r && c1->length == r->length &&
!strncmp(c1->data,r->data,r->length) &&
!strncmp("krbtgt",c0->data,c0->length) ) {
/* we have a TGT, check for the expiration time.
- * if it is valid and renewable, use the renew time
+ * if it is valid and renewable, use the renew time
*/
if (!(creds.ticket_flags & TKT_FLG_INVALID) &&
- creds.times.starttime < (now + TIMET_TOLERANCE) &&
+ creds.times.starttime < (now + TIMET_TOLERANCE) &&
(creds.times.endtime + TIMET_TOLERANCE) > now) {
expiration = creds.times.endtime;
- if ((creds.ticket_flags & TKT_FLG_RENEWABLE) &&
+ if ((creds.ticket_flags & TKT_FLG_RENEWABLE) &&
(creds.times.renew_till > creds.times.endtime)) {
expiration = creds.times.renew_till;
}
@@ -304,7 +304,7 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
code = pcc_get_NC_info(cc_ctx, &pNCi);
- if (code)
+ if (code)
goto _exit;
for(i=0; pNCi[i]; i++) {
@@ -316,22 +316,22 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
continue;
/* need a function to check the cache for the identity
- * and determine if it has valid tickets. If it has
- * the right identity and valid tickets, store the
+ * and determine if it has valid tickets. If it has
+ * the right identity and valid tickets, store the
* expiration time and the cache name. If it has the
* right identity but no valid tickets, store the ccache
* name and an expiration time of zero. if it does not
* have the right identity don't save the name.
- *
+ *
* Keep searching to find the best cache available.
*/
- if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
- ident,
+ if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
+ ident,
&expiration))) {
if ( expiration > best_match_expiration ) {
best_match_expiration = expiration;
- StringCbCopyA(best_match_ccname,
+ StringCbCopyA(best_match_ccname,
sizeof(best_match_ccname),
"API:");
StringCbCatA(best_match_ccname,
@@ -364,8 +364,8 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
KHM_SUCCEEDED(khc_read_int32(csp_params, L"MsLsaList", &t)) && t) {
code = (*pkrb5_cc_resolve)(ctx, "MSLSA:", &cache);
if (code == 0 && cache) {
- if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
- ident,
+ if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
+ ident,
&expiration))) {
if ( expiration > best_match_expiration ) {
best_match_expiration = expiration;
@@ -405,8 +405,8 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
if (code)
continue;
- if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
- ident,
+ if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache,
+ ident,
&expiration))) {
if ( expiration > best_match_expiration ) {
best_match_expiration = expiration;
@@ -435,8 +435,8 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
(*pcc_shutdown)(&cc_ctx);
if (best_match_ccname[0]) {
-
- if (*pcbbuf = AnsiStrToUnicode((wchar_t *)buffer,
+
+ if (*pcbbuf = AnsiStrToUnicode((wchar_t *)buffer,
*pcbbuf,
best_match_ccname)) {
diff --git a/src/windows/identity/plugins/common/krb5common.h b/src/windows/identity/plugins/common/krb5common.h
index 29cae71ee9..b01e0d5cec 100644
--- a/src/windows/identity/plugins/common/krb5common.h
+++ b/src/windows/identity/plugins/common/krb5common.h
@@ -32,7 +32,7 @@
#include<krb5.h>
#ifndef NO_KRB5
-int khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
+int khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
int FreeContextFlag, krb5_context *ctx,
krb5_ccache *cache);
@@ -48,8 +48,8 @@ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
void * buffer, khm_size * pcbbuf);
khm_int32 KHMAPI
-khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
- khm_handle ident,
+khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
+ khm_handle ident,
krb5_timestamp * pexpiration);
#endif /* NO_KRB5 */
diff --git a/src/windows/identity/plugins/krb4/errorfuncs.c b/src/windows/identity/plugins/krb4/errorfuncs.c
index f436a40a7e..3441316e54 100644
--- a/src/windows/identity/plugins/krb4/errorfuncs.c
+++ b/src/windows/identity/plugins/krb4/errorfuncs.c
@@ -156,7 +156,7 @@ LPSTR err_describe(LPSTR buf, size_t len, long code)
case GT_PW_NULLTKT: /* 55 Null tkt returned by KDC */
/* no error msg yet */
break;
-
+
/* Values returned by send_to_kdc */
case SKDC_RETRY : /* 56 Retry count exceeded */
case SKDC_CANT : /* 57 Can't send request */
@@ -187,9 +187,9 @@ LPSTR err_describe(LPSTR buf, size_t len, long code)
* message box is too small for VGA screens.
* It does work well if we only have to support 1024x768
*/
-
+
com_err_msg = "You have entered an insecure or weak password.";
-
+
default:
/* no extra error msg */
break;
@@ -216,11 +216,10 @@ LPSTR err_describe(LPSTR buf, size_t len, long code)
#endif
")", etype, offset
//")\nPress F1 for help on this error.", etype, offset
-#ifdef DEBUG_COM_ERR
+#ifdef DEBUG_COM_ERR
, code
#endif
);
-
+
return (LPSTR)buf;
}
-
diff --git a/src/windows/identity/plugins/krb4/errorfuncs.h b/src/windows/identity/plugins/krb4/errorfuncs.h
index d760c62595..0d4d75f1e7 100644
--- a/src/windows/identity/plugins/krb4/errorfuncs.h
+++ b/src/windows/identity/plugins/krb4/errorfuncs.h
@@ -35,7 +35,7 @@
/*
* This is a hack needed because the real com_err.h does
* not define err_func. We need it in the case where
- * we pull in the real com_err instead of the krb4
+ * we pull in the real com_err instead of the krb4
* impostor.
*/
#ifndef _DCNS_MIT_COM_ERR_H
diff --git a/src/windows/identity/plugins/krb4/krb4configdlg.c b/src/windows/identity/plugins/krb4/krb4configdlg.c
index c2ab3f5622..f13f9ad9e4 100644
--- a/src/windows/identity/plugins/krb4/krb4configdlg.c
+++ b/src/windows/identity/plugins/krb4/krb4configdlg.c
@@ -259,7 +259,7 @@ k4_id_write_params(HWND hwnd, k4_id_data * d) {
if (csp_ident)
khc_close_space(csp_ident);
-
+
if (csp_idk4)
khc_close_space(csp_idk4);
@@ -409,7 +409,7 @@ krb4_confg_proc(HWND hwnd,
in_init = TRUE;
- // Set KRB.CON
+ // Set KRB.CON
memset(krb_path, '\0', sizeof(krb_path));
if (!pkrb_get_krbconf2(krb_path, &krb_path_sz)) {
// Error has happened
@@ -419,9 +419,9 @@ krb4_confg_proc(HWND hwnd,
StringCbCopyA(d->krb_path, sizeof(d->krb_path), krb_path);
}
- // Set KRBREALM.CON
+ // Set KRBREALM.CON
memset(krbrealm_path, '\0', sizeof(krbrealm_path));
- if (!pkrb_get_krbrealm2(krbrealm_path, &krbrealm_path_sz)) {
+ if (!pkrb_get_krbrealm2(krbrealm_path, &krbrealm_path_sz)) {
// Error has happened
} else {
AnsiStrToUnicode(wbuf, sizeof(wbuf), krbrealm_path);
@@ -442,13 +442,13 @@ krb4_confg_proc(HWND hwnd,
// Set TICKET.KRB file Editbox
*ticketName = 0;
pkrb_set_tkt_string(0);
-
- pticketName = ptkt_string();
+
+ pticketName = ptkt_string();
if (pticketName)
StringCbCopyA(ticketName, sizeof(ticketName), pticketName);
}
-
+
if (!*ticketName) {
// error
} else {
diff --git a/src/windows/identity/plugins/krb4/krb4funcs.c b/src/windows/identity/plugins/krb4/krb4funcs.c
index e5287ca9f9..33a94996e1 100644
--- a/src/windows/identity/plugins/krb4/krb4funcs.c
+++ b/src/windows/identity/plugins/krb4/krb4funcs.c
@@ -44,7 +44,7 @@ int com_addr(void)
{
long ipAddr;
char loc_addr[ADDR_SZ];
- CREDENTIALS cred;
+ CREDENTIALS cred;
char service[40];
char instance[40];
// char addr[40];
@@ -71,11 +71,11 @@ int com_addr(void)
break;
} // while()
return 0;
-}
+}
-long
-khm_krb4_list_tickets(void)
+long
+khm_krb4_list_tickets(void)
{
char ptktname[MAX_PATH + 5];
char pname[ANAME_SZ];
@@ -103,15 +103,15 @@ khm_krb4_list_tickets(void)
goto collect;
com_addr();
-
+
// Open ticket file
if ((k_errno = (*ptf_init)((*ptkt_string)(), R_TKT_FIL)))
{
goto cleanup;
}
- // Close ticket file
+ // Close ticket file
(void) (*ptf_close)();
-
+
// We must find the realm of the ticket file here before calling
// tf_init because since the realm of the ticket file is not
// really stored in the principal section of the file, the
@@ -121,9 +121,9 @@ khm_krb4_list_tickets(void)
{
goto cleanup;
}
-
- // Open ticket file
- if (k_errno = (*ptf_init)((*ptkt_string)(), R_TKT_FIL))
+
+ // Open ticket file
+ if (k_errno = (*ptf_init)((*ptkt_string)(), R_TKT_FIL))
{
goto cleanup;
}
@@ -132,12 +132,12 @@ khm_krb4_list_tickets(void)
open = 1;
- // Get principal name and instance
- if ((k_errno = (*ptf_get_pname)(pname)) || (k_errno = (*ptf_get_pinst)(pinst)))
+ // Get principal name and instance
+ if ((k_errno = (*ptf_get_pname)(pname)) || (k_errno = (*ptf_get_pinst)(pinst)))
{
goto cleanup;
}
-
+
// You may think that this is the obvious place to get the
// realm of the ticket file, but it can't be done here as the
// routine to do this must open the ticket file. This is why
@@ -189,7 +189,7 @@ khm_krb4_list_tickets(void)
return(KSUCCESS);
if (open)
- (*ptf_close)(); //close ticket file
+ (*ptf_close)(); //close ticket file
if (k_errno == EOF)
k_errno = 0;
@@ -211,7 +211,7 @@ khm_krb4_list_tickets(void)
{
CHAR message[256];
CHAR errBuf[256];
- LPCSTR errText;
+ LPCSTR errText;
if (!Lerror_message)
return -1;
@@ -219,7 +219,7 @@ khm_krb4_list_tickets(void)
errText = err_describe(errBuf, KRBERR(k_errno));
sprintf(message, "%s\n\n%s failed", errText, functionName);
- MessageBox(NULL, message, "Kerberos Four",
+ MessageBox(NULL, message, "Kerberos Four",
MB_OK | MB_ICONERROR | MB_TASKMODAL | MB_SETFOREGROUND);
}
#endif
@@ -234,11 +234,11 @@ khm_krb4_list_tickets(void)
#define KRBREALM_FILE "KRBREALM.CON"
#define KRB5_FILE "KRB5.INI"
-BOOL
+BOOL
khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
{
char **configFile = NULL;
- if (pkrb5_get_default_config_files(&configFile))
+ if (pkrb5_get_default_config_files(&configFile))
{
GetWindowsDirectoryA(confname,szConfname);
confname[szConfname-1] = '\0';
@@ -248,15 +248,15 @@ khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
return FALSE;
}
-
+
*confname = 0;
-
+
if (configFile)
{
StringCchCopyA(confname, szConfname, *configFile);
- pkrb5_free_config_files(configFile);
+ pkrb5_free_config_files(configFile);
}
-
+
if (!*confname)
{
GetWindowsDirectoryA(confname,szConfname);
@@ -265,7 +265,7 @@ khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
StringCchCatA(confname, szConfname, "\\");
StringCchCatA(confname, szConfname, KRB5_FILE);
}
-
+
return FALSE;
}
@@ -296,7 +296,7 @@ khm_get_krb4_con_file(LPSTR confname, UINT szConfname)
}
StringCchCopyA(confname, szConfname, krbConFile);
- } else if (hKrb4) {
+ } else if (hKrb4) {
size_t size = szConfname;
memset(confname, '\0', szConfname);
if (!pkrb_get_krbconf2(confname, &size)) {
@@ -316,7 +316,7 @@ readstring(FILE * file, char * buf, int len)
int c,i;
memset(buf, '\0', sizeof(buf));
for (i=0, c=fgetc(file); c != EOF ; c=fgetc(file), i++)
- {
+ {
if (i < sizeof(buf)) {
if (c == '\n') {
buf[i] = '\0';
@@ -346,7 +346,7 @@ readstring(FILE * file, char * buf, int len)
/*! \internal
\brief Return a list of configured realms
- The string that is returned is a set of null terminated unicode strings,
+ The string that is returned is a set of null terminated unicode strings,
each of which denotes one realm. The set is terminated by a zero length
null terminated string.
@@ -354,7 +354,7 @@ readstring(FILE * file, char * buf, int len)
\return The string with the list of realms or NULL if the operation fails.
*/
-wchar_t * khm_krb5_get_realm_list(void)
+wchar_t * khm_krb5_get_realm_list(void)
{
wchar_t * rlist = NULL;
@@ -383,7 +383,7 @@ wchar_t * khm_krb5_get_realm_list(void)
{
/* first figure out how much space to allocate */
cbsize = 0;
- for (cpp = sections; *cpp; cpp++)
+ for (cpp = sections; *cpp; cpp++)
{
cbsize += sizeof(wchar_t) * (strlen(*cpp) + 1);
}
@@ -420,7 +420,7 @@ wchar_t * khm_krb5_get_realm_list(void)
size_t cbsize, t;
wchar_t * d;
- if (!khm_get_krb4_con_file(krb_conf,sizeof(krb_conf)) &&
+ if (!khm_get_krb4_con_file(krb_conf,sizeof(krb_conf)) &&
#if _MSC_VER >= 1400
!fopen_s(&file, krb_conf, "rt")
#else
@@ -492,7 +492,7 @@ wchar_t * khm_krb5_get_default_realm(void)
pkrb5_init_context(&ctx);
pkrb5_get_default_realm(ctx,&def);
-
+
if (def) {
cch = strlen(def) + 1;
realm = PMALLOC(sizeof(wchar_t) * cch);
@@ -570,7 +570,7 @@ khm_krb4_set_def_tkt_string(void) {
UnicodeStrToAnsi(tkt_string, sizeof(tkt_string),
wtkt_string);
- pkrb_set_tkt_string(tkt_string);
+ pkrb_set_tkt_string(tkt_string);
}
}
@@ -618,7 +618,7 @@ khm_krb4_changepwd(char * principal,
k_errno = make_temp_cache_v4("_chgpwd");
if (k_errno) return k_errno;
- k_errno = pkadm_change_your_password(principal, password, newpassword,
+ k_errno = pkadm_change_your_password(principal, password, newpassword,
error_str);
make_temp_cache_v4(0);
return k_errno;
@@ -674,7 +674,7 @@ khm_krb4_find_tgt(khm_handle credset, khm_handle identity) {
idname,
&cb)))
return NULL;
-
+
t = wcsrchr(idname, L'@');
if (t == NULL)
return NULL;
@@ -747,7 +747,7 @@ khm_convert524(khm_handle identity)
NULL))) {
goto cleanup;
}
-
+
increds.client = me;
increds.server = server;
increds.times.endtime = 0;
@@ -814,7 +814,7 @@ khm_convert524(khm_handle identity)
}
return (code || icode);
-#endif /* NO_KRB5 */
+#endif /* NO_KRB5 */
}
long
@@ -862,11 +862,11 @@ khm_krb4_kinit(char * aname,
khm_krb4_set_def_tkt_string();
- err_context = L"fetching ticket";
- rc4 = (*pkrb_get_pw_in_tkt)(aname, inst, realm, "krbtgt", realm,
+ err_context = L"fetching ticket";
+ rc4 = (*pkrb_get_pw_in_tkt)(aname, inst, realm, "krbtgt", realm,
lifetime, password);
- if (rc4) /* XXX: do we want: && (rc != NO_TKT_FIL) as well? */ {
+ if (rc4) /* XXX: do we want: && (rc != NO_TKT_FIL) as well? */ {
functionName = L"krb_get_pw_in_tkt()";
msg = IDS_ERR_PWINTKT;
goto cleanup;
diff --git a/src/windows/identity/plugins/krb4/krb4funcs.h b/src/windows/identity/plugins/krb4/krb4funcs.h
index 05ed3e75dc..1328b4136d 100644
--- a/src/windows/identity/plugins/krb4/krb4funcs.h
+++ b/src/windows/identity/plugins/krb4/krb4funcs.h
@@ -68,15 +68,15 @@ khm_krb4_kinit(char * aname,
char * inst,
char * realm,
long lifetime,
- char * password);
+ char * password);
-long
+long
khm_krb4_list_tickets(void);
int khm_krb4_kdestroy(void);
khm_handle
-khm_krb4_find_tgt(khm_handle credset,
+khm_krb4_find_tgt(khm_handle credset,
khm_handle identity);
LONG
diff --git a/src/windows/identity/plugins/krb4/krb4newcreds.c b/src/windows/identity/plugins/krb4/krb4newcreds.c
index 9c200b618d..bcc3bc745a 100644
--- a/src/windows/identity/plugins/krb4/krb4newcreds.c
+++ b/src/windows/identity/plugins/krb4/krb4newcreds.c
@@ -188,7 +188,7 @@ void k4_read_identity_data(k4_dlg_data * d) {
&csp_ident))) {
khc_open_space(csp_ident, CSNAME_KRB4CRED, 0, &csp_k4);
-
+
if (csp_k4) {
if (KHM_SUCCEEDED(khc_read_int32(csp_k4, L"Krb4NewCreds", &t)))
d->k4_enabled = !!t;
@@ -741,7 +741,7 @@ krb4_msg_newcred(khm_int32 msg_type, khm_int32 msg_subtype,
/* only supported for new credentials */
if (method == K4_METHOD_AUTO ||
method == K4_METHOD_PASSWORD) {
-
+
khm_size n_prompts = 0;
khm_size idx;
khm_size cb;
diff --git a/src/windows/identity/plugins/krb4/krb4plugin.c b/src/windows/identity/plugins/krb4/krb4plugin.c
index 9a50249f7a..168a0f8a7b 100644
--- a/src/windows/identity/plugins/krb4/krb4plugin.c
+++ b/src/windows/identity/plugins/krb4/krb4plugin.c
@@ -40,8 +40,8 @@ khm_boolean krb4_initialized = FALSE;
khm_handle krb4_credset = NULL;
/* Kerberos IV stuff */
-khm_int32 KHMAPI
-krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -65,7 +65,7 @@ krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
ct.id = KCDB_CREDTYPE_AUTO;
ct.name = KRB4_CREDTYPE_NAME;
- if(LoadString(hResModule, IDS_KRB4_SHORT_DESC,
+ if(LoadString(hResModule, IDS_KRB4_SHORT_DESC,
buf, ARRAYLENGTH(buf)))
{
StringCbLength(buf, KCDB_MAXCB_SHORT_DESC, &cbsize);
@@ -77,7 +77,7 @@ krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
/* even though ideally we should be setting limits
based KCDB_MAXCB_LONG_DESC, our long description
actually fits nicely in KCDB_MAXCB_SHORT_DESC */
- if(LoadString(hResModule, IDS_KRB4_LONG_DESC,
+ if(LoadString(hResModule, IDS_KRB4_LONG_DESC,
buf, ARRAYLENGTH(buf)))
{
StringCbLength(buf, KCDB_MAXCB_SHORT_DESC, &cbsize);
@@ -95,7 +95,7 @@ krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
rv = kcdb_credset_create(&krb4_credset);
if (KHM_SUCCEEDED(rv))
- rv = kcdb_credtype_get_id(KRB5_CREDTYPE_NAME,
+ rv = kcdb_credtype_get_id(KRB5_CREDTYPE_NAME,
&credtype_id_krb5);
if(ct.short_desc)
@@ -165,38 +165,38 @@ krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
}
/* Lookup common data types */
- if(KHM_FAILED(kcdb_type_get_id(TYPENAME_ENCTYPE,
+ if(KHM_FAILED(kcdb_type_get_id(TYPENAME_ENCTYPE,
&type_id_enctype))) {
rv = KHM_ERROR_UNKNOWN;
}
- if(KHM_FAILED(kcdb_type_get_id(TYPENAME_ADDR_LIST,
+ if(KHM_FAILED(kcdb_type_get_id(TYPENAME_ADDR_LIST,
&type_id_addr_list))) {
rv = KHM_ERROR_UNKNOWN;
}
- if(KHM_FAILED(kcdb_type_get_id(TYPENAME_KRB5_FLAGS,
+ if(KHM_FAILED(kcdb_type_get_id(TYPENAME_KRB5_FLAGS,
&type_id_krb5_flags))) {
rv = KHM_ERROR_UNKNOWN;
}
/* Lookup common attributes */
- if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_KEY_ENCTYPE,
+ if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_KEY_ENCTYPE,
&attr_id_key_enctype))) {
rv = KHM_ERROR_UNKNOWN;
}
- if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_TKT_ENCTYPE,
+ if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_TKT_ENCTYPE,
&attr_id_tkt_enctype))) {
rv = KHM_ERROR_UNKNOWN;
}
- if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_ADDR_LIST,
+ if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_ADDR_LIST,
&attr_id_addr_list))) {
rv = KHM_ERROR_UNKNOWN;
}
- if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_KRB5_FLAGS,
+ if(KHM_FAILED(kcdb_attrib_get_id(ATTRNAME_KRB5_FLAGS,
&attr_id_krb5_flags))) {
rv = KHM_ERROR_UNKNOWN;
}
@@ -230,8 +230,8 @@ krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
return rv;
}
-khm_int32 KHMAPI
-krb4_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+krb4_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -283,8 +283,8 @@ krb4_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
return rv;
}
-khm_int32 KHMAPI
-krb4_cb(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+krb4_cb(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
switch(msg_type) {
diff --git a/src/windows/identity/plugins/krb4/krbcred.h b/src/windows/identity/plugins/krb4/krbcred.h
index 0b6a148eeb..834d3f9a3d 100644
--- a/src/windows/identity/plugins/krb4/krbcred.h
+++ b/src/windows/identity/plugins/krb4/krbcred.h
@@ -106,8 +106,8 @@ extern khm_boolean krb4_initialized;
extern khm_handle krb4_credset;
/* plugin callbacks */
-khm_int32 KHMAPI
-krb4_cb(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+krb4_cb(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam);
INT_PTR CALLBACK
diff --git a/src/windows/identity/plugins/krb4/langres.h b/src/windows/identity/plugins/krb4/langres.h
index 5c0e46f9aa..b4f911874d 100644
--- a/src/windows/identity/plugins/krb4/langres.h
+++ b/src/windows/identity/plugins/krb4/langres.h
@@ -38,7 +38,7 @@
#define IDC_CFG_GETTIX 1037
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 108
diff --git a/src/windows/identity/plugins/krb5/datarep.c b/src/windows/identity/plugins/krb5/datarep.c
index 5c292e4780..d0478a070c 100644
--- a/src/windows/identity/plugins/krb5/datarep.c
+++ b/src/windows/identity/plugins/krb5/datarep.c
@@ -33,7 +33,7 @@
#include<strsafe.h>
#include<assert.h>
-khm_int32 KHMAPI
+khm_int32 KHMAPI
enctype_toString(const void * data, khm_size cbdata,
wchar_t *destbuf, khm_size *pcbdestbuf,
khm_int32 flags)
@@ -214,10 +214,10 @@ addr_list_toString(const void *d, khm_size cb_d,
}
khm_int32 KHMAPI
-krb5flags_toString(const void *d,
- khm_size cb_d,
- wchar_t *buf,
- khm_size *pcb_buf,
+krb5flags_toString(const void *d,
+ khm_size cb_d,
+ wchar_t *buf,
+ khm_size *pcb_buf,
khm_int32 f)
{
wchar_t sbuf[32];
@@ -348,7 +348,7 @@ one_addr(k5_serial_address *a, wchar_t * buf, khm_size cbbuf)
#ifdef AF_INET6
|| (a->addrtype == ADDRTYPE_INET6 && a->length == 16)
#endif
- )
+ )
{
int af = AF_INET;
#ifdef AF_INET6
@@ -404,4 +404,3 @@ one_addr(k5_serial_address *a, wchar_t * buf, khm_size cbbuf)
_copy_string:
StringCbCopy(buf, cbbuf, retstr);
}
-
diff --git a/src/windows/identity/plugins/krb5/errorfuncs.c b/src/windows/identity/plugins/krb5/errorfuncs.c
index 4c2d78c630..d99c4bf6d2 100644
--- a/src/windows/identity/plugins/krb5/errorfuncs.c
+++ b/src/windows/identity/plugins/krb5/errorfuncs.c
@@ -54,7 +54,7 @@ HWND GetRootParent (HWND Child)
}
#endif
-void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
+void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
DWORD * suggestion,
kherr_suggestion * suggest_code)
{
@@ -163,7 +163,7 @@ void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
/* no error msg yet */
sugg_code = KHERR_SUGGEST_RETRY;
break;
-
+
/* Values returned by send_to_kdc */
case SKDC_RETRY : /* 56 Retry count exceeded */
case SKDC_CANT : /* 57 Can't send request */
@@ -199,7 +199,7 @@ void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
msg_id = MSG_ERR_INSECURE_PW;
sugg_code = KHERR_SUGGEST_RETRY;
break;
-
+
default:
/* no extra error msg */
break;
@@ -260,18 +260,18 @@ int lsh_com_err_proc (LPSTR whoami, long code,
HWND hOldFocus;
char buf[1024], *cp;
WORD mbformat = MB_OK | MB_ICONEXCLAMATION;
-
+
cp = buf;
memset(buf, '\0', sizeof(buf));
cp[0] = '\0';
-
+
if (code)
{
err_describe(buf, code);
while (*cp)
cp++;
}
-
+
if (fmt)
{
if (fmt[0] == '%' && fmt[1] == 'b')
@@ -289,7 +289,7 @@ int lsh_com_err_proc (LPSTR whoami, long code,
wvsprintfA((LPSTR)cp, fmt, args);
}
hOldFocus = GetFocus();
- retval = MessageBoxA(/*GetRootParent(hOldFocus)*/NULL, buf, whoami,
+ retval = MessageBoxA(/*GetRootParent(hOldFocus)*/NULL, buf, whoami,
mbformat | MB_ICONHAND | MB_TASKMODAL);
SetFocus(hOldFocus);
return retval;
diff --git a/src/windows/identity/plugins/krb5/errorfuncs.h b/src/windows/identity/plugins/krb5/errorfuncs.h
index 4b1d2e2b52..c03eba5758 100644
--- a/src/windows/identity/plugins/krb5/errorfuncs.h
+++ b/src/windows/identity/plugins/krb5/errorfuncs.h
@@ -35,7 +35,7 @@
/*
* This is a hack needed because the real com_err.h does
* not define err_func. We need it in the case where
- * we pull in the real com_err instead of the krb4
+ * we pull in the real com_err instead of the krb4
* impostor.
*/
#ifndef _DCNS_MIT_COM_ERR_H
@@ -54,7 +54,7 @@ typedef LPSTR (*err_func)(int, long);
#endif
/*! \internal
- \brief Describe an error
+ \brief Describe an error
\param[in] code Error code returned by Kerberos
\param[out] buf Receives the error string
@@ -62,8 +62,8 @@ typedef LPSTR (*err_func)(int, long);
\param[out] suggestion Message ID of suggestion
\param[out] suggest_code Suggestion ID
*/
-void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
- DWORD * suggestion,
+void khm_err_describe(long code, wchar_t * buf, khm_size cbbuf,
+ DWORD * suggestion,
kherr_suggestion * suggest_code);
/* */
diff --git a/src/windows/identity/plugins/krb5/krb5configcc.c b/src/windows/identity/plugins/krb5/krb5configcc.c
index 13c5ac86b8..8b0286f0fe 100644
--- a/src/windows/identity/plugins/krb5/krb5configcc.c
+++ b/src/windows/identity/plugins/krb5/krb5configcc.c
@@ -296,7 +296,7 @@ void k5_ccc_update_data(HWND hwnd, k5_ccc_data * d) {
/* everything else is controlled by buttons */
}
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_ccconfig_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -345,7 +345,7 @@ k5_ccconfig_dlgproc(HWND hwnd,
ListView_InsertColumn(lv, 0, &lvc);
}
- SendDlgItemMessage(hwnd, IDC_CFG_FCNAME, EM_SETLIMITTEXT,
+ SendDlgItemMessage(hwnd, IDC_CFG_FCNAME, EM_SETLIMITTEXT,
MAX_PATH - 1, 0);
k5_ccc_update_ui(hwnd, d);
@@ -365,7 +365,7 @@ k5_ccconfig_dlgproc(HWND hwnd,
wchar_t cpath[MAX_PATH];
khm_size i;
- GetDlgItemText(hwnd, IDC_CFG_FCNAME,
+ GetDlgItemText(hwnd, IDC_CFG_FCNAME,
cpath, ARRAYLENGTH(cpath));
PathCanonicalize(path, cpath);
@@ -520,7 +520,7 @@ k5_ccconfig_dlgproc(HWND hwnd,
#endif
lv_idx = -1;
- while((lv_idx = ListView_GetNextItem(lv, lv_idx,
+ while((lv_idx = ListView_GetNextItem(lv, lv_idx,
LVNI_SELECTED)) != -1) {
ListView_GetItemText(lv, lv_idx, 0, buf, ARRAYLENGTH(buf));
for (i=0; i < d->work.n_file_ccs; i++) {
diff --git a/src/windows/identity/plugins/krb5/krb5configdlg.c b/src/windows/identity/plugins/krb5/krb5configdlg.c
index ed11f7ec82..d6221123ce 100644
--- a/src/windows/identity/plugins/krb5/krb5configdlg.c
+++ b/src/windows/identity/plugins/krb5/krb5configdlg.c
@@ -364,7 +364,7 @@ k5_read_config_data(k5_config_data * d) {
/* now go through each and fish out the kdcs, admin_server
and master_kdc. */
for (s=0; sections[s] && sections[s][0]; s++) {
- const char * sec_kdcs[] =
+ const char * sec_kdcs[] =
{ "realms", sections[s], "kdc", NULL };
const char * sec_admin[] =
@@ -562,7 +562,7 @@ k5_write_config_data(k5_config_data * d) {
applied = TRUE;
}
- if (!(d->flags &
+ if (!(d->flags &
(K5_CDFLAG_MOD_DEF_REALM |
K5_CDFLAG_MOD_CONF_FILE |
K5_CDFLAG_MOD_DNS_FALLBACK |
@@ -616,7 +616,7 @@ k5_write_config_data(k5_config_data * d) {
s > 0) {
char defrealm[K5_MAXCCH_REALM];
- UnicodeStrToAnsi(defrealm, sizeof(defrealm),
+ UnicodeStrToAnsi(defrealm, sizeof(defrealm),
d->def_realm);
khm_krb5_set_default_realm(d->def_realm);
@@ -697,7 +697,7 @@ k5_write_config_data(k5_config_data * d) {
char realm[K5_MAXCCH_REALM];
char host[K5_MAXCCH_HOST];
- const char * sec_kdcs[] =
+ const char * sec_kdcs[] =
{ "realms", realm, "kdc", NULL };
const char * sec_admin[] =
@@ -811,9 +811,9 @@ k5_write_config_data(k5_config_data * d) {
if (!rv) {
if (!strcmp(maprealm, realm)) {
- StringCbCopyA(host, sizeof(host),
+ StringCbCopyA(host, sizeof(host),
values[v]);
- pprofile_clear_relation(profile,
+ pprofile_clear_relation(profile,
sec_domain_map);
applied = TRUE;
}
@@ -973,7 +973,7 @@ k5_write_config_data(k5_config_data * d) {
khui_alert_set_title(alert, title);
khui_alert_set_message(alert, msg);
khui_alert_set_suggestion(alert, sugg);
-
+
khui_alert_show(alert);
}
@@ -992,7 +992,7 @@ k5_write_config_data(k5_config_data * d) {
static k5_config_data k5_config_dlg_data;
static khm_boolean k5_dlg_data_valid = FALSE;
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_config_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -1073,7 +1073,7 @@ k5_config_dlgproc(HWND hwnd,
#endif
SendMessage(hw, CB_RESETCONTENT, 0, 0);
- for (t=importopts;
+ for (t=importopts;
t && *t && *t != L' ' &&
t < importopts + ARRAYLENGTH(importopts);
t = multi_string_next(t)) {
@@ -1607,7 +1607,7 @@ k5_delete_realms(HWND hwnd, k5_config_data * d) {
lvi.iItem = idx;
lvi.iSubItem = 0;
lvi.mask = LVIF_PARAM;
-
+
ListView_GetItem(hw_rlm, &lvi);
if (lvi.lParam != -1 &&
@@ -1619,7 +1619,7 @@ k5_delete_realms(HWND hwnd, k5_config_data * d) {
if (modified) {
d->flags |= K5_CDFLAG_MOD_REALMS;
-
+
k5_purge_config_data(d, TRUE, TRUE, TRUE);
k5_update_realms_display(hw_rlm, d);
k5_update_dmap_display(GetDlgItem(hwnd, IDC_CFG_DMAP), NULL, 0);
@@ -1638,7 +1638,7 @@ k5_delete_servers(HWND hwnd, k5_config_data * d) {
hw_kdc = GetDlgItem(hwnd, IDC_CFG_KDC);
r = d->c_realm;
-
+
idx = -1;
while((idx = ListView_GetNextItem(hw_kdc, idx,
LVNI_SELECTED))
@@ -1660,7 +1660,7 @@ k5_delete_servers(HWND hwnd, k5_config_data * d) {
if (modified) {
d->flags |= K5_CDFLAG_MOD_REALMS;
d->realms[r].flags |= K5_RDFLAG_MODIFED;
-
+
k5_purge_config_data(d, TRUE, TRUE, TRUE);
k5_update_realms_display(GetDlgItem(hwnd, IDC_CFG_REALMS), d);
k5_update_kdcs_display(hw_kdc, d, r);
@@ -1687,7 +1687,7 @@ k5_delete_dmap(HWND hwnd, k5_config_data * d) {
lvi.iItem = idx;
lvi.iSubItem = 0;
lvi.mask = LVIF_PARAM;
-
+
ListView_GetItem(hw_dmp, &lvi);
if (lvi.lParam != -1 &&
@@ -1700,7 +1700,7 @@ k5_delete_dmap(HWND hwnd, k5_config_data * d) {
if (modified) {
d->flags |= K5_CDFLAG_MOD_REALMS;
k5_purge_config_data(d, FALSE, FALSE, TRUE);
-
+
if (!(d->realms[r].flags & K5_RDFLAG_MODIFED)) {
d->realms[r].flags |= K5_RDFLAG_MODIFED;
@@ -1711,7 +1711,7 @@ k5_delete_dmap(HWND hwnd, k5_config_data * d) {
}
}
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_realms_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -1846,7 +1846,7 @@ k5_realms_dlgproc(HWND hwnd,
SetMenuItemInfo(hm, CMD_DEL_REALM, FALSE, &mii);
}
-
+
} else if (id == IDC_CFG_KDC) {
HWND hw_kdc;
int n;
@@ -1883,7 +1883,7 @@ k5_realms_dlgproc(HWND hwnd,
mii.fState = MFS_ENABLED;
SetMenuItemInfo(hm, CMD_DEL_SERVER, FALSE, &mii);
-
+
mii.fState = MFS_DISABLED;
SetMenuItemInfo(hm, CMD_MAKE_ADMIN, FALSE, &mii);
@@ -2562,7 +2562,7 @@ k5_realms_dlgproc(HWND hwnd,
if (ListView_GetSelectedCount(hw_kdc) != 1)
return TRUE;
-
+
idx = -1;
while ((idx = ListView_GetNextItem(hw_kdc, idx,
LVNI_SELECTED)) != -1) {
@@ -2613,7 +2613,7 @@ k5_realms_dlgproc(HWND hwnd,
if (ListView_GetSelectedCount(hw_kdc) != 1)
return TRUE;
-
+
idx = -1;
while ((idx = ListView_GetNextItem(hw_kdc, idx,
LVNI_SELECTED)) != -1) {
@@ -2850,7 +2850,7 @@ k5_unregister_config_panels(void) {
#endif
}
- if (KHM_SUCCEEDED(khui_cfg_open(node_main, L"KerberosRealms",
+ if (KHM_SUCCEEDED(khui_cfg_open(node_main, L"KerberosRealms",
&node_realms))) {
khui_cfg_remove(node_realms);
khui_cfg_release(node_realms);
diff --git a/src/windows/identity/plugins/krb5/krb5configid.c b/src/windows/identity/plugins/krb5/krb5configid.c
index 2f3fe62c84..b0dff3cb99 100644
--- a/src/windows/identity/plugins/krb5/krb5configid.c
+++ b/src/windows/identity/plugins/krb5/krb5configid.c
@@ -273,7 +273,7 @@ k5_id_write_params(HWND hw, k5_id_dlg_data * d) {
KHUI_CNFLAG_APPLIED | KHUI_CNFLAG_MODIFIED);
}
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_id_tab_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
diff --git a/src/windows/identity/plugins/krb5/krb5configids.c b/src/windows/identity/plugins/krb5/krb5configids.c
index 4699f056a2..70af857163 100644
--- a/src/windows/identity/plugins/krb5/krb5configids.c
+++ b/src/windows/identity/plugins/krb5/krb5configids.c
@@ -101,7 +101,7 @@ k5_ids_write_params(k5_ids_dlg_data * d) {
rv = khc_write_int32(csp_params, vn, (khm_int32) po); \
assert(KHM_SUCCEEDED(rv)); \
}
-
+
WRITEPARAM(d->life,d->tc_life.current, L"DefaultLifetime");
WRITEPARAM(d->renew_life,d->tc_renew.current, L"DefaultRenewLifetime");
WRITEPARAM(d->life_max,d->tc_life_max.current, L"MaxLifetime");
@@ -170,7 +170,7 @@ k5_ids_read_params(k5_ids_dlg_data * d) {
d->tc_renew_max.max = d->tc_renew.max;
}
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_ids_tab_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
@@ -279,6 +279,3 @@ k5_ids_tab_dlgproc(HWND hwnd,
}
return FALSE;
}
-
-
-
diff --git a/src/windows/identity/plugins/krb5/krb5funcs.c b/src/windows/identity/plugins/krb5/krb5funcs.c
index efab36e5ea..a78ed45d7e 100644
--- a/src/windows/identity/plugins/krb5/krb5funcs.c
+++ b/src/windows/identity/plugins/krb5/krb5funcs.c
@@ -96,7 +96,7 @@ khm_convert524(krb5_context alt_ctx)
krb5_princ_realm(ctx, me)->data,
"krbtgt",
krb5_princ_realm(ctx, me)->data,
- NULL)))
+ NULL)))
{
goto cleanup;
}
@@ -108,21 +108,21 @@ khm_convert524(krb5_context alt_ctx)
if ((code = pkrb5_get_credentials(ctx, 0,
cc,
&increds,
- &v5creds)))
+ &v5creds)))
{
goto cleanup;
}
if ((icode = pkrb524_convert_creds_kdc(ctx,
v5creds,
- v4creds)))
+ v4creds)))
{
goto cleanup;
}
/* initialize ticket cache */
if ((icode = pkrb_in_tkt(v4creds->pname, v4creds->pinst, v4creds->realm)
- != KSUCCESS))
+ != KSUCCESS))
{
goto cleanup;
}
@@ -134,7 +134,7 @@ khm_convert524(krb5_context alt_ctx)
v4creds->lifetime,
v4creds->kvno,
&(v4creds->ticket_st),
- v4creds->issue_date)))
+ v4creds->issue_date)))
{
goto cleanup;
}
@@ -170,7 +170,7 @@ int com_addr(void)
{
long ipAddr;
char loc_addr[ADDR_SZ];
- CREDENTIALS cred;
+ CREDENTIALS cred;
char service[40];
char instance[40];
// char addr[40];
@@ -197,7 +197,7 @@ int com_addr(void)
break;
} // while()
return 0;
-}
+}
#endif
/* we use these structures to keep track of identities that we find
@@ -492,7 +492,7 @@ tc_free_idlist(identlist * idlist) {
#define MAX_ADDRS 256
-static long get_tickets_from_cache(krb5_context ctx,
+static long get_tickets_from_cache(krb5_context ctx,
krb5_ccache cache,
identlist * idlist)
{
@@ -564,8 +564,8 @@ static long get_tickets_from_cache(krb5_context ctx,
PrincipalName = NULL;
ClientName = NULL;
sServerName = NULL;
- if ((code = (*pkrb5_unparse_name)(ctx, KRBv5Principal,
- (char **)&PrincipalName)))
+ if ((code = (*pkrb5_unparse_name)(ctx, KRBv5Principal,
+ (char **)&PrincipalName)))
{
if (PrincipalName != NULL)
(*pkrb5_free_unparsed_name)(ctx, PrincipalName);
@@ -586,7 +586,7 @@ static long get_tickets_from_cache(krb5_context ctx,
}
AnsiStrToUnicode(wbuf, sizeof(wbuf), PrincipalName);
- if(KHM_FAILED(kcdb_identity_create(wbuf, KCDB_IDENT_FLAG_CREATE,
+ if(KHM_FAILED(kcdb_identity_create(wbuf, KCDB_IDENT_FLAG_CREATE,
&ident))) {
/* something bad happened */
code = 1;
@@ -597,9 +597,9 @@ static long get_tickets_from_cache(krb5_context ctx,
(*pkrb5_free_principal)(ctx, KRBv5Principal);
- if ((code = (*pkrb5_cc_start_seq_get)(ctx, cache, &KRBv5Cursor)))
+ if ((code = (*pkrb5_cc_start_seq_get)(ctx, cache, &KRBv5Cursor)))
{
- goto _exit;
+ goto _exit;
}
memset(&KRBv5Credentials, '\0', sizeof(KRBv5Credentials));
@@ -608,8 +608,8 @@ static long get_tickets_from_cache(krb5_context ctx,
sServerName = NULL;
cred = NULL;
- while (!(code = pkrb5_cc_next_cred(ctx, cache, &KRBv5Cursor,
- &KRBv5Credentials)))
+ while (!(code = pkrb5_cc_next_cred(ctx, cache, &KRBv5Cursor,
+ &KRBv5Credentials)))
{
khm_handle tident = NULL;
khm_int32 cred_flags = 0;
@@ -643,7 +643,7 @@ static long get_tickets_from_cache(krb5_context ctx,
reason, we need to create a new identity */
if(strcmp(ClientName, PrincipalName)) {
AnsiStrToUnicode(wbuf, sizeof(wbuf), ClientName);
- if(KHM_FAILED(kcdb_identity_create(wbuf, KCDB_IDENT_FLAG_CREATE,
+ if(KHM_FAILED(kcdb_identity_create(wbuf, KCDB_IDENT_FLAG_CREATE,
&tident))) {
(*pkrb5_free_cred_contents)(ctx, &KRBv5Credentials);
continue;
@@ -653,7 +653,7 @@ static long get_tickets_from_cache(krb5_context ctx,
}
AnsiStrToUnicode(wbuf, sizeof(wbuf), sServerName);
- if(KHM_FAILED(kcdb_cred_create(wbuf, tident, credtype_id_krb5,
+ if(KHM_FAILED(kcdb_cred_create(wbuf, tident, credtype_id_krb5,
&cred))) {
(*pkrb5_free_cred_contents)(ctx, &KRBv5Credentials);
continue;
@@ -682,12 +682,12 @@ static long get_tickets_from_cache(krb5_context ctx,
tt = KRBv5Credentials.times.renew_till;
TimetToFileTime(tt, &eft);
- kcdb_cred_set_attr(cred, KCDB_ATTR_RENEW_EXPIRE, &eft,
+ kcdb_cred_set_attr(cred, KCDB_ATTR_RENEW_EXPIRE, &eft,
sizeof(eft));
ftl = FtSub(&eft, &ft);
- kcdb_cred_set_attr(cred, KCDB_ATTR_RENEW_LIFETIME, &ftl,
+ kcdb_cred_set_attr(cred, KCDB_ATTR_RENEW_LIFETIME, &ftl,
sizeof(ftl));
}
@@ -710,7 +710,7 @@ static long get_tickets_from_cache(krb5_context ctx,
c1 = krb5_princ_component(ctx,KRBv5Credentials.server,1);
r = krb5_princ_realm(ctx,KRBv5Credentials.server);
- if ( c0 && c1 && r && c1->length == r->length &&
+ if ( c0 && c1 && r && c1->length == r->length &&
!strncmp(c1->data,r->data,r->length) &&
!strncmp("krbtgt",c0->data,c0->length) )
nflags |= KCDB_CRED_FLAG_INITIAL;
@@ -733,7 +733,7 @@ static long get_tickets_from_cache(krb5_context ctx,
ti = KRBv5Credentials.keyblock.enctype;
kcdb_cred_set_attr(cred, attr_id_key_enctype, &ti, sizeof(ti));
- kcdb_cred_set_attr(cred, KCDB_ATTR_LOCATION, wcc_name,
+ kcdb_cred_set_attr(cred, KCDB_ATTR_LOCATION, wcc_name,
KCDB_CBSIZE_AUTO);
if ( KRBv5Credentials.addresses && KRBv5Credentials.addresses[0] ) {
@@ -843,7 +843,7 @@ static long get_tickets_from_cache(krb5_context ctx,
if ((code == KRB5_CC_END) || (code == KRB5_CC_NOTFOUND))
{
- if ((code = pkrb5_cc_end_seq_get(ctx, cache, &KRBv5Cursor)))
+ if ((code = pkrb5_cc_end_seq_get(ctx, cache, &KRBv5Cursor)))
{
goto _exit;
}
@@ -852,12 +852,12 @@ static long get_tickets_from_cache(krb5_context ctx,
#ifdef KRB5_TC_NOTICKET
flags |= KRB5_TC_NOTICKET;
#endif
- if ((code = pkrb5_cc_set_flags(ctx, cache, flags)))
+ if ((code = pkrb5_cc_set_flags(ctx, cache, flags)))
{
goto _exit;
}
}
- else
+ else
{
goto _exit;
}
@@ -901,7 +901,7 @@ khm_krb5_list_tickets(krb5_context *krbv5Context)
goto _exit;
code = pcc_get_NC_info(cc_ctx, &pNCi);
- if (code)
+ if (code)
goto _exit;
for(i=0; pNCi[i]; i++) {
@@ -1038,7 +1038,7 @@ khm_krb5_renew_cred(khm_handle cred)
goto cleanup;
code = pkrb5_cc_get_principal(ctx, cc, &me);
- if (code)
+ if (code)
goto cleanup;
cbname = sizeof(wname);
@@ -1058,7 +1058,7 @@ khm_krb5_renew_cred(khm_handle cred)
pkrb5_cc_set_flags(ctx, cc, ccflags);
if (strlen("krbtgt") != krb5_princ_name(ctx, server)->length ||
- strncmp("krbtgt", krb5_princ_name(ctx, server)->data, krb5_princ_name(ctx, server)->length))
+ strncmp("krbtgt", krb5_princ_name(ctx, server)->data, krb5_princ_name(ctx, server)->length))
{
code = pkrb5_get_renewed_creds(ctx, &cc_creds, me, cc, name);
if (code) {
@@ -1110,7 +1110,7 @@ khm_krb5_renew_cred(khm_handle cred)
pkrb5_free_principal(ctx, server);
pkrb5_free_cred_contents(ctx, &in_creds);
- pkrb5_free_cred_contents(ctx, &cc_creds);
+ pkrb5_free_cred_contents(ctx, &cc_creds);
if (out_creds)
pkrb5_free_creds(ctx, out_creds);
@@ -1280,11 +1280,11 @@ khm_krb5_renew_ident(khm_handle identity)
}
code = khm_krb5_initialize(identity, &ctx, &cc);
- if (code)
+ if (code)
goto cleanup;
code = pkrb5_cc_get_principal(ctx, cc, &me);
- if (code)
+ if (code)
goto cleanup;
realm = krb5_princ_realm(ctx, me);
@@ -1295,7 +1295,7 @@ khm_krb5_renew_ident(khm_handle identity)
realm->length,realm->data,
0);
- if (code)
+ if (code)
goto cleanup;
my_creds.client = me;
@@ -1635,7 +1635,7 @@ khm_krb5_canon_cc_name(wchar_t * wcc_name,
size_t cb_len;
wchar_t * colon;
- if (FAILED(StringCbLength(wcc_name,
+ if (FAILED(StringCbLength(wcc_name,
cb_cc_name,
&cb_len))) {
#ifdef DEBUG
@@ -1672,7 +1672,7 @@ khm_krb5_canon_cc_name(wchar_t * wcc_name,
return 0;
}
-int
+int
khm_krb5_cc_name_cmp(const wchar_t * cc_name_1,
const wchar_t * cc_name_2) {
if (!wcsncmp(cc_name_1, L"API:", 4))
@@ -2026,7 +2026,7 @@ khm_krb5_destroy_by_credset(khm_handle p_cs)
}
goto _del_this_cred;
}
-
+
_done_with_this_set:
pkrb5_free_principal(ctx, princ);
@@ -2297,10 +2297,10 @@ khm_krb5_ms2mit(char * match_princ, BOOL match_realm, BOOL save_creds,
} else {
/* Enumerate tickets from cache looking for an initial ticket */
- if ((code = pkrb5_cc_start_seq_get(kcontext, mslsa_ccache, &cursor)))
+ if ((code = pkrb5_cc_start_seq_get(kcontext, mslsa_ccache, &cursor)))
goto cleanup;
- while (!(code = pkrb5_cc_next_cred(kcontext, mslsa_ccache,
+ while (!(code = pkrb5_cc_next_cred(kcontext, mslsa_ccache,
&cursor, &creds))) {
if ( creds.ticket_flags & TKT_FLG_INITIAL ) {
rc = TRUE;
@@ -2337,7 +2337,7 @@ cleanup:
#define KRB5_FILE "KRB5.INI"
#define KRB5_TMP_FILE "KRB5.INI.TMP"
-BOOL
+BOOL
khm_krb5_get_temp_profile_file(LPSTR confname, UINT szConfname)
{
GetTempPathA(szConfname, confname);
@@ -2368,11 +2368,11 @@ khm_krb5_set_profile_file(krb5_context ctx, LPSTR confname)
}
#endif
-BOOL
+BOOL
khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
{
char **configFile = NULL;
- if (pkrb5_get_default_config_files(&configFile))
+ if (pkrb5_get_default_config_files(&configFile))
{
GetWindowsDirectoryA(confname,szConfname);
confname[szConfname-1] = '\0';
@@ -2382,15 +2382,15 @@ khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
return FALSE;
}
-
+
*confname = 0;
-
+
if (configFile)
{
StringCchCopyA(confname, szConfname, *configFile);
- pkrb5_free_config_files(configFile);
+ pkrb5_free_config_files(configFile);
}
-
+
if (!*confname)
{
GetWindowsDirectoryA(confname,szConfname);
@@ -2398,7 +2398,7 @@ khm_krb5_get_profile_file(LPSTR confname, UINT szConfname)
StringCchCatA(confname, szConfname, "\\");
StringCchCatA(confname, szConfname, KRB5_FILE);
}
-
+
return FALSE;
}
@@ -2415,7 +2415,7 @@ khm_get_krb4_con_file(LPSTR confname, UINT szConfname)
krbConFile[MAX_PATH-1] = '\0';
StringCchCatA(confname, szConfname, "\\");
}
-
+
pFind = strrchr(krbConFile, '\\');
if (pFind) {
*pFind = '\0';
@@ -2427,7 +2427,7 @@ khm_get_krb4_con_file(LPSTR confname, UINT szConfname)
StringCchCopyA(confname, szConfname, krbConFile);
}
- else if (hKrb4) {
+ else if (hKrb4) {
size_t size = szConfname;
memset(confname, '\0', szConfname);
if (!pkrb_get_krbconf2(confname, &size))
@@ -2446,7 +2446,7 @@ readstring(FILE * file, char * buf, int len)
{
int c,i;
memset(buf, '\0', sizeof(buf));
- for (i=0, c=fgetc(file); c != EOF ; c=fgetc(file), i++) {
+ for (i=0, c=fgetc(file); c != EOF ; c=fgetc(file), i++) {
if (i < sizeof(buf)) {
if (c == '\n') {
buf[i] = '\0';
@@ -2485,8 +2485,8 @@ readstring(FILE * file, char * buf, int len)
\return The string with the list of realms or NULL if the
operation fails.
*/
-wchar_t *
-khm_krb5_get_realm_list(void)
+wchar_t *
+khm_krb5_get_realm_list(void)
{
wchar_t * rlist = NULL;
@@ -2509,14 +2509,14 @@ khm_krb5_get_realm_list(void)
filenames[1] = NULL;
retval = pprofile_init(filenames, &profile);
if (!retval) {
- retval = pprofile_get_subsection_names(profile, rootsec,
+ retval = pprofile_get_subsection_names(profile, rootsec,
&sections);
if (!retval)
{
/* first figure out how much space to allocate */
cbsize = 0;
- for (cpp = sections; *cpp; cpp++)
+ for (cpp = sections; *cpp; cpp++)
{
cbsize += sizeof(wchar_t) * (strlen(*cpp) + 1);
}
@@ -2553,7 +2553,7 @@ khm_krb5_get_realm_list(void)
size_t cbsize, t;
wchar_t * d;
- if (!khm_get_krb4_con_file(krb_conf,sizeof(krb_conf)) &&
+ if (!khm_get_krb4_con_file(krb_conf,sizeof(krb_conf)) &&
#if _MSC_VER >= 1400 && __STDC_WANT_SECURE_LIB__
!fopen_s(&file, krb_conf, "rt")
#else
@@ -2616,7 +2616,7 @@ khm_krb5_get_realm_list(void)
Returns NULL if the operation fails.
*/
-wchar_t *
+wchar_t *
khm_krb5_get_default_realm(void)
{
wchar_t * realm;
@@ -2630,7 +2630,7 @@ khm_krb5_get_default_realm(void)
return NULL;
pkrb5_get_default_realm(ctx,&def);
-
+
if (def) {
cch = strlen(def) + 1;
realm = PMALLOC(sizeof(wchar_t) * cch);
@@ -2670,7 +2670,7 @@ khm_krb5_set_default_realm(wchar_t * realm) {
return rv;
}
-wchar_t *
+wchar_t *
khm_get_realm_from_princ(wchar_t * princ) {
wchar_t * t;
@@ -2727,8 +2727,8 @@ khm_krb5_changepwd(char * principal,
pkrb5_get_init_creds_opt_set_proxiable(&opts, 0);
pkrb5_get_init_creds_opt_set_address_list(&opts,NULL);
- if (rc = pkrb5_get_init_creds_password(context, &creds, princ,
- password, 0, 0, 0,
+ if (rc = pkrb5_get_init_creds_password(context, &creds, princ,
+ password, 0, 0, 0,
"kadmin/changepw", &opts)) {
if (rc == KRB5KRB_AP_ERR_BAD_INTEGRITY) {
#if 0
@@ -2753,7 +2753,7 @@ khm_krb5_changepwd(char * principal,
}
if (result_code) {
- int len = result_code_string.length +
+ int len = result_code_string.length +
(result_string.length ? (sizeof(": ") - 1) : 0) +
result_string.length;
if (len && error_str) {
@@ -2761,10 +2761,10 @@ khm_krb5_changepwd(char * principal,
if (*error_str)
StringCchPrintfA(*error_str, len+1,
"%.*s%s%.*s",
- result_code_string.length,
+ result_code_string.length,
result_code_string.data,
result_string.length?": ":"",
- result_string.length,
+ result_string.length,
result_string.data);
}
rc = result_code;
@@ -3036,7 +3036,7 @@ get_libdefault_string(profile_t profile, const char * realm,
* [libdefaults]
* option = <boolean>
*/
-
+
names[1] = option;
names[2] = 0;
code = pprofile_get_values(profile, names, &nameval);
@@ -3044,7 +3044,7 @@ get_libdefault_string(profile_t profile, const char * realm,
goto goodbye;
goodbye:
- if (!nameval)
+ if (!nameval)
return(ENOENT);
if (!nameval[0]) {
diff --git a/src/windows/identity/plugins/krb5/krb5funcs.h b/src/windows/identity/plugins/krb5/krb5funcs.h
index 62e4bd5362..d41ffb6b2f 100644
--- a/src/windows/identity/plugins/krb5/krb5funcs.h
+++ b/src/windows/identity/plugins/krb5/krb5funcs.h
@@ -102,10 +102,10 @@ typedef struct tag_k5params {
#define K5PARAM_FM_ALL 0x000007ff
#define K5PARAM_FM_PROF 0x0000007f
-
+
/* Credential and principal operations */
-BOOL
+BOOL
khm_krb5_ms2mit(char * match_princ,
BOOL match_realm,
BOOL save_creds,
@@ -144,10 +144,10 @@ khm_convert524(krb5_context ctx);
int
khm_krb5_renew_cred(khm_handle cred);
-int
+int
khm_krb5_renew_ident(khm_handle identity);
-long
+long
khm_krb5_list_tickets(krb5_context *krbv5Context);
long
@@ -165,19 +165,19 @@ khm_krb5_creds_is_equal(khm_handle vcred1, khm_handle vcred2, void * dummy);
/* Configuration */
-BOOL
+BOOL
khm_krb5_get_profile_file(LPSTR confname, UINT szConfname);
-BOOL
+BOOL
khm_krb5_get_temp_profile_file(LPSTR confname, UINT szConfname);
-wchar_t *
+wchar_t *
khm_krb5_get_default_realm(void);
long
khm_krb5_set_default_realm(wchar_t * realm);
-wchar_t *
+wchar_t *
khm_krb5_get_realm_list(void);
khm_int32
@@ -207,14 +207,14 @@ khm_krb5_get_identity_default_ccacheA(khm_handle ident, char * buf, khm_size * p
/* Utility */
-wchar_t *
+wchar_t *
khm_get_realm_from_princ(wchar_t * princ);
long
khm_krb5_canon_cc_name(wchar_t * wcc_name,
size_t cb_cc_name);
-int
+int
khm_krb5_cc_name_cmp(const wchar_t * cc_name_1,
const wchar_t * cc_name_2);
diff --git a/src/windows/identity/plugins/krb5/krb5identpro.c b/src/windows/identity/plugins/krb5/krb5identpro.c
index 996918351f..1b1ec403ef 100644
--- a/src/windows/identity/plugins/krb5/krb5identpro.c
+++ b/src/windows/identity/plugins/krb5/krb5identpro.c
@@ -80,9 +80,9 @@ trim_str(wchar_t * s, khm_size cch) {
}
/* Runs in the UI thread */
-int
-k5_get_realm_from_nc(khui_new_creds * nc,
- wchar_t * buf,
+int
+k5_get_realm_from_nc(khui_new_creds * nc,
+ wchar_t * buf,
khm_size cch_buf) {
k5_new_cred_data * d;
khm_size s;
@@ -102,7 +102,7 @@ k5_get_realm_from_nc(khui_new_creds * nc,
Runs in the UI thread
*/
-static void
+static void
set_identity_from_ui(khui_new_creds * nc,
k5_new_cred_data * d) {
wchar_t un[KCDB_IDENT_MAXCCH_NAME];
@@ -328,13 +328,13 @@ update_crossfeed(khui_new_creds * nc,
SetWindowText(d->hw_username, un);
- return TRUE;
+ return TRUE;
}
/* Handle window messages for the identity specifiers
runs in UI thread */
-static LRESULT
+static LRESULT
handle_wnd_msg(khui_new_creds * nc,
HWND hwnd,
UINT uMsg,
@@ -351,7 +351,7 @@ handle_wnd_msg(khui_new_creds * nc,
/* the username has changed. Instead of handling this
for every keystroke, set a timer that elapses some
time afterwards and then handle the event. */
- SetTimer(hwnd, NC_UNCHANGE_TIMER,
+ SetTimer(hwnd, NC_UNCHANGE_TIMER,
NC_UNCHANGE_TIMEOUT, NULL);
return TRUE;
@@ -400,7 +400,7 @@ handle_wnd_msg(khui_new_creds * nc,
/* UI Callback
runs in UI thread */
-static LRESULT KHMAPI
+static LRESULT KHMAPI
ui_cb(khui_new_creds * nc,
UINT cmd,
HWND hwnd,
@@ -443,7 +443,7 @@ ui_cb(khui_new_creds * nc,
nc->ident_aux = (LPARAM) d;
khui_cw_unlock_nc(nc);
- LoadString(hResModule, IDS_NC_USERNAME,
+ LoadString(hResModule, IDS_NC_USERNAME,
wbuf, ARRAYLENGTH(wbuf));
d->hw_username_label = CreateWindow
@@ -460,7 +460,7 @@ ui_cb(khui_new_creds * nc,
d->hw_username = CreateWindow
(L"COMBOBOX",
L"",
- CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT |
+ CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT |
WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL,
0, 0, 100, 100, /* bogus values */
hw_parent,
@@ -501,7 +501,7 @@ ui_cb(khui_new_creds * nc,
d->hw_realm = CreateWindow
(L"COMBOBOX",
L"",
- CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT |
+ CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT |
WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL,
0, 0, 100, 100, /* bogus */
hw_parent,
@@ -741,7 +741,7 @@ ui_cb(khui_new_creds * nc,
khui_cw_lock_nc(nc);
nc->ident_aux = 0;
khui_cw_unlock_nc(nc);
-
+
/* since we created all the windows as child windows of
the new creds window, they will be destroyed when that
window is destroyed. */
@@ -869,7 +869,7 @@ k5_ident_set_default_int(khm_handle def_ident) {
khm_krb5_cc_name_cmp(reg_ccname, id_ccname)) {
/* we have to write the new value in */
-
+
l = RegSetValueEx(hk_ccname, L"ccname", 0, REG_SZ, (BYTE *) id_ccname,
(DWORD) cb);
}
@@ -892,7 +892,7 @@ k5_ident_set_default(khm_int32 msg_type,
khm_ui_4 uparam,
void * vparam) {
- /*
+ /*
Currently, setting the default identity simply sets the
"ccname" registry value at "Software\MIT\kerberos5".
*/
@@ -1262,7 +1262,7 @@ k5_refresh_default_identity(krb5_context ctx) {
_reportf(L"Can't open default ccache. code=%d", code);
goto _nc_cleanup;
}
-
+
code = pkrb5_cc_get_principal(ctx, cc, &princ);
if (code) {
/* try to determine the identity from the ccache name */
@@ -1499,10 +1499,10 @@ k5_ident_(khm_int32 msg_type,
}
#endif
-khm_int32 KHMAPI
-k5_msg_ident(khm_int32 msg_type,
- khm_int32 msg_subtype,
- khm_ui_4 uparam,
+khm_int32 KHMAPI
+k5_msg_ident(khm_int32 msg_type,
+ khm_int32 msg_subtype,
+ khm_ui_4 uparam,
void * vparam)
{
switch(msg_subtype) {
@@ -1654,7 +1654,7 @@ DWORD WINAPI k5_ccname_monitor_thread(LPVOID lpParameter) {
}
dwSize = sizeof(reg_ccname);
-
+
l = RegQueryValueEx(hk_ccname,
L"ccname",
NULL,
@@ -1701,7 +1701,7 @@ DWORD WINAPI k5_ccname_monitor_thread(LPVOID lpParameter) {
wchar_t new_ccname[KRB5_MAXCCH_CCNAME];
dwSize = sizeof(new_ccname);
-
+
l = RegQueryValueEx(hk_ccname,
L"ccname",
NULL,
@@ -1756,7 +1756,7 @@ k5_msg_system_idpro(khm_int32 msg_type, khm_int32 msg_subtype,
pkrb5_init_context(&k5_identpro_ctx);
kcdb_identity_set_type(credtype_id_krb5);
- if (KHM_FAILED(kcdb_type_get_id(TYPENAME_KRB5_PRINC,
+ if (KHM_FAILED(kcdb_type_get_id(TYPENAME_KRB5_PRINC,
&type_id_krb5_princ))) {
kcdb_type dt;
kcdb_type * pstr;
diff --git a/src/windows/identity/plugins/krb5/krb5main.c b/src/windows/identity/plugins/krb5/krb5main.c
index 4875a80f81..fc64e27f32 100644
--- a/src/windows/identity/plugins/krb5/krb5main.c
+++ b/src/windows/identity/plugins/krb5/krb5main.c
@@ -245,7 +245,7 @@ KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
LoadString(hResModule, IDS_KEY_ENCTYPE_LONG_DESC, lbuf, ARRAYLENGTH(lbuf));
attrib.short_desc = sbuf;
attrib.long_desc = lbuf;
-
+
rv = kcdb_attrib_register(&attrib, &attr_id_key_enctype);
if(KHM_FAILED(rv))
@@ -271,7 +271,7 @@ KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
LoadString(hResModule, IDS_TKT_ENCTYPE_LONG_DESC, lbuf, ARRAYLENGTH(lbuf));
attrib.short_desc = sbuf;
attrib.long_desc = lbuf;
-
+
rv = kcdb_attrib_register(&attrib, &attr_id_tkt_enctype);
if(KHM_FAILED(rv))
@@ -297,7 +297,7 @@ KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
LoadString(hResModule, IDS_ADDR_LIST_LONG_DESC, lbuf, ARRAYLENGTH(lbuf));
attrib.short_desc = sbuf;
attrib.long_desc = lbuf;
-
+
rv = kcdb_attrib_register(&attrib, &attr_id_addr_list);
if(KHM_FAILED(rv))
@@ -322,7 +322,7 @@ KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
LoadString(hResModule, IDS_KRB5_FLAGS_SHORT_DESC, sbuf, ARRAYLENGTH(sbuf));
attrib.short_desc = sbuf;
attrib.long_desc = NULL;
-
+
rv = kcdb_attrib_register(&attrib, &attr_id_krb5_flags);
if(KHM_FAILED(rv))
@@ -350,7 +350,7 @@ KHMEXP_EXP khm_int32 KHMAPI init_module(kmm_module h_module) {
LoadString(hResModule, IDS_KRB5_CCNAME_LONG_DESC, lbuf, ARRAYLENGTH(lbuf));
attrib.short_desc = sbuf;
attrib.long_desc = lbuf;
-
+
rv = kcdb_attrib_register(&attrib, &attr_id_krb5_ccname);
if(KHM_FAILED(rv))
diff --git a/src/windows/identity/plugins/krb5/krb5newcreds.c b/src/windows/identity/plugins/krb5/krb5newcreds.c
index 48c10a4d78..7f2b93198f 100644
--- a/src/windows/identity/plugins/krb5/krb5newcreds.c
+++ b/src/windows/identity/plugins/krb5/krb5newcreds.c
@@ -67,7 +67,7 @@ k5_handle_wm_initdialog(HWND hwnd,
HWND hw;
k5_dlg_data * d;
khui_new_creds_by_type * nct;
-
+
d = PMALLOC(sizeof(*d));
ZeroMemory(d, sizeof(*d));
/* lParam is a pointer to a khui_new_creds structure */
@@ -174,7 +174,7 @@ k5_force_password_change(k5_dlg_data * d) {
INT_PTR
k5_handle_wmnc_notify(HWND hwnd,
- WPARAM wParam,
+ WPARAM wParam,
LPARAM lParam)
{
switch(HIWORD(wParam)) {
@@ -182,7 +182,7 @@ k5_handle_wmnc_notify(HWND hwnd,
{
k5_dlg_data * d;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
@@ -202,7 +202,7 @@ k5_handle_wmnc_notify(HWND hwnd,
k5_dlg_data * d;
BOOL old_sync;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
@@ -217,17 +217,17 @@ k5_handle_wmnc_notify(HWND hwnd,
old_sync = d->sync;
/* need to update the controls with d->* */
- SendDlgItemMessage(hwnd, IDC_NCK5_RENEWABLE,
+ SendDlgItemMessage(hwnd, IDC_NCK5_RENEWABLE,
BM_SETCHECK,
- (d->renewable? BST_CHECKED : BST_UNCHECKED),
+ (d->renewable? BST_CHECKED : BST_UNCHECKED),
0);
- EnableWindow(GetDlgItem(hwnd, IDC_NCK5_RENEW_EDIT),
+ EnableWindow(GetDlgItem(hwnd, IDC_NCK5_RENEW_EDIT),
!!d->renewable);
khui_tracker_refresh(&d->tc_lifetime);
khui_tracker_refresh(&d->tc_renew);
- SendDlgItemMessage(hwnd, IDC_NCK5_FORWARDABLE,
+ SendDlgItemMessage(hwnd, IDC_NCK5_FORWARDABLE,
BM_SETCHECK,
(d->forwardable ? BST_CHECKED : BST_UNCHECKED),
0);
@@ -286,7 +286,7 @@ k5_handle_wmnc_notify(HWND hwnd,
size_t cbsize;
khm_int32 flags;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
return TRUE;
@@ -304,7 +304,7 @@ k5_handle_wmnc_notify(HWND hwnd,
tbuf[0] = L'\0';
if (nc->n_identities > 0 &&
- KHM_SUCCEEDED(kcdb_identity_get_flags(nc->identities[0],
+ KHM_SUCCEEDED(kcdb_identity_get_flags(nc->identities[0],
&flags)) &&
(flags & KCDB_IDENT_FLAG_VALID) &&
nc->subtype == KMSG_CRED_NEW_CREDS &&
@@ -313,14 +313,14 @@ k5_handle_wmnc_notify(HWND hwnd,
if (is_k5_identpro)
k5_get_realm_from_nc(nc, tbuf, ARRAYLENGTH(tbuf));
else
- GetDlgItemText(hwnd, IDC_NCK5_REALM, tbuf,
+ GetDlgItemText(hwnd, IDC_NCK5_REALM, tbuf,
ARRAYLENGTH(tbuf));
/*TODO: if additional realms were specified, then those
must be listed as well */
- LoadString(hResModule, IDS_KRB5_CREDTEXT_0,
+ LoadString(hResModule, IDS_KRB5_CREDTEXT_0,
fbuf, ARRAYLENGTH(fbuf));
- StringCbPrintf(sbuf, sizeof(sbuf), fbuf,
+ StringCbPrintf(sbuf, sizeof(sbuf), fbuf,
tbuf);
StringCbLength(sbuf, sizeof(sbuf), &cbsize);
@@ -364,13 +364,13 @@ k5_handle_wmnc_notify(HWND hwnd,
/* There has been a change of identity */
k5_dlg_data * d;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
break;
- kmq_post_sub_msg(k5_sub, KMSG_CRED,
- KMSG_CRED_DIALOG_NEW_IDENTITY,
+ kmq_post_sub_msg(k5_sub, KMSG_CRED,
+ KMSG_CRED_DIALOG_NEW_IDENTITY,
0, (void *) d->nc);
}
break;
@@ -379,14 +379,14 @@ k5_handle_wmnc_notify(HWND hwnd,
{
k5_dlg_data * d;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(hwnd, DWLP_USER);
if (d == NULL)
break;
if(!d->sync && d->nc->result == KHUI_NC_RESULT_PROCESS) {
- kmq_post_sub_msg(k5_sub, KMSG_CRED,
- KMSG_CRED_DIALOG_NEW_OPTIONS,
+ kmq_post_sub_msg(k5_sub, KMSG_CRED,
+ KMSG_CRED_DIALOG_NEW_OPTIONS,
0, (void *) d->nc);
}
}
@@ -474,7 +474,7 @@ k5_handle_wm_command(HWND hwnd,
if(notif == BN_CLICKED && cid == IDC_NCK5_RENEWABLE) {
int c;
- c = (int) SendDlgItemMessage(hwnd, IDC_NCK5_RENEWABLE,
+ c = (int) SendDlgItemMessage(hwnd, IDC_NCK5_RENEWABLE,
BM_GETCHECK, 0, 0);
if(c==BST_CHECKED) {
EnableWindow(GetDlgItem(hwnd, IDC_NCK5_RENEW_EDIT), TRUE);
@@ -487,7 +487,7 @@ k5_handle_wm_command(HWND hwnd,
d->sync = FALSE;
} else if(notif == BN_CLICKED && cid == IDC_NCK5_FORWARDABLE) {
int c;
- c = (int) SendDlgItemMessage(hwnd, IDC_NCK5_FORWARDABLE,
+ c = (int) SendDlgItemMessage(hwnd, IDC_NCK5_FORWARDABLE,
BM_GETCHECK, 0, 0);
if(c==BST_CHECKED) {
d->forwardable = TRUE;
@@ -515,8 +515,8 @@ k5_handle_wm_command(HWND hwnd,
cid == IDC_NCK5_LIFETIME_EDIT)) {
d->dirty = TRUE;
d->sync = FALSE;
- } else if((notif == CBN_SELCHANGE ||
- notif == CBN_KILLFOCUS) &&
+ } else if((notif == CBN_SELCHANGE ||
+ notif == CBN_KILLFOCUS) &&
cid == IDC_NCK5_REALM &&
!is_k5_identpro) {
/* find out what the realm of the current identity
@@ -531,16 +531,16 @@ k5_handle_wm_command(HWND hwnd,
if(d->nc->n_identities > 0) {
if(notif == CBN_SELCHANGE) {
- idx = (int) SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
+ idx = (int) SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
CB_GETCURSEL, 0, 0);
- SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
+ SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
CB_GETLBTEXT, idx, (LPARAM) realm);
} else {
- GetDlgItemText(hwnd, IDC_NCK5_REALM,
+ GetDlgItemText(hwnd, IDC_NCK5_REALM,
realm, ARRAYLENGTH(realm));
}
cbsize = sizeof(idname);
- if(KHM_SUCCEEDED(kcdb_identity_get_name(d->nc->identities[0],
+ if(KHM_SUCCEEDED(kcdb_identity_get_name(d->nc->identities[0],
idname, &cbsize))) {
r = wcschr(idname, L'@');
if(r && !wcscmp(realm, r+1))
@@ -553,11 +553,11 @@ k5_handle_wm_command(HWND hwnd,
}
/* if we get here, we have a new user */
- StringCchCopy(r+1,
- ARRAYLENGTH(idname) - ((r+1) - idname),
+ StringCchCopy(r+1,
+ ARRAYLENGTH(idname) - ((r+1) - idname),
realm);
- if(KHM_SUCCEEDED(kcdb_identity_create(idname,
- KCDB_IDENT_FLAG_CREATE,
+ if(KHM_SUCCEEDED(kcdb_identity_create(idname,
+ KCDB_IDENT_FLAG_CREATE,
&ident))) {
khui_cw_set_primary_id(d->nc, ident);
kcdb_identity_release(ident);
@@ -568,26 +568,26 @@ k5_handle_wm_command(HWND hwnd,
/* if we get here, we have a new realm, but there is no
identity */
- PostMessage(d->nc->hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(d->nc->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_UPDATE_CREDTEXT), 0);
}
return 0;
}
-
+
/* Dialog procedure for the Krb5 credentials type panel.
NOTE: Runs in the context of the UI thread
*/
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_nc_dlg_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
switch(uMsg) {
- case WM_INITDIALOG:
+ case WM_INITDIALOG:
return k5_handle_wm_initdialog(hwnd, wParam, lParam);
case WM_COMMAND:
@@ -606,7 +606,7 @@ k5_nc_dlg_proc(HWND hwnd,
}
/* forward dcl */
-krb5_error_code KRB5_CALLCONV
+krb5_error_code KRB5_CALLCONV
k5_kinit_prompter(krb5_context context,
void *data,
const char *name,
@@ -618,7 +618,7 @@ k5_kinit_prompter(krb5_context context,
fiber_job g_fjob; /* global fiber job object */
-static BOOL
+static BOOL
k5_cached_kinit_prompter(void);
static BOOL
@@ -627,7 +627,7 @@ k5_cp_check_continue(void);
/*
Runs in the context of the krb5 plugin's slave fiber
*/
-VOID CALLBACK
+VOID CALLBACK
k5_kinit_fiber_proc(PVOID lpParameter)
{
while(TRUE)
@@ -775,7 +775,7 @@ k5_cp_check_continue(void) {
}
/* returns true if we find cached prompts */
-static BOOL
+static BOOL
k5_cached_kinit_prompter(void) {
BOOL rv = FALSE;
khm_handle ident;
@@ -836,7 +836,7 @@ k5_cached_kinit_prompter(void) {
/* check if there are any prompts currently showing. If there are
we check if they are the same as the ones we are going to show.
In which case we just reuse the exisitng prompts */
- if (KHM_FAILED(khui_cw_get_prompt_count(g_fjob.nc,
+ if (KHM_FAILED(khui_cw_get_prompt_count(g_fjob.nc,
&n_cur_prompts)) ||
n_prompts != (khm_int32) n_cur_prompts)
goto _show_new_prompts;
@@ -858,7 +858,7 @@ k5_cached_kinit_prompter(void) {
break;
cb = sizeof(wprompt);
- if (KHM_FAILED(khc_read_string(csp_p, L"Prompt",
+ if (KHM_FAILED(khc_read_string(csp_p, L"Prompt",
wprompt, &cb))) {
khc_close_space(csp_p);
break;
@@ -896,7 +896,7 @@ k5_cached_kinit_prompter(void) {
break;
}
-
+
khc_close_space(csp_p);
}
@@ -915,7 +915,7 @@ k5_cached_kinit_prompter(void) {
wchar_t wpname[KHUI_MAXCCH_PNAME];
cb = sizeof(wbanner);
- if (KHM_FAILED(khc_read_string(csp_prcache, L"Banner",
+ if (KHM_FAILED(khc_read_string(csp_prcache, L"Banner",
wbanner, &cb)))
wbanner[0] = 0;
@@ -943,7 +943,7 @@ k5_cached_kinit_prompter(void) {
break;
cb = sizeof(wprompt);
- if (KHM_FAILED(khc_read_string(csp_p, L"Prompt",
+ if (KHM_FAILED(khc_read_string(csp_p, L"Prompt",
wprompt, &cb))) {
khc_close_space(csp_p);
break;
@@ -965,7 +965,7 @@ k5_cached_kinit_prompter(void) {
} else {
rv = TRUE;
}
-
+
_cleanup:
if (csp_prcache)
@@ -981,7 +981,7 @@ k5_cached_kinit_prompter(void) {
}
/* Runs in the context of the Krb5 plugin's slave fiber */
-krb5_error_code KRB5_CALLCONV
+krb5_error_code KRB5_CALLCONV
k5_kinit_prompter(krb5_context context,
void *data,
const char *name,
@@ -1040,7 +1040,7 @@ k5_kinit_prompter(krb5_context context,
khui_new_creds_prompt * p;
if(prompts[i].prompt) {
- AnsiStrToUnicode(wprompt, sizeof(wprompt),
+ AnsiStrToUnicode(wprompt, sizeof(wprompt),
prompts[i].prompt);
} else {
wprompt[0] = 0;
@@ -1176,8 +1176,8 @@ k5_kinit_prompter(krb5_context context,
khui_cw_clear_prompts(nc);
khui_cw_begin_custom_prompts(
- nc,
- num_prompts,
+ nc,
+ num_prompts,
(banner)?wbanner:NULL,
(name)?wname:NULL);
@@ -1228,7 +1228,7 @@ k5_kinit_prompter(krb5_context context,
wchar_t wprompt[KHUI_MAXCCH_PROMPT];
if(prompts[i].prompt) {
- AnsiStrToUnicode(wprompt, sizeof(wprompt),
+ AnsiStrToUnicode(wprompt, sizeof(wprompt),
prompts[i].prompt);
} else {
wprompt[0] = 0;
@@ -1249,7 +1249,7 @@ k5_kinit_prompter(krb5_context context,
wnum[0] = 0;
StringCbPrintf(wnum, sizeof(wnum), L"%d", i);
- khc_open_space(csp_prcache, wnum,
+ khc_open_space(csp_prcache, wnum,
KHM_FLAG_CREATE, &csp_p);
if (csp_p) {
@@ -1309,7 +1309,7 @@ k5_kinit_prompter(krb5_context context,
d->length = 0;
}
- if (ptypes &&
+ if (ptypes &&
ptypes[i] == KRB5_PROMPT_TYPE_PASSWORD &&
d->length == 0)
@@ -1328,7 +1328,7 @@ k5_kinit_prompter(krb5_context context,
}
-void
+void
k5_read_dlg_params(k5_dlg_data * d, khm_handle identity)
{
k5_params p;
@@ -1463,7 +1463,7 @@ k5_ensure_identity_ccache_is_watched(khm_handle identity, char * ccache)
} while(FALSE);
}
-void
+void
k5_write_dlg_params(k5_dlg_data * d, khm_handle identity, char * ccache)
{
@@ -1498,7 +1498,7 @@ k5_write_dlg_params(k5_dlg_data * d, khm_handle identity, char * ccache)
d->dirty = FALSE;
}
-void
+void
k5_free_kinit_job(void)
{
if (g_fjob.principal)
@@ -1519,7 +1519,7 @@ k5_free_kinit_job(void)
ZeroMemory(&g_fjob, sizeof(g_fjob));
}
-void
+void
k5_prep_kinit_job(khui_new_creds * nc)
{
khui_new_creds_by_type * nct;
@@ -1534,7 +1534,7 @@ k5_prep_kinit_job(khui_new_creds * nc)
if (!nct)
return;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(nct->hwnd_panel, DWLP_USER);
if (!d)
@@ -1642,7 +1642,7 @@ k5_prep_kinit_job(khui_new_creds * nc)
/* leave identity held, since we added a reference above */
}
-static khm_int32 KHMAPI
+static khm_int32 KHMAPI
k5_find_tgt_filter(khm_handle cred,
khm_int32 flags,
void * rock) {
@@ -1777,7 +1777,7 @@ k5_update_LRU(khm_handle identity)
} else if (rv == KHM_ERROR_SUCCESS) {
if (multi_string_find(wbuf, realm, KHM_CASE_SENSITIVE) != NULL) {
/* remove the realm and add it at the top later. */
- multi_string_delete(wbuf, realm, KHM_CASE_SENSITIVE);
+ multi_string_delete(wbuf, realm, KHM_CASE_SENSITIVE);
}
} else {
multi_string_init(wbuf, cb_ms);
@@ -1795,7 +1795,7 @@ k5_update_LRU(khm_handle identity)
}
rv = khc_write_multi_string(csp_params, L"LRURealms", wbuf);
-
+
assert(KHM_SUCCEEDED(rv));
_done_with_LRU:
@@ -1812,10 +1812,10 @@ k5_update_LRU(khm_handle identity)
Runs in the context of the Krb5 plugin
*/
-khm_int32 KHMAPI
-k5_msg_cred_dialog(khm_int32 msg_type,
- khm_int32 msg_subtype,
- khm_ui_4 uparam,
+khm_int32 KHMAPI
+k5_msg_cred_dialog(khm_int32 msg_type,
+ khm_int32 msg_subtype,
+ khm_ui_4 uparam,
void * vparam)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -1838,7 +1838,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
nct->type = credtype_id_krb5;
nct->ordinal = 1;
- LoadString(hResModule, IDS_KRB5_NC_NAME,
+ LoadString(hResModule, IDS_KRB5_NC_NAME,
wbuf, ARRAYLENGTH(wbuf));
StringCbLength(wbuf, sizeof(wbuf), &cbsize);
cbsize += sizeof(wchar_t);
@@ -1891,7 +1891,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
break;
hwnd = nct->hwnd_panel;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(nct->hwnd_panel, DWLP_USER);
/* this can be NULL if the dialog was closed while the
@@ -1902,14 +1902,14 @@ k5_msg_cred_dialog(khm_int32 msg_type,
if (!is_k5_identpro) {
/* enumerate all realms and place in realms combo box */
- SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
- CB_RESETCONTENT,
+ SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
+ CB_RESETCONTENT,
0, 0);
realms = khm_krb5_get_realm_list();
if(realms) {
for (t = realms; t && *t; t = multi_string_next(t)) {
- SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
+ SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
CB_ADDSTRING,
0, (LPARAM) t);
}
@@ -1924,8 +1924,8 @@ k5_msg_cred_dialog(khm_int32 msg_type,
(WPARAM) -1,
(LPARAM) defrealm);
- SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
- WM_SETTEXT,
+ SendDlgItemMessage(hwnd, IDC_NCK5_REALM,
+ WM_SETTEXT,
0, (LPARAM) defrealm);
PFREE(defrealm);
}
@@ -1946,24 +1946,24 @@ k5_msg_cred_dialog(khm_int32 msg_type,
k5_read_dlg_params(d, NULL);
}
- PostMessage(hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0,WMNC_DIALOG_SETUP), 0);
}
break;
-
+
case KMSG_CRED_DIALOG_NEW_IDENTITY:
{
khui_new_creds * nc;
khui_new_creds_by_type * nct;
k5_dlg_data * d;
-
+
nc = (khui_new_creds *) vparam;
khui_cw_find_type(nc, credtype_id_krb5, &nct);
if (!nct)
break;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(nct->hwnd_panel, DWLP_USER);
if (d == NULL)
@@ -1980,7 +1980,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
k5_read_dlg_params(d, nc->identities[0]);
- PostMessage(nct->hwnd_panel, KHUI_WM_NC_NOTIFY,
+ PostMessage(nct->hwnd_panel, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0,WMNC_DIALOG_SETUP), 0);
}
@@ -2004,7 +2004,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
if (!nct)
break;
- d = (k5_dlg_data *)(LONG_PTR)
+ d = (k5_dlg_data *)(LONG_PTR)
GetWindowLongPtr(nct->hwnd_panel, DWLP_USER);
if (d == NULL)
break;
@@ -2028,7 +2028,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
LoadString(hResModule, IDS_NC_PWD_PWD,
wbuf, ARRAYLENGTH(wbuf));
- khui_cw_add_prompt(nc, KHUI_NCPROMPT_TYPE_PASSWORD,
+ khui_cw_add_prompt(nc, KHUI_NCPROMPT_TYPE_PASSWORD,
wbuf, NULL, KHUI_NCPROMPT_FLAG_HIDDEN);
LoadString(hResModule, IDS_NC_PWD_NPWD,
@@ -2121,7 +2121,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
}
- if(g_fjob.code == KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN &&
+ if(g_fjob.code == KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN &&
is_k5_identpro) {
kcdb_identity_set_flags(ident,
KCDB_IDENT_FLAG_INVALID,
@@ -2212,7 +2212,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
/* this is what we want. Leave the fiber there. */
if(is_k5_identpro)
- kcdb_identity_set_flags(ident,
+ kcdb_identity_set_flags(ident,
KCDB_IDENT_FLAG_VALID,
KCDB_IDENT_FLAG_VALID);
} else {
@@ -2226,7 +2226,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
we should update the cred text as well */
kcdb_identity_release(ident);
khui_cw_lock_nc(nc);
- PostMessage(nc->hwnd, KHUI_WM_NC_NOTIFY,
+ PostMessage(nc->hwnd, KHUI_WM_NC_NOTIFY,
MAKEWPARAM(0, WMNC_UPDATE_CREDTEXT), 0);
} else {
khui_cw_unlock_nc(nc);
@@ -2434,7 +2434,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
pkrb5_free_context(ctx);
} else if (g_fjob.state == FIBER_STATE_NONE) {
/* the user cancelled the operation */
- r = KHUI_NC_RESPONSE_EXIT |
+ r = KHUI_NC_RESPONSE_EXIT |
KHUI_NC_RESPONSE_SUCCESS;
}
@@ -2456,7 +2456,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
}
} else {
khui_cw_set_response(nc, credtype_id_krb5,
- KHUI_NC_RESPONSE_NOEXIT |
+ KHUI_NC_RESPONSE_NOEXIT |
KHUI_NC_RESPONSE_PENDING | r);
}
@@ -2518,15 +2518,15 @@ k5_msg_cred_dialog(khm_int32 msg_type,
if (code == 0) {
_reportf(L"Tickets successfully renewed");
- khui_cw_set_response(nc, credtype_id_krb5,
- KHUI_NC_RESPONSE_EXIT |
+ khui_cw_set_response(nc, credtype_id_krb5,
+ KHUI_NC_RESPONSE_EXIT |
KHUI_NC_RESPONSE_SUCCESS);
} else if (nc->ctx.identity == 0) {
_report_mr0(KHERR_ERROR, MSG_ERR_NO_IDENTITY);
- khui_cw_set_response(nc, credtype_id_krb5,
- KHUI_NC_RESPONSE_EXIT |
+ khui_cw_set_response(nc, credtype_id_krb5,
+ KHUI_NC_RESPONSE_EXIT |
KHUI_NC_RESPONSE_FAILED);
} else if (CompareFileTime(&ftcurrent, &ftidexp) < 0) {
wchar_t tbuf[1024];
@@ -2548,7 +2548,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
_resolve();
- khui_cw_set_response(nc, credtype_id_krb5,
+ khui_cw_set_response(nc, credtype_id_krb5,
KHUI_NC_RESPONSE_EXIT |
KHUI_NC_RESPONSE_SUCCESS);
} else {
@@ -2565,13 +2565,13 @@ k5_msg_cred_dialog(khm_int32 msg_type,
_resolve();
- khui_cw_set_response(nc, credtype_id_krb5,
+ khui_cw_set_response(nc, credtype_id_krb5,
((sug_id == KHERR_SUGGEST_RETRY)?KHUI_NC_RESPONSE_NOEXIT:KHUI_NC_RESPONSE_EXIT) |
KHUI_NC_RESPONSE_FAILED);
}
} else {
- khui_cw_set_response(nc, credtype_id_krb5,
- KHUI_NC_RESPONSE_EXIT |
+ khui_cw_set_response(nc, credtype_id_krb5,
+ KHUI_NC_RESPONSE_EXIT |
KHUI_NC_RESPONSE_SUCCESS);
}
@@ -2833,7 +2833,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
_resolve();
}
- khui_cw_set_response(nc, credtype_id_krb5,
+ khui_cw_set_response(nc, credtype_id_krb5,
KHUI_NC_RESPONSE_NOEXIT|
KHUI_NC_RESPONSE_FAILED);
} else {
@@ -2862,7 +2862,7 @@ k5_msg_cred_dialog(khm_int32 msg_type,
break;
khui_cw_del_type(nc, credtype_id_krb5);
-
+
if (nct->name)
PFREE(nct->name);
if (nct->credtext)
diff --git a/src/windows/identity/plugins/krb5/krb5plugin.c b/src/windows/identity/plugins/krb5/krb5plugin.c
index 61331f3844..d8877a9c05 100644
--- a/src/windows/identity/plugins/krb5/krb5plugin.c
+++ b/src/windows/identity/plugins/krb5/krb5plugin.c
@@ -51,8 +51,8 @@ krb5_context k5_identpro_ctx = NULL;
/* The system message handler.
Runs in the context of the plugin thread */
-khm_int32 KHMAPI
-k5_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+k5_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -70,7 +70,7 @@ k5_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
ct.id = KCDB_CREDTYPE_AUTO;
ct.name = KRB5_CREDTYPE_NAME;
- if(LoadString(hResModule, IDS_KRB5_SHORT_DESC,
+ if(LoadString(hResModule, IDS_KRB5_SHORT_DESC,
buf, ARRAYLENGTH(buf))) {
StringCbLength(buf, KCDB_MAXCB_SHORT_DESC, &cbsize);
cbsize += sizeof(wchar_t);
@@ -81,7 +81,7 @@ k5_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
/* even though ideally we should be setting limits
based KCDB_MAXCB_LONG_DESC, our long description
actually fits nicely in KCDB_MAXCB_SHORT_DESC */
- if(LoadString(hResModule, IDS_KRB5_LONG_DESC,
+ if(LoadString(hResModule, IDS_KRB5_LONG_DESC,
buf, ARRAYLENGTH(buf))) {
StringCbLength(buf, KCDB_MAXCB_SHORT_DESC, &cbsize);
cbsize += sizeof(wchar_t);
@@ -191,8 +191,8 @@ k5_msg_kcdb(khm_int32 msg_type, khm_int32 msg_subtype,
Runs in the context of the Krb5 plugin
*/
-khm_int32 KHMAPI
-k5_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+k5_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
khm_int32 rv = KHM_ERROR_SUCCESS;
@@ -237,7 +237,7 @@ k5_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
default:
if(IS_CRED_ACQ_MSG(msg_subtype))
- return k5_msg_cred_dialog(msg_type, msg_subtype,
+ return k5_msg_cred_dialog(msg_type, msg_subtype,
uparam, vparam);
}
@@ -249,8 +249,8 @@ k5_msg_cred(khm_int32 msg_type, khm_int32 msg_subtype,
Runs in the context of the Krb5 plugin
*/
-khm_int32 KHMAPI
-k5_msg_callback(khm_int32 msg_type, khm_int32 msg_subtype,
+khm_int32 KHMAPI
+k5_msg_callback(khm_int32 msg_type, khm_int32 msg_subtype,
khm_ui_4 uparam, void * vparam)
{
switch(msg_type) {
diff --git a/src/windows/identity/plugins/krb5/krb5props.c b/src/windows/identity/plugins/krb5/krb5props.c
index 312b576fd1..d1553e6d6d 100644
--- a/src/windows/identity/plugins/krb5/krb5props.c
+++ b/src/windows/identity/plugins/krb5/krb5props.c
@@ -42,7 +42,7 @@ INT_PTR CALLBACK krb5_pp_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam
- )
+ )
{
switch(uMsg) {
case WM_INITDIALOG:
@@ -72,8 +72,8 @@ INT_PTR CALLBACK krb5_pp_proc(HWND hwnd,
SetDlgItemText(hwnd, IDC_PPK5_NAME, buf);
cbsize = sizeof(buf);
- rv = kcdb_cred_get_attr_string(s->cred,
- KCDB_ATTR_ISSUE,
+ rv = kcdb_cred_get_attr_string(s->cred,
+ KCDB_ATTR_ISSUE,
buf, &cbsize, 0);
if (KHM_SUCCEEDED(rv))
SetDlgItemText(hwnd, IDC_PPK5_ISSUE, buf);
@@ -81,8 +81,8 @@ INT_PTR CALLBACK krb5_pp_proc(HWND hwnd,
SetDlgItemText(hwnd, IDC_PPK5_ISSUE, unavailable);
cbsize = sizeof(buf);
- rv = kcdb_cred_get_attr_string(s->cred,
- KCDB_ATTR_EXPIRE,
+ rv = kcdb_cred_get_attr_string(s->cred,
+ KCDB_ATTR_EXPIRE,
buf, &cbsize, 0);
if (KHM_SUCCEEDED(rv))
SetDlgItemText(hwnd, IDC_PPK5_VALID, buf);
@@ -90,8 +90,8 @@ INT_PTR CALLBACK krb5_pp_proc(HWND hwnd,
SetDlgItemText(hwnd, IDC_PPK5_VALID, unavailable);
cbsize = sizeof(buf);
- rv = kcdb_cred_get_attr_string(s->cred,
- KCDB_ATTR_RENEW_EXPIRE,
+ rv = kcdb_cred_get_attr_string(s->cred,
+ KCDB_ATTR_RENEW_EXPIRE,
buf, &cbsize, 0);
if (KHM_SUCCEEDED(rv))
SetDlgItemText(hwnd, IDC_PPK5_RENEW, buf);
@@ -173,4 +173,3 @@ void k5_pp_end(khui_property_sheet * s)
p->p_page = NULL;
}
}
-
diff --git a/src/windows/identity/plugins/krb5/krbcred.h b/src/windows/identity/plugins/krb5/krbcred.h
index ddc745c935..d90a39e461 100644
--- a/src/windows/identity/plugins/krb5/krbcred.h
+++ b/src/windows/identity/plugins/krb5/krbcred.h
@@ -190,30 +190,30 @@ extern fiber_job g_fjob; /* global fiber job object */
#define K5_SET_CRED_MSG WMNC_USER
-void
+void
k5_pp_begin(khui_property_sheet * s);
-void
+void
k5_pp_end(khui_property_sheet * s);
-khm_int32 KHMAPI
-k5_msg_cred_dialog(khm_int32 msg_type,
- khm_int32 msg_subtype,
- khm_ui_4 uparam,
+khm_int32 KHMAPI
+k5_msg_cred_dialog(khm_int32 msg_type,
+ khm_int32 msg_subtype,
+ khm_ui_4 uparam,
void * vparam);
-khm_int32 KHMAPI
-k5_msg_ident(khm_int32 msg_type,
- khm_int32 msg_subtype,
- khm_ui_4 uparam,
+khm_int32 KHMAPI
+k5_msg_ident(khm_int32 msg_type,
+ khm_int32 msg_subtype,
+ khm_ui_4 uparam,
void * vparam);
khm_int32
k5_remove_from_LRU(khm_handle identity);
-int
-k5_get_realm_from_nc(khui_new_creds * nc,
- wchar_t * buf,
+int
+k5_get_realm_from_nc(khui_new_creds * nc,
+ wchar_t * buf,
khm_size cch_buf);
void
@@ -222,19 +222,19 @@ k5_register_config_panels(void);
void
k5_unregister_config_panels(void);
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_ccconfig_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam);
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_id_tab_dlgproc(HWND hwndDlg,
UINT uMsg,
WPARAM wParam,
LPARAM lParam);
-INT_PTR CALLBACK
+INT_PTR CALLBACK
k5_ids_tab_dlgproc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
diff --git a/src/windows/identity/plugins/krb5/langres.h b/src/windows/identity/plugins/krb5/langres.h
index 117754b3e8..2c6566d787 100644
--- a/src/windows/identity/plugins/krb5/langres.h
+++ b/src/windows/identity/plugins/krb5/langres.h
@@ -205,7 +205,7 @@
#define ID_FOO_BAR 40001
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 219