#include "gssapiP_eap.h"
-#ifndef WIN32
+#ifdef WIN32
+#include <shlobj.h>
+#else
#include <pwd.h>
#endif
}
if (GSSEAP_MUTEX_INIT(&cred->mutex) != 0) {
- *minor = errno;
+ *minor = GSSEAP_GET_LAST_ERROR();
gssEapReleaseCred(&tmpMinor, &cred);
return GSS_S_FAILURE;
}
{
OM_uint32 major, tmpMinor;
FILE *fp = NULL;
- char pwbuf[BUFSIZ], buf[BUFSIZ];
+ char buf[BUFSIZ];
char *ccacheName;
- struct passwd *pw = NULL, pwd;
int i = 0;
+#ifndef WIN32
+ struct passwd *pw = NULL, pwd;
+ char pwbuf[BUFSIZ];
+#endif
defaultIdentity->length = 0;
defaultIdentity->value = NULL;
if (getpwuid_r(getuid(), &pwd, pwbuf, sizeof(pwbuf), &pw) != 0 ||
pw == NULL || pw->pw_dir == NULL) {
major = GSS_S_CRED_UNAVAIL;
- *minor = errno;
+ *minor = GSSEAP_GET_LAST_ERROR();
goto cleanup;
}