diff options
author | cvs2svn <> | 2012-08-10 13:37:35 +0400 |
---|---|---|
committer | cvs2svn <> | 2012-08-10 13:37:35 +0400 |
commit | 316eee31fe861ecb6db3905a85719fd536f984be (patch) | |
tree | 504dc9042e08d314c2b0222092d0a63314981e7e /winsup/lsaauth | |
parent | c0956742a74d194b9c18c7a91aa6d6010beb4cd3 (diff) |
This commit was manufactured by cvs2svn to create tag 'cygwin-cygwin-1_7_11-release
1_7_11-release'.
Sprout from cygwin-64bit-branch 2012-08-10 09:37:33 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch 'cygwin-64bit-'
Cherrypick from master 2012-02-25 10:51:32 UTC Corinna Vinschen <corinna@vinschen.de> ' * new-features.sgml (ov-new1.7.11): Add two more changes to the list.':
COPYING.LIBGLOSS
COPYING.NEWLIB
COPYING3
COPYING3.LIB
ChangeLog
MAINTAINERS
compile
config.rpath
config.sub
config/ChangeLog
config/mh-darwin
config/mh-interix
config/mh-ppc-aix
config/mt-alphaieee
config/mt-sde
config/picflag.m4
config/stdint.m4
config/tcl.m4
configure
configure.ac
include/ChangeLog
include/bfdlink.h
include/dis-asm.h
include/dwarf2.h
include/elf/ChangeLog
include/elf/avr.h
include/elf/common.h
include/elf/m68hc11.h
include/elf/mn10300.h
include/elf/ppc.h
include/elf/s390.h
include/elf/sparc.h
include/elf/tilegx.h
include/elf/tilepro.h
include/filenames.h
include/gdb/ChangeLog
include/gdb/callback.h
include/gdb/signals.def
include/gdb/signals.h
include/mach-o/ChangeLog
include/mach-o/codesign.h
include/mach-o/external.h
include/mach-o/loader.h
include/mach-o/reloc.h
include/mach-o/x86-64.h
include/opcode/ChangeLog
include/opcode/avr.h
include/opcode/crx.h
include/opcode/m68hc11.h
include/opcode/mips.h
include/opcode/ppc.h
include/opcode/sparc.h
include/opcode/tilegx.h
include/opcode/tilepro.h
include/plugin-api.h
include/splay-tree.h
include/vms/ChangeLog
include/vms/lbr.h
ltgcc.m4
ltoptions.m4
ltversion.m4
lt~obsolete.m4
newlib/ChangeLog
newlib/doc/Makefile.am
newlib/doc/Makefile.in
newlib/libc/include/machine/setjmp-dj.h
newlib/libc/include/stdio.h
newlib/libc/include/string.h
newlib/libc/include/sys/signal.h
newlib/libc/include/sys/stat.h
newlib/libc/include/sys/time.h
newlib/libc/include/sys/times.h
newlib/libc/include/sys/types.h
newlib/libc/include/sys/unistd.h
newlib/libc/include/sys/wait.h
newlib/libc/locale/lmessages.c
newlib/libc/locale/lmonetary.c
newlib/libc/locale/locale.c
newlib/libc/locale/nl_langinfo.c
newlib/libc/machine/arm/access.c
newlib/libc/machine/cr16/sys/asm.h
newlib/libc/machine/epiphany/Makefile.am
newlib/libc/machine/epiphany/Makefile.in
newlib/libc/machine/epiphany/aclocal.m4
newlib/libc/machine/epiphany/configure
newlib/libc/machine/epiphany/configure.in
newlib/libc/machine/epiphany/machine/stdlib.h
newlib/libc/machine/epiphany/setjmp.S
newlib/libc/machine/i386/setjmp.S
newlib/libc/machine/rl78/Makefile.am
newlib/libc/machine/rl78/Makefile.in
newlib/libc/machine/rl78/aclocal.m4
newlib/libc/machine/rl78/configure
newlib/libc/machine/rl78/configure.in
newlib/libc/machine/rl78/setjmp.S
newlib/libc/posix/collate.c
newlib/libc/posix/engine.c
newlib/libc/posix/glob.c
newlib/libc/posix/popen.c
newlib/libc/posix/readdir.c
newlib/libc/posix/readdir_r.c
newlib/libc/posix/regcomp.c
newlib/libc/posix/telldir.c
newlib/libc/posix/wordexp.c
newlib/libc/reent/mkdirr.c
newlib/libc/reent/renamer.c
newlib/libc/search/hash.c
newlib/libc/search/hash_bigkey.c
newlib/libc/search/hash_page.c
newlib/libc/search/hcreate_r.c
newlib/libc/stdio/asiprintf.c
newlib/libc/stdio/asprintf.c
newlib/libc/stdio/clearerr.c
newlib/libc/stdio/fclose.c
newlib/libc/stdio/fdopen.c
newlib/libc/stdio/feof.c
newlib/libc/stdio/ferror.c
newlib/libc/stdio/fflush.c
newlib/libc/stdio/fgetc.c
newlib/libc/stdio/fgets.c
newlib/libc/stdio/fgetwc.c
newlib/libc/stdio/fgetws.c
newlib/libc/stdio/fileno.c
newlib/libc/stdio/findfp.c
newlib/libc/stdio/fmemopen.c
newlib/libc/stdio/fopen.c
newlib/libc/stdio/fopencookie.c
newlib/libc/stdio/fpurge.c
newlib/libc/stdio/fputc.c
newlib/libc/stdio/fputs.c
newlib/libc/stdio/fputwc.c
newlib/libc/stdio/fputws.c
newlib/libc/stdio/fread.c
newlib/libc/stdio/freopen.c
newlib/libc/stdio/fseek.c
newlib/libc/stdio/ftell.c
newlib/libc/stdio/funopen.c
newlib/libc/stdio/fwide.c
newlib/libc/stdio/fwrite.c
newlib/libc/stdio/getc.c
newlib/libc/stdio/getdelim.c
newlib/libc/stdio/gets.c
newlib/libc/stdio/local.h
newlib/libc/stdio/mktemp.c
newlib/libc/stdio/open_memstream.c
newlib/libc/stdio/putc.c
newlib/libc/stdio/setvbuf.c
newlib/libc/stdio/ungetc.c
newlib/libc/stdio/ungetwc.c
newlib/libc/stdio/vasiprintf.c
newlib/libc/stdio/vasprintf.c
newlib/libc/stdio/vfprintf.c
newlib/libc/stdio/vfscanf.c
newlib/libc/stdio/vfwprintf.c
newlib/libc/stdio/vfwscanf.c
newlib/libc/stdio64/fdopen64.c
newlib/libc/stdio64/fopen64.c
newlib/libc/stdio64/freopen64.c
newlib/libc/stdio64/fseeko64.c
newlib/libc/stdio64/ftello64.c
newlib/libc/stdlib/mbtowc_r.c
newlib/libc/stdlib/mprec.h
newlib/libc/stdlib/wctomb_r.c
newlib/libc/string/Makefile.am
newlib/libc/string/Makefile.in
newlib/libc/string/strcasestr.c
newlib/libc/sys/epiphany/Makefile.am
newlib/libc/sys/epiphany/Makefile.in
newlib/libc/sys/epiphany/aclocal.m4
newlib/libc/sys/epiphany/configure
newlib/libc/sys/epiphany/configure.in
newlib/libc/sys/epiphany/e_printf.c
newlib/libc/sys/h8300hms/sys/file.h
newlib/libc/sys/linux/machine/i386/setjmp.S
newlib/libc/sys/rtems/crt0.c
newlib/libc/sys/rtems/machine/_types.h
newlib/libc/sys/sysmec/access.c
newlib/libc/sys/sysnecv850/access.c
newlib/libc/sys/sysnecv850/crt0.S
newlib/libc/time/strptime.c
newlib/libm/common/sf_round.c
newlib/libm/math/e_atan2.c
newlib/libm/math/e_exp.c
newlib/libm/math/e_pow.c
newlib/libm/math/e_rem_pio2.c
newlib/libm/math/ef_exp.c
newlib/libm/math/ef_pow.c
newlib/libm/math/er_lgamma.c
newlib/libm/math/erf_lgamma.c
newlib/testsuite/newlib.stdio/stdio.exp
newlib/testsuite/newlib.stdio/swprintf.c
newlib/testsuite/newlib.string/strcmp-1.c
winsup/ChangeLog
winsup/Makefile.common
winsup/cygserver/ChangeLog
winsup/cygserver/client.cc
winsup/cygserver/woutsup.h
winsup/cygwin/ChangeLog
winsup/cygwin/Makefile.in
winsup/cygwin/advapi32.cc
winsup/cygwin/child_info.h
winsup/cygwin/configure.in
winsup/cygwin/cygheap.cc
winsup/cygwin/cygheap.h
winsup/cygwin/cygprops.h
winsup/cygwin/cygserver_ipc.h
winsup/cygwin/cygthread.cc
winsup/cygwin/cygtls.cc
winsup/cygwin/cygtls.h
winsup/cygwin/cygwin.din
winsup/cygwin/cygwin.sc
winsup/cygwin/dcrt0.cc
winsup/cygwin/devices.cc
winsup/cygwin/devices.h
winsup/cygwin/devices.in
winsup/cygwin/dir.cc
winsup/cygwin/dll_init.cc
winsup/cygwin/dll_init.h
winsup/cygwin/dtable.cc
winsup/cygwin/dtable.h
winsup/cygwin/environ.cc
winsup/cygwin/exceptions.cc
winsup/cygwin/external.cc
winsup/cygwin/fenv.cc
winsup/cygwin/fhandler.cc
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_clipboard.cc
winsup/cygwin/fhandler_console.cc
winsup/cygwin/fhandler_disk_file.cc
winsup/cygwin/fhandler_dsp.cc
winsup/cygwin/fhandler_fifo.cc
winsup/cygwin/fhandler_floppy.cc
winsup/cygwin/fhandler_mem.cc
winsup/cygwin/fhandler_nodevice.cc
winsup/cygwin/fhandler_process.cc
winsup/cygwin/fhandler_procnet.cc
winsup/cygwin/fhandler_registry.cc
winsup/cygwin/fhandler_serial.cc
winsup/cygwin/fhandler_socket.cc
winsup/cygwin/fhandler_tape.cc
winsup/cygwin/fhandler_termios.cc
winsup/cygwin/fhandler_tty.cc
winsup/cygwin/fhandler_virtual.cc
winsup/cygwin/fhandler_windows.cc
winsup/cygwin/flock.cc
winsup/cygwin/fork.cc
winsup/cygwin/gendef
winsup/cygwin/gendevices
winsup/cygwin/gentls_offsets
winsup/cygwin/glob.cc
winsup/cygwin/globals.cc
winsup/cygwin/heap.cc
winsup/cygwin/hires.h
winsup/cygwin/hookapi.cc
winsup/cygwin/include/cygwin/if.h
winsup/cygwin/include/cygwin/in.h
winsup/cygwin/include/cygwin/socket.h
winsup/cygwin/include/cygwin/version.h
winsup/cygwin/include/elf.h
winsup/cygwin/include/inttypes.h
winsup/cygwin/include/mntent.h
winsup/cygwin/include/netdb.h
winsup/cygwin/include/stdint.h
winsup/cygwin/include/sys/elf32.h
winsup/cygwin/include/sys/elf64.h
winsup/cygwin/include/sys/elf_common.h
winsup/cygwin/include/sys/elf_generic.h
winsup/cygwin/include/sys/termios.h
winsup/cygwin/include/sys/wait.h
winsup/cygwin/init.cc
winsup/cygwin/kernel32.cc
winsup/cygwin/lib/_cygwin_crt0_common.cc
winsup/cygwin/lib/crt0.h
winsup/cygwin/libc/inet_addr.c
winsup/cygwin/libc/inet_network.c
winsup/cygwin/libc/minires-os-if.c
winsup/cygwin/libc/minires.h
winsup/cygwin/libc/rcmd.cc
winsup/cygwin/miscfuncs.cc
winsup/cygwin/miscfuncs.h
winsup/cygwin/mkglobals_h
winsup/cygwin/mkvers.sh
winsup/cygwin/mmap.cc
winsup/cygwin/mount.cc
winsup/cygwin/mount.h
winsup/cygwin/net.cc
winsup/cygwin/ntdll.h
winsup/cygwin/passwd.cc
winsup/cygwin/path.cc
winsup/cygwin/path.h
winsup/cygwin/pinfo.cc
winsup/cygwin/pinfo.h
winsup/cygwin/pipe.cc
winsup/cygwin/poll.cc
winsup/cygwin/posix.sgml
winsup/cygwin/posix_ipc.cc
winsup/cygwin/pseudo-reloc.cc
winsup/cygwin/regex/regcomp.c
winsup/cygwin/registry.cc
winsup/cygwin/release/1.7.10
winsup/cygwin/release/1.7.11
winsup/cygwin/sched.cc
winsup/cygwin/sec_acl.cc
winsup/cygwin/sec_helper.cc
winsup/cygwin/security.cc
winsup/cygwin/security.h
winsup/cygwin/select.cc
winsup/cygwin/select.h
winsup/cygwin/shared.cc
winsup/cygwin/signal.cc
winsup/cygwin/sigproc.cc
winsup/cygwin/sigproc.h
winsup/cygwin/smallprint.cc
winsup/cygwin/spawn.cc
winsup/cygwin/strace.cc
winsup/cygwin/strfuncs.cc
winsup/cygwin/sync.h
winsup/cygwin/syscalls.cc
winsup/cygwin/sysconf.cc
winsup/cygwin/syslog.cc
winsup/cygwin/termios.cc
winsup/cygwin/thread.cc
winsup/cygwin/thread.h
winsup/cygwin/times.cc
winsup/cygwin/tlsoffsets.h
winsup/cygwin/wait.cc
winsup/cygwin/winbase.h
winsup/cygwin/wincap.cc
winsup/cygwin/wincap.h
winsup/cygwin/winlean.h
winsup/cygwin/winsup.h
winsup/cygwin/winver.rc
winsup/doc/ChangeLog
winsup/doc/configure
winsup/doc/cygwinenv.sgml
winsup/doc/faq-programming.xml
winsup/doc/faq-using.xml
winsup/doc/new-features.sgml
winsup/doc/overview2.sgml
winsup/doc/pathnames.sgml
winsup/doc/setup-net.sgml
winsup/doc/using.sgml
winsup/lsaauth/ChangeLog
winsup/lsaauth/Makefile.in
winsup/lsaauth/cyglsa.c
winsup/lsaauth/cyglsa64.dll
winsup/lsaauth/make-64bit-version-with-mingw-w64.sh
winsup/mingw/ChangeLog
winsup/mingw/configure
winsup/mingw/configure.in
winsup/mingw/include/_mingw.h
winsup/mingw/include/excpt.h
winsup/mingw/include/inttypes.h
winsup/mingw/include/limits.h
winsup/mingw/include/process.h
winsup/mingw/include/stdint.h
winsup/mingw/include/stdio.h
winsup/mingw/include/stdlib.h
winsup/mingw/include/sys/param.h
winsup/mingw/include/wchar.h
winsup/mingw/mingwex/Makefile.in
winsup/mingw/mingwex/gdtoa/gd_qnan.h
winsup/mingw/mingwex/tsearch.c
winsup/mingw/profile/Makefile.in
winsup/testsuite/ChangeLog
winsup/testsuite/configure
winsup/utils/ChangeLog
winsup/utils/Makefile.in
winsup/utils/bloda.cc
winsup/utils/cygcheck.cc
winsup/utils/cygpath.cc
winsup/utils/dump_setup.cc
winsup/utils/dumper.cc
winsup/utils/locale.cc
winsup/utils/mkgroup.c
winsup/utils/mkpasswd.c
winsup/utils/ps.cc
winsup/utils/regtool.cc
winsup/utils/strace.cc
winsup/w32api/ChangeLog
winsup/w32api/include/routprot.h
winsup/w32api/include/setupapi.h
winsup/w32api/include/winbase.h
winsup/w32api/include/windows.h
winsup/w32api/include/winnt.h
winsup/w32api/include/winsock.h
winsup/w32api/include/winsock2.h
winsup/w32api/include/winuser.h
winsup/w32api/include/winver.h
winsup/w32api/include/wtsapi32.h
winsup/w32api/lib/Makefile.in
winsup/w32api/lib/kernel32.def
winsup/w32api/lib/wtsapi32.def
Delete:
config/asmcfi.m4
config/math.m4
config/mmap.m4
config/weakref.m4
include/dwarf2.def
include/elf/xgate.h
include/gdb/gdb-index.h
include/leb128.h
include/opcode/xgate.h
newlib/libc/string/memrchr.c
winsup/cygwin/DevNotes
winsup/cygwin/cygwait.cc
winsup/cygwin/cygwait.h
winsup/cygwin/fhandler_dev.cc
winsup/cygwin/include/machine/elf.h
winsup/cygwin/include/sys/elf.h
winsup/mingw/mingwex/membarrier.c
winsup/w32api/include/sdkddkver.h
winsup/w32api/include/shobjidl.h
winsup/w32api/lib/shobjidl-uuid.c
Diffstat (limited to 'winsup/lsaauth')
-rw-r--r-- | winsup/lsaauth/ChangeLog | 8 | ||||
-rw-r--r-- | winsup/lsaauth/Makefile.in | 6 | ||||
-rw-r--r-- | winsup/lsaauth/cyglsa.c | 46 | ||||
-rw-r--r-- | winsup/lsaauth/cyglsa64.dll | bin | 8704 -> 8704 bytes | |||
-rw-r--r-- | winsup/lsaauth/make-64bit-version-with-mingw-w64.sh | 6 |
5 files changed, 30 insertions, 36 deletions
diff --git a/winsup/lsaauth/ChangeLog b/winsup/lsaauth/ChangeLog index b78696af2..bbb763a1e 100644 --- a/winsup/lsaauth/ChangeLog +++ b/winsup/lsaauth/ChangeLog @@ -1,11 +1,3 @@ -2012-05-29 Corinna Vinschen <corinna@vinschen.de> - - * Makefile.in (LIBS): Re-add advapi32.dll. Explain why. - * make-64bit-version-with-mingw-w64.sh (LIBS): Ditto. - * cyglsa.c: Drop NTDLL function declarations. Use equivalent advapi32 - functions again, throughout. - * cyglsa64.dll: Regenerate. - 2011-05-10 Corinna Vinschen <corinna@vinschen.de> * Makefile.in: Don't override CC. diff --git a/winsup/lsaauth/Makefile.in b/winsup/lsaauth/Makefile.in index bb585dfda..948c08b34 100644 --- a/winsup/lsaauth/Makefile.in +++ b/winsup/lsaauth/Makefile.in @@ -41,11 +41,7 @@ ifdef MINGW_CC override CC:=${MINGW_CC} endif -# Never again try to remove advapi32. It does not matter if the DLL calls -# advapi32 functions or the equivalent ntdll functions. -# But if the LSA authentication DLL is not linked against advapi32, it's -# not recognized by LSA. -LIBS := -ladvapi32 -lkernel32 -lntdll +LIBS := -lkernel32 -lntdll DLL := cyglsa.dll DEF_FILE:= cyglsa.def diff --git a/winsup/lsaauth/cyglsa.c b/winsup/lsaauth/cyglsa.c index 341fdd12c..e64d0e11f 100644 --- a/winsup/lsaauth/cyglsa.c +++ b/winsup/lsaauth/cyglsa.c @@ -1,6 +1,6 @@ /* cyglsa.c: LSA authentication module for Cygwin - Copyright 2006, 2008, 2010, 2011, 2012 Red Hat, Inc. + Copyright 2006, 2008, 2010, 2011 Red Hat, Inc. Written by Corinna Vinschen <corinna@vinschen.de> @@ -41,6 +41,13 @@ DllMain (HINSTANCE inst, DWORD reason, LPVOID res) #ifndef NT_SUCCESS #define NT_SUCCESS(s) ((s) >= 0) #endif +NTSTATUS NTAPI NtAllocateLocallyUniqueId (PLUID); +NTSTATUS NTAPI RtlCopySid (ULONG, PSID, PSID); +NTSTATUS NTAPI RtlGetAce (PACL, ULONG, PVOID *); +ULONG NTAPI RtlLengthSid (PSID); +PULONG NTAPI RtlSubAuthoritySid (PSID, ULONG); +PUCHAR NTAPI RtlSubAuthorityCountSid (PSID); +BOOLEAN NTAPI RtlValidSid (PSID); /* These standard POSIX functions are implemented in NTDLL and exported. There's just no header to define them and using wchar.h from mingw or Cygwin seems wrong somehow. */ @@ -116,7 +123,7 @@ print_sid (const char *prefix, int idx, PISID sid) cyglsa_printf ("NULL\n"); else if (IsBadReadPtr (sid, 8)) cyglsa_printf ("INVALID POINTER\n"); - else if (!IsValidSid ((PSID) sid)) + else if (!RtlValidSid ((PSID) sid)) cyglsa_printf ("INVALID SID\n"); else if (IsBadReadPtr (sid, 8 + sizeof (DWORD) * sid->SubAuthorityCount)) cyglsa_printf ("INVALID POINTER SPACE\n"); @@ -196,9 +203,11 @@ print_dacl (PACL dacl) { PVOID vace; PACCESS_ALLOWED_ACE ace; + NTSTATUS stat; - if (!GetAce (dacl, i, &vace)) - cyglsa_printf ("[%lu] GetAce error %lu\n", i, GetLastError ()); + stat = RtlGetAce (dacl, i, &vace); + if (!NT_SUCCESS (stat)) + cyglsa_printf ("[%lu] RtlGetAce status 0x%08lx\n", i, stat); else { ace = (PACCESS_ALLOWED_ACE) vace; @@ -494,8 +503,8 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type, tokinf->ExpirationTime = authinf->inf.ExpirationTime; /* User SID */ src_sid = (PSID) (base + authinf->inf.User.User.Sid); - size = GetLengthSid (src_sid); - CopySid (size, (PSID) tptr, src_sid); + size = RtlLengthSid (src_sid); + RtlCopySid (size, (PSID) tptr, src_sid); tokinf->User.User.Sid = (PSID) tptr; tptr += size; tokinf->User.User.Attributes = authinf->inf.User.User.Attributes; @@ -509,16 +518,16 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type, for (i = 0; i < src_grps->GroupCount; ++i) { src_sid = (PSID) (base + src_grps->Groups[i].Sid); - size = GetLengthSid (src_sid); - CopySid (size, (PSID) tptr, src_sid); + size = RtlLengthSid (src_sid); + RtlCopySid (size, (PSID) tptr, src_sid); tokinf->Groups->Groups[i].Sid = (PSID) tptr; tptr += size; tokinf->Groups->Groups[i].Attributes = src_grps->Groups[i].Attributes; } /* Primary Group SID */ src_sid = (PSID) (base + authinf->inf.PrimaryGroup.PrimaryGroup); - size = GetLengthSid (src_sid); - CopySid (size, (PSID) tptr, src_sid); + size = RtlLengthSid (src_sid); + RtlCopySid (size, (PSID) tptr, src_sid); tokinf->PrimaryGroup.PrimaryGroup = (PSID) tptr; tptr += size; /* Privileges */ @@ -545,7 +554,8 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type, not done in the 64 bit code above for hopefully obvious reasons... */ LUID logon_sid_id; - if (must_create_logon_sid && !AllocateLocallyUniqueId (&logon_sid_id)) + if (must_create_logon_sid + && !NT_SUCCESS (NtAllocateLocallyUniqueId (&logon_sid_id))) return STATUS_INSUFFICIENT_RESOURCES; if (!(tokinf = funcs->AllocateLsaHeap (authinf->inf_size))) @@ -565,13 +575,13 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type, ((PBYTE) tokinf + (LONG_PTR) tokinf->Groups->Groups[i].Sid); if (must_create_logon_sid && tokinf->Groups->Groups[i].Attributes & SE_GROUP_LOGON_ID - && *GetSidSubAuthorityCount (tokinf->Groups->Groups[i].Sid) == 3 - && *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 0) + && *RtlSubAuthorityCountSid (tokinf->Groups->Groups[i].Sid) == 3 + && *RtlSubAuthoritySid (tokinf->Groups->Groups[i].Sid, 0) == SECURITY_LOGON_IDS_RID) { - *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 1) + *RtlSubAuthoritySid (tokinf->Groups->Groups[i].Sid, 1) = logon_sid_id.HighPart; - *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 2) + *RtlSubAuthoritySid (tokinf->Groups->Groups[i].Sid, 2) = logon_sid_id.LowPart; } } @@ -598,12 +608,12 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type, (PVOID)((LONG_PTR) &authinf->inf + authinf->inf_size)); /* Create logon session. */ - if (!AllocateLocallyUniqueId (logon_id)) + stat = NtAllocateLocallyUniqueId (logon_id); + if (!NT_SUCCESS (stat)) { funcs->FreeLsaHeap (*tok); *tok = NULL; - cyglsa_printf ("AllocateLocallyUniqueId failed: Win32 error %lu\n", - GetLastError ()); + cyglsa_printf ("NtAllocateLocallyUniqueId status 0x%08lx\n", stat); return STATUS_INSUFFICIENT_RESOURCES; } stat = funcs->CreateLogonSession (logon_id); diff --git a/winsup/lsaauth/cyglsa64.dll b/winsup/lsaauth/cyglsa64.dll Binary files differindex f3324d26a..14f1f6cff 100644 --- a/winsup/lsaauth/cyglsa64.dll +++ b/winsup/lsaauth/cyglsa64.dll diff --git a/winsup/lsaauth/make-64bit-version-with-mingw-w64.sh b/winsup/lsaauth/make-64bit-version-with-mingw-w64.sh index 4a8c37c23..a93daf8f3 100644 --- a/winsup/lsaauth/make-64bit-version-with-mingw-w64.sh +++ b/winsup/lsaauth/make-64bit-version-with-mingw-w64.sh @@ -20,10 +20,6 @@ set -e CC="x86_64-w64-mingw32-gcc" CFLAGS="-fno-exceptions -O0 -Wall -Werror" LDFLAGS="-s -nostdlib -Wl,--entry,DllMain,--major-os-version,5,--minor-os-version,2" -# Never again try to remove advapi32. It does not matter if the DLL calls -# advapi32 functions or the equivalent ntdll functions. -# But if the LSA authentication DLL is not linked against advapi32, it's -# not recognized by LSA. -LIBS="-ladvapi32 -lkernel32 -lntdll" +LIBS="-lkernel32 -lntdll" $CC $CFLAGS $LDFLAGS -shared -o cyglsa64.dll cyglsa.c cyglsa64.def $LIBS |