* Makefile.in: Rearrange to avoid -mno-cygwin.
* configure.in: Use mingw front-end from utils directory as compiler front-end. * configure: Regenerate. * cyglsa.c (cyglsa_printf): Rename from 'printf' to avoid a compiler error. (print_sid, print_groups, print_privs, print_dacl, print_tokinf, LsaApLogonUserEx): Ditto.
This commit is contained in:
parent
12c819e204
commit
4941ce49c5
@ -1,3 +1,14 @@
|
|||||||
|
2008-10-12 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
|
* Makefile.in: Rearrange to avoid -mno-cygwin.
|
||||||
|
* configure.in: Use mingw front-end from utils directory as compiler
|
||||||
|
front-end.
|
||||||
|
* configure: Regenerate.
|
||||||
|
* cyglsa.c (cyglsa_printf): Rename from 'printf' to avoid a compiler
|
||||||
|
error.
|
||||||
|
(print_sid, print_groups, print_privs, print_dacl, print_tokinf,
|
||||||
|
LsaApLogonUserEx): Ditto.
|
||||||
|
|
||||||
2008-08-13 Corinna Vinschen <corinna@vinschen.de>
|
2008-08-13 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* cyglsa-config: Copy the DLL instead of moving.
|
* cyglsa-config: Copy the DLL instead of moving.
|
||||||
|
@ -29,15 +29,20 @@ INSTALL_DATA := @INSTALL_DATA@
|
|||||||
CC := @CC@
|
CC := @CC@
|
||||||
CC_FOR_TARGET := $(CC)
|
CC_FOR_TARGET := $(CC)
|
||||||
|
|
||||||
|
override CC := @NO_CYGWIN@ $(firstword ${CC})
|
||||||
|
|
||||||
CFLAGS := @CFLAGS@
|
CFLAGS := @CFLAGS@
|
||||||
|
|
||||||
include $(srcdir)/../Makefile.common
|
include $(srcdir)/../Makefile.common
|
||||||
|
|
||||||
WIN32_COMMON := -mno-cygwin
|
|
||||||
WIN32_INCLUDES := -I. -I$(srcdir) $(w32api_include) $(w32api_include)/ddk
|
WIN32_INCLUDES := -I. -I$(srcdir) $(w32api_include) $(w32api_include)/ddk
|
||||||
WIN32_CFLAGS := $(CFLAGS) $(WIN32_COMMON) $(WIN32_INCLUDES)
|
WIN32_CFLAGS := $(CFLAGS) $(WIN32_COMMON) $(WIN32_INCLUDES)
|
||||||
WIN32_LDFLAGS := $(CFLAGS) $(WIN32_COMMON) -nostdlib -Wl,-shared
|
WIN32_LDFLAGS := $(CFLAGS) $(WIN32_COMMON) -nostdlib -Wl,-shared
|
||||||
|
|
||||||
|
ifdef MINGW_CC
|
||||||
|
override CC:=${MINGW_CC}
|
||||||
|
endif
|
||||||
|
|
||||||
LIBS := -ladvapi32 -lkernel32 -lntdll
|
LIBS := -ladvapi32 -lkernel32 -lntdll
|
||||||
|
|
||||||
DLL := cyglsa.dll
|
DLL := cyglsa.dll
|
||||||
@ -54,12 +59,7 @@ $(DEF_FILE): cyglsa.din config.status
|
|||||||
$(SHELL) config.status
|
$(SHELL) config.status
|
||||||
|
|
||||||
$(DLL): $(OBJ) $(DEF_FILE)
|
$(DLL): $(OBJ) $(DEF_FILE)
|
||||||
ifdef VERBOSE
|
$(CC) -s $(WIN32_LDFLAGS) -o $@ $^ $(LIBS)
|
||||||
$(CC) -s $(WIN32_LDFLAGS) -o $@ $(DEF_FILE) $(OBJ) $(LIBS)
|
|
||||||
else
|
|
||||||
@echo $(CC) .. -o $@ $(OBJ)
|
|
||||||
@$(CC) -s $(WIN32_LDFLAGS) -o $@ $(DEF_FILE) $(OBJ) $(LIBS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: all install clean realclean
|
.PHONY: all install clean realclean
|
||||||
|
|
||||||
@ -76,10 +76,4 @@ install: all
|
|||||||
$(INSTALL_PROGRAM) $(srcdir)/cyglsa-config $(bindir)/cyglsa-config
|
$(INSTALL_PROGRAM) $(srcdir)/cyglsa-config $(bindir)/cyglsa-config
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
ifdef VERBOSE
|
|
||||||
$(CC) $(WIN32_CFLAGS) -c -o $@ $<
|
$(CC) $(WIN32_CFLAGS) -c -o $@ $<
|
||||||
else
|
|
||||||
@echo $(CC) -c $(CFLAGS) ... $(<F)
|
|
||||||
@$(CC) $(WIN32_CFLAGS) -c -o $@ $<
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
3869
winsup/lsaauth/configure
vendored
3869
winsup/lsaauth/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -24,6 +24,9 @@ AC_CANONICAL_SYSTEM
|
|||||||
|
|
||||||
LIB_AC_PROG_CC
|
LIB_AC_PROG_CC
|
||||||
|
|
||||||
|
NO_CYGWIN="$(cd ${srcdir}/../utils; pwd)/mingw"
|
||||||
|
|
||||||
|
AC_SUBST(NO_CYGWIN)
|
||||||
AC_ARG_PROGRAM
|
AC_ARG_PROGRAM
|
||||||
|
|
||||||
if test "x$cross_compiling" = "xyes"; then
|
if test "x$cross_compiling" = "xyes"; then
|
||||||
|
@ -76,7 +76,7 @@ extern int _vsnprintf (char *, size_t, const char *, va_list);
|
|||||||
static HANDLE fh = INVALID_HANDLE_VALUE;
|
static HANDLE fh = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
printf (const char *format, ...)
|
cyglsa_printf (const char *format, ...)
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[256];
|
||||||
DWORD wr;
|
DWORD wr;
|
||||||
@ -103,24 +103,24 @@ print_sid (const char *prefix, int idx, PISID sid)
|
|||||||
{
|
{
|
||||||
DWORD i;
|
DWORD i;
|
||||||
|
|
||||||
printf ("%s", prefix);
|
cyglsa_printf ("%s", prefix);
|
||||||
if (idx >= 0)
|
if (idx >= 0)
|
||||||
printf ("[%d] ", idx);
|
cyglsa_printf ("[%d] ", idx);
|
||||||
printf ("(0x%08x) ", (INT_PTR) sid);
|
cyglsa_printf ("(0x%08x) ", (INT_PTR) sid);
|
||||||
if (!sid)
|
if (!sid)
|
||||||
printf ("NULL\n");
|
cyglsa_printf ("NULL\n");
|
||||||
else if (IsBadReadPtr (sid, 8))
|
else if (IsBadReadPtr (sid, 8))
|
||||||
printf ("INVALID POINTER\n");
|
cyglsa_printf ("INVALID POINTER\n");
|
||||||
else if (!IsValidSid ((PSID) sid))
|
else if (!IsValidSid ((PSID) sid))
|
||||||
printf ("INVALID SID\n");
|
cyglsa_printf ("INVALID SID\n");
|
||||||
else if (IsBadReadPtr (sid, 8 + sizeof (DWORD) * sid->SubAuthorityCount))
|
else if (IsBadReadPtr (sid, 8 + sizeof (DWORD) * sid->SubAuthorityCount))
|
||||||
printf ("INVALID POINTER SPACE\n");
|
cyglsa_printf ("INVALID POINTER SPACE\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf ("S-%d-%d", sid->Revision, sid->IdentifierAuthority.Value[5]);
|
cyglsa_printf ("S-%d-%d", sid->Revision, sid->IdentifierAuthority.Value[5]);
|
||||||
for (i = 0; i < sid->SubAuthorityCount; ++i)
|
for (i = 0; i < sid->SubAuthorityCount; ++i)
|
||||||
printf ("-%lu", sid->SubAuthority[i]);
|
cyglsa_printf ("-%lu", sid->SubAuthority[i]);
|
||||||
printf ("\n");
|
cyglsa_printf ("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,20 +129,20 @@ print_groups (PTOKEN_GROUPS grps)
|
|||||||
{
|
{
|
||||||
DWORD i;
|
DWORD i;
|
||||||
|
|
||||||
printf ("Groups: (0x%08x) ", (INT_PTR) grps);
|
cyglsa_printf ("Groups: (0x%08x) ", (INT_PTR) grps);
|
||||||
if (!grps)
|
if (!grps)
|
||||||
printf ("NULL\n");
|
cyglsa_printf ("NULL\n");
|
||||||
else if (IsBadReadPtr (grps, sizeof (DWORD)))
|
else if (IsBadReadPtr (grps, sizeof (DWORD)))
|
||||||
printf ("INVALID POINTER\n");
|
cyglsa_printf ("INVALID POINTER\n");
|
||||||
else if (IsBadReadPtr (grps, sizeof (DWORD) + sizeof (SID_AND_ATTRIBUTES)
|
else if (IsBadReadPtr (grps, sizeof (DWORD) + sizeof (SID_AND_ATTRIBUTES)
|
||||||
* grps->GroupCount))
|
* grps->GroupCount))
|
||||||
printf ("INVALID POINTER SPACE\n");
|
cyglsa_printf ("INVALID POINTER SPACE\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf ("Count: %lu\n", grps->GroupCount);
|
cyglsa_printf ("Count: %lu\n", grps->GroupCount);
|
||||||
for (i = 0; i < grps->GroupCount; ++i)
|
for (i = 0; i < grps->GroupCount; ++i)
|
||||||
{
|
{
|
||||||
printf ("(attr: 0x%lx)", grps->Groups[i].Attributes);
|
cyglsa_printf ("(attr: 0x%lx)", grps->Groups[i].Attributes);
|
||||||
print_sid (" ", i, (PISID) grps->Groups[i].Sid);
|
print_sid (" ", i, (PISID) grps->Groups[i].Sid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -153,19 +153,19 @@ print_privs (PTOKEN_PRIVILEGES privs)
|
|||||||
{
|
{
|
||||||
DWORD i;
|
DWORD i;
|
||||||
|
|
||||||
printf ("Privileges: (0x%08x) ", (INT_PTR) privs);
|
cyglsa_printf ("Privileges: (0x%08x) ", (INT_PTR) privs);
|
||||||
if (!privs)
|
if (!privs)
|
||||||
printf ("NULL\n");
|
cyglsa_printf ("NULL\n");
|
||||||
else if (IsBadReadPtr (privs, sizeof (DWORD)))
|
else if (IsBadReadPtr (privs, sizeof (DWORD)))
|
||||||
printf ("INVALID POINTER\n");
|
cyglsa_printf ("INVALID POINTER\n");
|
||||||
else if (IsBadReadPtr (privs, sizeof (DWORD) + sizeof (LUID_AND_ATTRIBUTES)
|
else if (IsBadReadPtr (privs, sizeof (DWORD) + sizeof (LUID_AND_ATTRIBUTES)
|
||||||
* privs->PrivilegeCount))
|
* privs->PrivilegeCount))
|
||||||
printf ("INVALID POINTER SPACE\n");
|
cyglsa_printf ("INVALID POINTER SPACE\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf ("Count: %lu\n", privs->PrivilegeCount);
|
cyglsa_printf ("Count: %lu\n", privs->PrivilegeCount);
|
||||||
for (i = 0; i < privs->PrivilegeCount; ++i)
|
for (i = 0; i < privs->PrivilegeCount; ++i)
|
||||||
printf ("Luid: {%ld, %lu} Attributes: 0x%lx\n",
|
cyglsa_printf ("Luid: {%ld, %lu} Attributes: 0x%lx\n",
|
||||||
privs->Privileges[i].Luid.HighPart,
|
privs->Privileges[i].Luid.HighPart,
|
||||||
privs->Privileges[i].Luid.LowPart,
|
privs->Privileges[i].Luid.LowPart,
|
||||||
privs->Privileges[i].Attributes);
|
privs->Privileges[i].Attributes);
|
||||||
@ -177,27 +177,27 @@ print_dacl (PACL dacl)
|
|||||||
{
|
{
|
||||||
DWORD i;
|
DWORD i;
|
||||||
|
|
||||||
printf ("DefaultDacl: (0x%08x) ", (INT_PTR) dacl);
|
cyglsa_printf ("DefaultDacl: (0x%08x) ", (INT_PTR) dacl);
|
||||||
if (!dacl)
|
if (!dacl)
|
||||||
printf ("NULL\n");
|
cyglsa_printf ("NULL\n");
|
||||||
else if (IsBadReadPtr (dacl, sizeof (ACL)))
|
else if (IsBadReadPtr (dacl, sizeof (ACL)))
|
||||||
printf ("INVALID POINTER\n");
|
cyglsa_printf ("INVALID POINTER\n");
|
||||||
else if (IsBadReadPtr (dacl, dacl->AclSize))
|
else if (IsBadReadPtr (dacl, dacl->AclSize))
|
||||||
printf ("INVALID POINTER SPACE\n");
|
cyglsa_printf ("INVALID POINTER SPACE\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf ("Rev: %d, Count: %d\n", dacl->AclRevision, dacl->AceCount);
|
cyglsa_printf ("Rev: %d, Count: %d\n", dacl->AclRevision, dacl->AceCount);
|
||||||
for (i = 0; i < dacl->AceCount; ++i)
|
for (i = 0; i < dacl->AceCount; ++i)
|
||||||
{
|
{
|
||||||
PVOID vace;
|
PVOID vace;
|
||||||
PACCESS_ALLOWED_ACE ace;
|
PACCESS_ALLOWED_ACE ace;
|
||||||
|
|
||||||
if (!GetAce (dacl, i, &vace))
|
if (!GetAce (dacl, i, &vace))
|
||||||
printf ("[%lu] GetAce error %lu\n", i, GetLastError ());
|
cyglsa_printf ("[%lu] GetAce error %lu\n", i, GetLastError ());
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ace = (PACCESS_ALLOWED_ACE) vace;
|
ace = (PACCESS_ALLOWED_ACE) vace;
|
||||||
printf ("Type: %x, Flags: %x, Access: %lx,",
|
cyglsa_printf ("Type: %x, Flags: %x, Access: %lx,",
|
||||||
ace->Header.AceType, ace->Header.AceFlags, (DWORD) ace->Mask);
|
ace->Header.AceType, ace->Header.AceFlags, (DWORD) ace->Mask);
|
||||||
print_sid (" ", i, (PISID) &ace->SidStart);
|
print_sid (" ", i, (PISID) &ace->SidStart);
|
||||||
}
|
}
|
||||||
@ -212,15 +212,15 @@ print_tokinf (PLSA_TOKEN_INFORMATION_V2 ptok, size_t size,
|
|||||||
if (fh == INVALID_HANDLE_VALUE)
|
if (fh == INVALID_HANDLE_VALUE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printf ("INCOMING: start: 0x%08x infstart: 0x%08x infend: 0x%08x\n",
|
cyglsa_printf ("INCOMING: start: 0x%08x infstart: 0x%08x infend: 0x%08x\n",
|
||||||
(INT_PTR) got_start, (INT_PTR) gotinf_start,
|
(INT_PTR) got_start, (INT_PTR) gotinf_start,
|
||||||
(INT_PTR) gotinf_end);
|
(INT_PTR) gotinf_end);
|
||||||
|
|
||||||
printf ("LSA_TOKEN_INFORMATION_V2: 0x%08x - 0x%08x\n",
|
cyglsa_printf ("LSA_TOKEN_INFORMATION_V2: 0x%08x - 0x%08x\n",
|
||||||
(INT_PTR) ptok, (INT_PTR) ptok + size);
|
(INT_PTR) ptok, (INT_PTR) ptok + size);
|
||||||
|
|
||||||
/* User SID */
|
/* User SID */
|
||||||
printf ("User: (attr: 0x%lx)", ptok->User.User.Attributes);
|
cyglsa_printf ("User: (attr: 0x%lx)", ptok->User.User.Attributes);
|
||||||
print_sid (" ", -1, (PISID) ptok->User.User.Sid);
|
print_sid (" ", -1, (PISID) ptok->User.User.Sid);
|
||||||
|
|
||||||
/* Groups */
|
/* Groups */
|
||||||
@ -278,7 +278,7 @@ LsaApInitializePackage (ULONG authp_id, PLSA_SECPKG_FUNCS dpt,
|
|||||||
fh = CreateFile ("C:\\cyglsa.dbgout", GENERIC_WRITE,
|
fh = CreateFile ("C:\\cyglsa.dbgout", GENERIC_WRITE,
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||||
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||||
printf ("Initialized\n");
|
cyglsa_printf ("Initialized\n");
|
||||||
#endif /* DEBUGGING */
|
#endif /* DEBUGGING */
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
@ -304,12 +304,12 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
|
|||||||
stat = funcs->GetClientInfo (&clinf);
|
stat = funcs->GetClientInfo (&clinf);
|
||||||
if (stat != STATUS_SUCCESS)
|
if (stat != STATUS_SUCCESS)
|
||||||
{
|
{
|
||||||
printf ("GetClientInfo failed: 0x%08lx\n", stat);
|
cyglsa_printf ("GetClientInfo failed: 0x%08lx\n", stat);
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
if (!clinf.HasTcbPrivilege)
|
if (!clinf.HasTcbPrivilege)
|
||||||
{
|
{
|
||||||
printf ("Client has no TCB privilege. Access denied.\n");
|
cyglsa_printf ("Client has no TCB privilege. Access denied.\n");
|
||||||
return STATUS_ACCESS_DENIED;
|
return STATUS_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,7 +319,7 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
|
|||||||
|| !authinf->username[0]
|
|| !authinf->username[0]
|
||||||
|| !authinf->domain[0])
|
|| !authinf->domain[0])
|
||||||
{
|
{
|
||||||
printf ("Invalid authentication parameter.\n");
|
cyglsa_printf ("Invalid authentication parameter.\n");
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
checksum = CYGWIN_VERSION_MAGIC (CYGWIN_VERSION_DLL_MAJOR,
|
checksum = CYGWIN_VERSION_MAGIC (CYGWIN_VERSION_DLL_MAJOR,
|
||||||
@ -330,7 +330,7 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
|
|||||||
checksum += *csp++;
|
checksum += *csp++;
|
||||||
if (authinf->checksum != checksum)
|
if (authinf->checksum != checksum)
|
||||||
{
|
{
|
||||||
printf ("Invalid checksum.\n");
|
cyglsa_printf ("Invalid checksum.\n");
|
||||||
return STATUS_INVALID_PARAMETER_3;
|
return STATUS_INVALID_PARAMETER_3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,13 +342,13 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
|
|||||||
if (account && !(*account = uni_alloc (authinf->username,
|
if (account && !(*account = uni_alloc (authinf->username,
|
||||||
wcslen (authinf->username))))
|
wcslen (authinf->username))))
|
||||||
{
|
{
|
||||||
printf ("No memory trying to create account.\n");
|
cyglsa_printf ("No memory trying to create account.\n");
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
if (authority && !(*authority = uni_alloc (authinf->domain,
|
if (authority && !(*authority = uni_alloc (authinf->domain,
|
||||||
wcslen (authinf->domain))))
|
wcslen (authinf->domain))))
|
||||||
{
|
{
|
||||||
printf ("No memory trying to create authority.\n");
|
cyglsa_printf ("No memory trying to create authority.\n");
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
if (machine)
|
if (machine)
|
||||||
@ -359,7 +359,7 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
|
|||||||
wcscpy (mach, L"UNKNOWN");
|
wcscpy (mach, L"UNKNOWN");
|
||||||
if (!(*machine = uni_alloc (mach, wcslen (mach))))
|
if (!(*machine = uni_alloc (mach, wcslen (mach))))
|
||||||
{
|
{
|
||||||
printf ("No memory trying to create machine.\n");
|
cyglsa_printf ("No memory trying to create machine.\n");
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -382,7 +382,7 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
|
|||||||
stat = funcs->AllocateClientBuffer (request, 64UL, pbuf);
|
stat = funcs->AllocateClientBuffer (request, 64UL, pbuf);
|
||||||
if (!LSA_SUCCESS (stat))
|
if (!LSA_SUCCESS (stat))
|
||||||
{
|
{
|
||||||
printf ("AllocateClientBuffer failed: 0x%08lx\n", stat);
|
cyglsa_printf ("AllocateClientBuffer failed: 0x%08lx\n", stat);
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
#ifdef JUST_ANOTHER_NONWORKING_SOLUTION
|
#ifdef JUST_ANOTHER_NONWORKING_SOLUTION
|
||||||
@ -413,7 +413,7 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
|
|||||||
{
|
{
|
||||||
char sam_u[MAX_DOMAIN_NAME_LEN + UNLEN + 2];
|
char sam_u[MAX_DOMAIN_NAME_LEN + UNLEN + 2];
|
||||||
wcstombs (sam_u, sam_user.Buffer, sizeof (sam_u));
|
wcstombs (sam_u, sam_user.Buffer, sizeof (sam_u));
|
||||||
printf ("GetAuthDataForUser (%u,%u,%s) failed: 0x%08lx\n",
|
cyglsa_printf ("GetAuthDataForUser (%u,%u,%s) failed: 0x%08lx\n",
|
||||||
sam_user.Length, sam_user.MaximumLength, sam_u, stat);
|
sam_user.Length, sam_user.MaximumLength, sam_u, stat);
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
@ -430,21 +430,21 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
|
|||||||
sub_stat);
|
sub_stat);
|
||||||
if (!NT_SUCCESS (stat))
|
if (!NT_SUCCESS (stat))
|
||||||
{
|
{
|
||||||
printf ("ConvertAuthDataToToken failed: 0x%08lx\n", stat);
|
cyglsa_printf ("ConvertAuthDataToToken failed: 0x%08lx\n", stat);
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
|
|
||||||
stat = funcs->DuplicateHandle (token, &prf.token);
|
stat = funcs->DuplicateHandle (token, &prf.token);
|
||||||
if (!NT_SUCCESS (stat))
|
if (!NT_SUCCESS (stat))
|
||||||
{
|
{
|
||||||
printf ("DuplicateHandle failed: 0x%08lx\n", stat);
|
cyglsa_printf ("DuplicateHandle failed: 0x%08lx\n", stat);
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
|
|
||||||
stat = funcs->CopyToClientBuffer (request, sizeof prf, *pbuf, &prf);
|
stat = funcs->CopyToClientBuffer (request, sizeof prf, *pbuf, &prf);
|
||||||
if (!NT_SUCCESS (stat))
|
if (!NT_SUCCESS (stat))
|
||||||
{
|
{
|
||||||
printf ("CopyToClientBuffer failed: 0x%08lx\n", stat);
|
cyglsa_printf ("CopyToClientBuffer failed: 0x%08lx\n", stat);
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
funcs->FreeLsaHeap (user_auth);
|
funcs->FreeLsaHeap (user_auth);
|
||||||
@ -598,7 +598,7 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
|
|||||||
{
|
{
|
||||||
funcs->FreeLsaHeap (*tok);
|
funcs->FreeLsaHeap (*tok);
|
||||||
*tok = NULL;
|
*tok = NULL;
|
||||||
printf ("AllocateLocallyUniqueId failed: Win32 error %lu\n",
|
cyglsa_printf ("AllocateLocallyUniqueId failed: Win32 error %lu\n",
|
||||||
GetLastError ());
|
GetLastError ());
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
@ -607,11 +607,11 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
|
|||||||
{
|
{
|
||||||
funcs->FreeLsaHeap (*tok);
|
funcs->FreeLsaHeap (*tok);
|
||||||
*tok = NULL;
|
*tok = NULL;
|
||||||
printf ("CreateLogonSession failed: 0x%08lx\n", stat);
|
cyglsa_printf ("CreateLogonSession failed: 0x%08lx\n", stat);
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("BINGO!!!\n", stat);
|
cyglsa_printf ("BINGO!!!\n", stat);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user