7b06893f93
Starting w/ the intro of S4U, seteuid32() calls lsaprivkeyauth(), then s4uauth(). s4uauth calls LsaRegisterLogonProcess(). LsaRegisterLogonProcess fails w/ STATUS_PORT_CONNECTION_REFUSED, if the proper privileges are not held. Because of RtlNtStatusToDosError(), this status would be mapped to ERROR_ACCESS_DENIED, which in turn would map to EACCES. Therefore it is useless to add this status to errmap[] (errno.cc), as s4auauth() should return EPERM as errno here (i.e. if process is not privileged). Hence the kludge. Before the intro of S4U, seteuid32() called lsaprivkeyauth(), then lsaauth(), then create_token(). Before the intro of Vista, the latter would have called NtCreateToken(). NtCreateToken() would have failed w/ STATUS_PRIVILEGE_NOT_HELD for a process w/o the proper privileges. In that case, calling seteuid32() would have returned EPERM (as required). Since the intro of Vista, and if the process had been started from an UNelevated shell, create_token() does NOT reach NtCreateToken()! As create_token() failed to properly set errno in that case, calling seteuid32() would return errno as set by lsaauth(), i.e. EACCES, not in agreement w/ Posix (a bug which was present for years). (lsaauth() called LsaRegisterLogonProcess() which would fail) |
||
---|---|---|
.. | ||
CVSChangeLogs.old | ||
cygserver | ||
cygwin | ||
doc | ||
lsaauth | ||
testsuite | ||
utils | ||
CONTRIBUTORS | ||
COPYING | ||
COPYING.LIB | ||
CYGWIN_LICENSE | ||
Makefile.common | ||
Makefile.in | ||
README | ||
acinclude.m4 | ||
aclocal.m4 | ||
autogen.sh | ||
c++wrap | ||
ccwrap | ||
config.guess | ||
config.sub | ||
configure | ||
configure.ac | ||
configure.cygwin | ||
install-sh |
README
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin