mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-30 02:50:25 +08:00
* cyglsa-config: Always create a /bin/cyglsa directory and copy the
LSA DLL there. Register this copy in the registry.
This commit is contained in:
parent
80f6f52cb1
commit
bed5a336c4
@ -1,3 +1,8 @@
|
|||||||
|
2008-07-16 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* cyglsa-config: Always create a /bin/cyglsa directory and copy the
|
||||||
|
LSA DLL there. Register this copy in the registry.
|
||||||
|
|
||||||
2008-07-15 Corinna Vinschen <corinna@vinschen.de>
|
2008-07-15 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* cyglsa.c: Include ntddk.h again, but only if __MINGW32__ is defined.
|
* cyglsa.c: Include ntddk.h again, but only if __MINGW32__ is defined.
|
||||||
|
@ -38,15 +38,7 @@ request()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if running on NT
|
# Check if running under at least Windows 2000
|
||||||
_sys="`uname`"
|
|
||||||
_nt=`expr "${_sys}" : "CYGWIN_NT"`
|
|
||||||
if [ ${_nt} -eq 0 ]
|
|
||||||
then
|
|
||||||
echo "LSA authentication does not work on Windows 95/98/Me. Exiting."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# If running on NT, check if running under at least Windows 2000
|
|
||||||
_nt_too_old=`uname | awk -F- '{print ( $2 < 5.0 ) ? 1 : 0;}'`
|
_nt_too_old=`uname | awk -F- '{print ( $2 < 5.0 ) ? 1 : 0;}'`
|
||||||
if [ ${_nt_too_old} -eq 1 ]
|
if [ ${_nt_too_old} -eq 1 ]
|
||||||
then
|
then
|
||||||
@ -79,23 +71,39 @@ request "Are you sure you want to continue?" || exit 0
|
|||||||
# The registry value which keeps the authentication packages.
|
# The registry value which keeps the authentication packages.
|
||||||
value='/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa/Authentication Packages'
|
value='/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa/Authentication Packages'
|
||||||
|
|
||||||
# Get old content, remove evry trace of "cyglsa" from it and write the
|
[ -f /bin/cyglsa -a ! -d /bin/cyglsa ] && rm -rf /bin/cyglsa
|
||||||
|
if [ ! -d /bin/cyglsa ]
|
||||||
|
then
|
||||||
|
if ! mkdir -m 755 /bin/cyglsa
|
||||||
|
then
|
||||||
|
echo "Creating the /bin/cyglsa directory failed. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! mv -b /bin/${dll} /bin/cyglsa/${dll}
|
||||||
|
then
|
||||||
|
echo "Copying the new LSA authentication package /bin/${dll} to"
|
||||||
|
echo "/bin/cyglsa/${dll} failed. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get old content, remove every trace of "cyglsa" from it and write the
|
||||||
# content back to the registry with the new, correct path to the cyglsa DLL.
|
# content back to the registry with the new, correct path to the cyglsa DLL.
|
||||||
old=`regtool get "${value}"`
|
old=`regtool get "${value}"`
|
||||||
new=`for i in ${old}
|
new=`for i in ${old}
|
||||||
do
|
do
|
||||||
echo $i | grep -v cyglsa
|
echo $i | grep -v cyglsa
|
||||||
done`
|
done`
|
||||||
if ! regtool set "${value}" ${new} "${bindir}\\${dll}"
|
if ! regtool set "${value}" ${new} "${bindir}\\cyglsa\\${dll}"
|
||||||
then
|
then
|
||||||
echo "Setting the new registry value failed."
|
echo "Setting the new registry value failed. Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Cygwin LSA authentication package registered."
|
echo "Cygwin LSA authentication package registered."
|
||||||
echo
|
echo
|
||||||
echo "Activating the Cygwin's LSA authentication package requires to reboot."
|
echo "Activating Cygwin's LSA authentication package requires to reboot."
|
||||||
if [ -x /bin/shutdown ]
|
if [ -x /bin/shutdown ]
|
||||||
then
|
then
|
||||||
if request "Do you want to do this immediately?"
|
if request "Do you want to do this immediately?"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user