Skip to content

Commit c5d3704

Browse files
authored
Merge pull request #636 from JacobBarthelmeh/warnings
resolving build warnings
2 parents 51cce7b + 0e3ec03 commit c5d3704

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

apps/wolfsshd/auth.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939

4040
#ifndef _WIN32
4141
#include <unistd.h>
42+
#else
43+
/* avoid macro redefinition warnings on STATUS values when include ntstatus.h */
44+
#define UMDF_USING_NTSTATUS
4245
#endif
4346

4447
#include <wolfssh/ssh.h>
@@ -685,6 +688,21 @@ static int CheckPublicKeyUnix(const char* name,
685688

686689
#include <UserEnv.h>
687690
#include <KnownFolders.h>
691+
692+
/* Pulled in from Advapi32.dll */
693+
extern BOOL WINAPI LogonUserExExW(LPTSTR usr,
694+
LPTSTR dmn,
695+
LPTSTR paswd,
696+
DWORD logonType,
697+
DWORD logonProv,
698+
PTOKEN_GROUPS tokenGrp,
699+
PHANDLE tokenPh,
700+
PSID* loginSid,
701+
PVOID* pBuffer,
702+
LPDWORD pBufferLen ,
703+
PQUOTA_LIMITS quotaLimits
704+
);
705+
688706
#define MAX_USERNAME 256
689707

690708
static int _GetHomeDirectory(WOLFSSHD_AUTH* auth, const char* usr, WCHAR* out, int outSz)
@@ -705,7 +723,7 @@ static int _GetHomeDirectory(WOLFSSHD_AUTH* auth, const char* usr, WCHAR* out, i
705723
CoTaskMemFree(homeDir);
706724
}
707725
else {
708-
PROFILEINFO pInfo = { sizeof(PROFILEINFO) };
726+
PROFILEINFO pInfo = { 0 };
709727

710728
/* failed with get known folder path, try with loading the user profile */
711729
pInfo.dwFlags = PI_NOUI;

0 commit comments

Comments
 (0)