mirror of
https://github.com/Wind4/vlmcsd.git
synced 2024-11-24 19:11:04 +08:00
vlmcsd-svn1099-2016-10-25-Hotbird64
This commit is contained in:
parent
936811ff5c
commit
fcbbc40d60
@ -87,9 +87,17 @@
|
||||
;WhiteListingLevel = 0
|
||||
|
||||
# Check that the client time is within +/- 4 hours of the system time
|
||||
# Command Line: -c0, -c1
|
||||
# Command line: -c0, -c1
|
||||
;CheckClientTime = false
|
||||
|
||||
# Maintain a list of CMIDs
|
||||
# Command line: -M0, -M1
|
||||
;MaintainClients = false
|
||||
|
||||
# Start with empty CMID list (Requires MaintainClients = true)
|
||||
# Command line: -E0, -E1
|
||||
;StartEmpty = false
|
||||
|
||||
# Set activation interval to 2 hours
|
||||
# Command line: -A
|
||||
;ActivationInterval = 2h
|
||||
@ -107,7 +115,7 @@
|
||||
;group = vlmcsdgroup
|
||||
|
||||
# Disable or enable the NDR64 transfer syntax in RPC (default enabled)
|
||||
# Command line: -N0 and -B1
|
||||
# Command line: -N0 and -N1
|
||||
;UseNDR64 = true
|
||||
|
||||
# Disable or enable bind time feature negotiation in RPC (default enabled)
|
||||
|
Binary file not shown.
@ -7,8 +7,8 @@ export VLMCSD_VERSION="svn`svnversion`"
|
||||
export VERBOSE=3
|
||||
export DNS_PARSER=internal
|
||||
|
||||
MAKEFLAGS="-j`nproc` -B"
|
||||
REUSEOBJFLAGS="-j"
|
||||
MAKEFLAGS="-j200 -B"
|
||||
REUSEOBJFLAGS="-j200"
|
||||
SMALLCC="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
||||
SMALLLD="-pipe -Wl,--hash-style=sysv -Wl,-z,norelro -Wl,--build-id=none"
|
||||
SMALL="$SMALLCC $SMALLLD"
|
||||
@ -90,7 +90,7 @@ if [ $? != 0 ]; then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
export CFLAGS="$CFLAGS -flto=jobserver -fvisibility=hidden -DIS_LIBRARY"
|
||||
export CFLAGS="$CFLAGS -flto=16 -fvisibility=hidden -DIS_LIBRARY"
|
||||
export LDFLAGS="$LDFLAGS -static-libgcc"
|
||||
|
||||
#make $MAKEFLAGS CRYPTO=windows FEATURES=minimum $DLL_NAME CAT=2
|
||||
@ -157,7 +157,7 @@ if [ $? != 0 ]; then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
export CFLAGS="$CFLAGS -flto=jobserver -fvisibility=hidden -DIS_LIBRARY"
|
||||
export CFLAGS="$CFLAGS -flto=16 -fvisibility=hidden -DIS_LIBRARY"
|
||||
export LDFLAGS="$LDFLAGS -static-libgcc"
|
||||
|
||||
#make $MAKEFLAGS CRYPTO=windows FEATURES=minimum $DLL_NAME CAT=2
|
||||
@ -237,10 +237,11 @@ fi
|
||||
# Linux mips32el with uClibc 0.9.33.2 using gcc 4.9 from OpenWRT toolchain
|
||||
export CLIENT_NAME=../binaries/Linux/mips/little-endian/uclibc/vlmcs-mips32el-openwrt-uclib
|
||||
export PROGRAM_NAME=../binaries/Linux/mips/little-endian/uclibc/vlmcsd-mips32el-openwrt-uclibc
|
||||
export MULTI_NAME=../binaries/Linux/mips/little-endian/uclibc/vlmcsdmulti-mips32el-openwrt-uclibc
|
||||
export CC=/opt/toolchains/mipsel-openwrt-linux-uclibc/toolchain-mipsel_mips32_gcc-4.9-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-gcc
|
||||
export CFLAGS="$SMALLCC -DNO_LIMIT"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program"
|
||||
export LDFLAGS="-lpthread $SMALLLD"
|
||||
export THREADS=0
|
||||
|
||||
make $MAKEFLAGS allmulti
|
||||
@ -270,10 +271,11 @@ fi
|
||||
# Linux mips16el with uClibc 0.9.33.2 using gcc 4.9 from OpenWRT toolchain with statically linked libgcc for Asus routers, e.g. Asus RT-N66U
|
||||
export CLIENT_NAME=../binaries/Linux/mips/little-endian/uclibc/vlmcs-mips16el-asus-rt-n66u-uclibc
|
||||
export PROGRAM_NAME=../binaries/Linux/mips/little-endian/uclibc/vlmcsd-mips16el-asus-rt-n66u-uclibc
|
||||
export MULTI_NAME=../binaries/Linux/mips/little-endian/static/vlmcsdmulti-mips16el-asus-rt-n66u-uclibc
|
||||
export CC=/opt/toolchains/mipsel-openwrt-linux-uclibc/toolchain-mipsel_mips32_gcc-4.9-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-gcc
|
||||
export CFLAGS="$SMALLCC -static-libgcc -DNO_LIMIT"
|
||||
export PLATFORMFLAGS="-mips32 -mips16 -flto=jobserver -fwhole-program"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export PLATFORMFLAGS="-mips32 -mips16 -flto=16 -fwhole-program"
|
||||
export LDFLAGS="-lpthread $SMALLLD"
|
||||
export THREADS=0
|
||||
|
||||
make $MAKEFLAGS allmulti
|
||||
@ -304,8 +306,9 @@ fi
|
||||
# Linux mips16el with uClibc 0.9.33.2 using gcc 4.8 from OpenWRT toolchain
|
||||
export CLIENT_NAME=../binaries/Linux/mips/little-endian/uclibc/vlmcs-mips16el-openwrt-uclibc
|
||||
export PROGRAM_NAME=../binaries/Linux/mips/little-endian/uclibc/vlmcsd-mips16el-openwrt-uclibc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips16"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export MULTI_NAME=../binaries/Linux/mips/little-endian/static/vlmcsdmulti-mips16el-openwrt-uclibc
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips16"
|
||||
export LDFLAGS="-lpthread $SMALLLD"
|
||||
|
||||
make $MAKEFLAGS allmulti
|
||||
|
||||
@ -336,7 +339,7 @@ export MULTI_NAME=../binaries/Linux/mips/little-endian/glibc/vlmcsdmulti-mips16e
|
||||
export CC=/opt/toolchains/mipsel_74kc+dsp2_gcc-4.9-linaro_eglibc-2.19-mips16/bin/mipsel-openwrt-linux-gnu-gcc-4.9.2
|
||||
#export CC=~/openwrt/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_eglibc-2.19/bin/mipsel-openwrt-linux-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=mips32 -mips16"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=mips32 -mips16"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export THREADS=0
|
||||
|
||||
@ -357,7 +360,7 @@ export PROGRAM_NAME=../binaries/Linux/ppc/big-endian/glibc/vlmcsd-ppc64-glibc
|
||||
export MULTI_NAME=../binaries/Linux/ppc/big-endian/glibc/vlmcsdmulti-ppc64-glibc
|
||||
export CC=/opt/toolchains/ppc64-glibc2.19-gcc-4.9.1/bin/powerpc64-linux-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export THREADS=0
|
||||
|
||||
@ -378,7 +381,7 @@ export PROGRAM_NAME=../binaries/Linux/ppc/little-endian/glibc/vlmcsd-ppc64el-gli
|
||||
export MULTI_NAME=../binaries/Linux/ppc/little-endian/glibc/vlmcsdmulti-ppc64el-glibc
|
||||
export CC=/opt/toolchains/ppc64el-glibc2.20-gcc-4.9.1/bin/powerpc64le-linux-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export THREADS=0
|
||||
|
||||
@ -399,7 +402,7 @@ export PROGRAM_NAME=../binaries/Linux/ppc/big-endian/glibc/vlmcsd-ppc-glibc
|
||||
export MULTI_NAME=../binaries/Linux/ppc/big-endian/glibc/vlmcsdmulti-ppc-glibc
|
||||
export CC=~/openwrt/staging_dir/toolchain-powerpc_405_gcc-4.8-linaro_eglibc-2.19/bin/powerpc-openwrt-linux-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program --sysroot=/opt/simplebuild/toolchains/powerpc -L/opt/simplebuild/toolchains/powerpc/lib -L/opt/simplebuild/toolchains/powerpc/usr/lib"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program --sysroot=/opt/simplebuild/toolchains/powerpc -L/opt/simplebuild/toolchains/powerpc/lib -L/opt/simplebuild/toolchains/powerpc/usr/lib"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export THREADS=0
|
||||
|
||||
@ -421,7 +424,7 @@ export MULTI_NAME=../binaries/Linux/mips/big-endian/glibc/vlmcsdmulti-mips32-ope
|
||||
export CC=/opt/toolchains/mips_34kc_gcc-4.9-linaro_eglibc-2.19-mips16/bin/mips-openwrt-linux-gcc
|
||||
#export CC=~/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_eglibc-2.19/bin/mips-openwrt-linux-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips32"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips32"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export THREADS=0
|
||||
|
||||
@ -444,7 +447,7 @@ export MULTI_NAME=../binaries/Linux/mips/big-endian/glibc/vlmcsdmulti-mips16-ope
|
||||
export CC=/opt/toolchains/mips_34kc_gcc-4.9-linaro_eglibc-2.19-mips16/bin/mips-openwrt-linux-gcc
|
||||
#export CC=~/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_eglibc-2.19/bin/mips-openwrt-linux-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips32 -mips16"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips32 -mips16"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export THREADS=0
|
||||
|
||||
@ -467,7 +470,7 @@ export MULTI_NAME=../binaries/Linux/mips/little-endian/glibc/vlmcsdmulti-mips32e
|
||||
export CC=/opt/toolchains/mipsel_74kc+dsp2_gcc-4.9-linaro_eglibc-2.19-mips16/bin/mipsel-openwrt-linux-gnu-gcc-4.9.2
|
||||
#export CC=~/openwrt/staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_eglibc-2.19/bin/mipsel-openwrt-linux-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips32"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips32"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export THREADS=0
|
||||
|
||||
@ -486,9 +489,10 @@ fi
|
||||
|
||||
export CLIENT_NAME=../binaries/Android/arm/bionic/vlmcs-android15-armv7
|
||||
export PROGRAM_NAME=../binaries/Android/arm/bionic/vlmcsd-android15-armv7
|
||||
export MULTI_NAME=../binaries/Android/arm/static/vlmcsdmulti-android15-armv7
|
||||
export CC=/opt/toolchains/armelv7-android-3/bin/arm-linux-androideabi-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv7 -mthumb"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv7 -mthumb"
|
||||
export THREADS=0
|
||||
export LDFLAGS="$SMALLLD"
|
||||
|
||||
@ -518,9 +522,10 @@ fi
|
||||
|
||||
export CLIENT_NAME=../binaries/Android/arm/bionic/vlmcs-android15-armv5
|
||||
export PROGRAM_NAME=../binaries/Android/arm/bionic/vlmcsd-android15-armv5
|
||||
export MULTI_NAME=../binaries/Android/arm/static/vlmcsdmulti-android15-armv5
|
||||
export CC=/opt/toolchains/armelv7-android-3/bin/arm-linux-androideabi-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv5te -mthumb"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv5te -mthumb"
|
||||
export THREADS=0
|
||||
export LDFLAGS="$SMALLLD"
|
||||
|
||||
@ -554,7 +559,7 @@ export PROGRAM_NAME=../binaries/Android/arm/bionic/vlmcsd-android41-armv7
|
||||
export MULTI_NAME=../binaries/Android/arm/bionic/vlmcsdmulti-android41-armv7
|
||||
export CC=/opt/toolchains/armelv7-android-16/bin/arm-linux-androideabi-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv7 -mthumb -fPIE -pie"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv7 -mthumb -fPIE -pie"
|
||||
export THREADS=0
|
||||
export LDFLAGS="$SMALLLD"
|
||||
|
||||
@ -576,7 +581,7 @@ fi
|
||||
#export MULTI_NAME=../binaries/Android/arm/bionic/vlmcsdmulti-android50-armv7
|
||||
#export CC=/opt/toolchains/armelv7-android-21/bin/arm-linux-androideabi-gcc
|
||||
#export CFLAGS="$SMALLCC"
|
||||
#export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv7 -mthumb -fPIE -pie"
|
||||
#export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv7 -mthumb -fPIE -pie"
|
||||
#export THREADS=0
|
||||
#export LDFLAGS="$SMALLLD"
|
||||
#
|
||||
@ -607,7 +612,7 @@ export PROGRAM_NAME=../binaries/Android/arm/bionic/vlmcsd-android50-arm64v8
|
||||
export MULTI_NAME=../binaries/Android/arm/bionic/vlmcsdmulti-android50-arm64v8
|
||||
export CC=/opt/toolchains/arm64el-android-21/bin/aarch64-linux-android-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mtune=generic -mfix-cortex-a53-835769 -march=armv8-a -fPIE -pie"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mtune=generic -mfix-cortex-a53-835769 -march=armv8-a -fPIE -pie"
|
||||
export THREADS=0
|
||||
export LDFLAGS="$SMALLLD"
|
||||
|
||||
@ -629,7 +634,7 @@ export PROGRAM_NAME=../binaries/Android/arm/static/vlmcsd-android50-arm64v8-stat
|
||||
export MULTI_NAME=../binaries/Android/arm/static/vlmcsdmulti-android50-arm64v8-static
|
||||
export CC=/opt/toolchains/arm64el-android-21/bin/aarch64-linux-android-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mtune=generic -mfix-cortex-a53-835769 -march=armv8-a"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mtune=generic -mfix-cortex-a53-835769 -march=armv8-a"
|
||||
export THREADS=0
|
||||
export LDFLAGS="$SMALLLD -static"
|
||||
|
||||
@ -648,9 +653,10 @@ fi
|
||||
|
||||
export CLIENT_NAME=../binaries/Android/intel/bionic/vlmcs-android23-x86
|
||||
export PROGRAM_NAME=../binaries/Android/intel/bionic/vlmcsd-android23-x86
|
||||
export MULTI_NAME=../binaries/Android/intel/static/vlmcsdmulti-android23-x86
|
||||
export CC=/opt/toolchains/x86-android-9/bin/i686-linux-android-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=atom -m32"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=atom -m32"
|
||||
export THREADS=1
|
||||
export LDFLAGS="$SMALLLD"
|
||||
|
||||
@ -684,7 +690,7 @@ export PROGRAM_NAME=../binaries/Android/intel/bionic/vlmcsd-android41-x86
|
||||
export MULTI_NAME=../binaries/Android/intel/bionic/vlmcsdmulti-android41-x86
|
||||
export CC=/opt/toolchains/x86-android-16/bin/i686-linux-android-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=atom -m32 -fPIE -pie"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=atom -m32 -fPIE -pie"
|
||||
export THREADS=1
|
||||
export LDFLAGS="$SMALLLD"
|
||||
|
||||
@ -706,7 +712,7 @@ fi
|
||||
#export MULTI_NAME=../binaries/Android/intel/bionic/vlmcsdmulti-android50-x86
|
||||
#export CC=/opt/toolchains/x86-android-21/bin/i686-linux-android-gcc
|
||||
#export CFLAGS="$SMALLCC"
|
||||
#export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=atom -m32 -fPIE -pie"
|
||||
#export PLATFORMFLAGS="-flto=16 -fwhole-program -march=atom -m32 -fPIE -pie"
|
||||
#export THREADS=1
|
||||
#export LDFLAGS="$SMALLLD"
|
||||
#
|
||||
@ -736,7 +742,7 @@ export PROGRAM_NAME=../binaries/Android/intel/bionic/vlmcsd-android50-x64
|
||||
export MULTI_NAME=../binaries/Android/intel/bionic/vlmcsdmulti-android50-x64
|
||||
export CC=/opt/toolchains/x86_64-android-21/bin/x86_64-linux-android-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=atom -m64 -fPIE -pie"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=atom -m64 -fPIE -pie"
|
||||
export THREADS=0
|
||||
export LDFLAGS="$SMALLLD"
|
||||
|
||||
@ -758,7 +764,7 @@ export PROGRAM_NAME=../binaries/Android/intel/static/vlmcsd-android50-x64-static
|
||||
export MULTI_NAME=../binaries/Android/intel/static/vlmcsdmulti-android50-x64-static
|
||||
export CC=/opt/toolchains/x86_64-android-21/bin/x86_64-linux-android-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=nocona -m64"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=nocona -m64"
|
||||
export THREADS=0
|
||||
export LDFLAGS="$SMALLLD -static"
|
||||
|
||||
@ -778,9 +784,10 @@ fi
|
||||
|
||||
export CLIENT_NAME=../binaries/Android/mips/bionic/vlmcs-android23-mips32el
|
||||
export PROGRAM_NAME=../binaries/Android/mips/bionic/vlmcsd-android23-mips32el
|
||||
export MULTI_NAME=../binaries/Android/mips/static/vlmcsdmulti-android23-mips32el
|
||||
export CC=/opt/toolchains/mipsel-android-9/bin/mipsel-linux-android-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program"
|
||||
export THREADS=1
|
||||
export LDFLAGS="$SMALLLD"
|
||||
|
||||
@ -815,7 +822,7 @@ export PROGRAM_NAME=../binaries/Android/mips/bionic/vlmcsd-android41-mips32el
|
||||
export MULTI_NAME=../binaries/Android/mips/bionic/vlmcsdmulti-android41-mips32el
|
||||
export CC=/opt/toolchains/mipsel-android-16/bin/mipsel-linux-android-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -fPIE -pie"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -fPIE -pie"
|
||||
export THREADS=1
|
||||
export LDFLAGS="$SMALLLD"
|
||||
|
||||
@ -838,7 +845,7 @@ fi
|
||||
#export MULTI_NAME=../binaries/Android/mips/bionic/vlmcsdmulti-android50-mips32el
|
||||
#export CC=/opt/toolchains/mipsel-android-21/bin/mipsel-linux-android-gcc
|
||||
#export CFLAGS="$SMALLCC"
|
||||
#export PLATFORMFLAGS="-flto=jobserver -fwhole-program -fPIE -pie"
|
||||
#export PLATFORMFLAGS="-flto=16 -fwhole-program -fPIE -pie"
|
||||
#export THREADS=1
|
||||
#export LDFLAGS="$SMALLLD"
|
||||
#
|
||||
@ -867,7 +874,7 @@ fi
|
||||
#export PROGRAM_NAME=../binaries/Android/mips/bionic/vlmcsd-android23-mips16el
|
||||
#export CC=/opt/toolchains/mipsel-android-9/bin/mipsel-linux-android-gcc
|
||||
#export CFLAGS="$SMALLCC"
|
||||
#export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips16"
|
||||
#export PLATFORMFLAGS="-flto=16 -fwhole-program -mips16"
|
||||
#export THREADS=1
|
||||
#export LDFLAGS="$SMALLLD"
|
||||
#
|
||||
@ -920,7 +927,7 @@ fi
|
||||
#export MULTI_NAME=../binaries/Android/mips/bionic/vlmcsdmulti-android41-mips16el
|
||||
#export CC=/opt/toolchains/mipsel-android-16/bin/mipsel-linux-android-gcc
|
||||
#export CFLAGS="$SMALLCC"
|
||||
#export PLATFORMFLAGS="-flto=jobserver -fwhole-program -fPIE -pie -mips16"
|
||||
#export PLATFORMFLAGS="-flto=16 -fwhole-program -fPIE -pie -mips16"
|
||||
#export THREADS=1
|
||||
#export LDFLAGS="$SMALLLD"
|
||||
#
|
||||
@ -951,7 +958,7 @@ fi
|
||||
#export MULTI_NAME=../binaries/Android/mips/bionic/vlmcsdmulti-android50-mips16el
|
||||
#export CC=/opt/toolchains/mipsel-android-21/bin/mipsel-linux-android-gcc
|
||||
#export CFLAGS="$SMALLCC"
|
||||
#export PLATFORMFLAGS="-flto=jobserver -fwhole-program -fPIE -pie -mips16"
|
||||
#export PLATFORMFLAGS="-flto=16 -fwhole-program -fPIE -pie -mips16"
|
||||
#export THREADS=1
|
||||
#export LDFLAGS="$SMALLLD"
|
||||
#
|
||||
@ -979,7 +986,7 @@ export PROGRAM_NAME=../binaries/Android/mips/bionic/vlmcsd-android50-mips64el
|
||||
export MULTI_NAME=../binaries/Android/mips/bionic/vlmcsdmulti-android50-mips64el
|
||||
export CC=/opt/toolchains/mips64el-android-21/bin/mips64el-linux-android-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -fPIE -pie"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -fPIE -pie"
|
||||
export THREADS=0
|
||||
export LDFLAGS="$SMALLLD"
|
||||
|
||||
@ -1001,7 +1008,7 @@ export PROGRAM_NAME=../binaries/Android/mips/static/vlmcsd-android50-mips64el-st
|
||||
export MULTI_NAME=../binaries/Android/mips/static/vlmcsdmulti-android50-mips64el-static
|
||||
export CC=/opt/toolchains/mips64el-android-21/bin/mips64el-linux-android-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program"
|
||||
export THREADS=0
|
||||
export LDFLAGS="$SMALLLD -static"
|
||||
|
||||
@ -1021,7 +1028,7 @@ fi
|
||||
#export PROGRAM_NAME=../binaries/Android/arm/bionic/vlmcsd-android5
|
||||
#export CC=arm-linux-androideabi-gcc
|
||||
#export CFLAGS="$SMALLCC"
|
||||
#export PLATFORMFLAGS="-flto=jobserver -fwhole-program"
|
||||
#export PLATFORMFLAGS="-flto=16 -fwhole-program"
|
||||
#export LDFLAGS="$SMALLLD -pie -fpie"
|
||||
#export THREADS=0
|
||||
#
|
||||
@ -1073,7 +1080,7 @@ fi
|
||||
#export PROGRAM_NAME=../binaries/Android/arm/bionic/vlmcsd-android5-armv7
|
||||
#export CC=arm-linux-androideabi-gcc
|
||||
#export CFLAGS="$SMALLCC"
|
||||
#export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mthumb -march=armv7 -mtune=cortex-a9"
|
||||
#export PLATFORMFLAGS="-flto=16 -fwhole-program -mthumb -march=armv7 -mtune=cortex-a9"
|
||||
#export LDFLAGS="$SMALLLD -pie -fpie"
|
||||
#export THREADS=0
|
||||
#
|
||||
@ -1126,7 +1133,7 @@ fi
|
||||
#export PROGRAM_NAME=../binaries/Android/arm/bionic/vlmcsd-android
|
||||
#export CC=arm-linux-androideabi-gcc
|
||||
#export CFLAGS="$SMALLCC"
|
||||
#export PLATFORMFLAGS="-flto=jobserver -fwhole-program"
|
||||
#export PLATFORMFLAGS="-flto=16 -fwhole-program"
|
||||
#export LDFLAGS="$SMALLLD"
|
||||
#export THREADS=0
|
||||
#
|
||||
@ -1178,7 +1185,7 @@ fi
|
||||
#export PROGRAM_NAME=../binaries/Android/arm/bionic/vlmcsd-android-armv7
|
||||
#export CC=arm-linux-androideabi-gcc
|
||||
#export CFLAGS="$SMALLCC"
|
||||
#export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mthumb -march=armv7 -mtune=cortex-a9"
|
||||
#export PLATFORMFLAGS="-flto=16 -fwhole-program -mthumb -march=armv7 -mtune=cortex-a9"
|
||||
#export LDFLAGS="$SMALLLD"
|
||||
#export THREADS=0
|
||||
#
|
||||
@ -1228,7 +1235,7 @@ export CLIENT_NAME=../binaries/Linux/intel/glibc/vlmcs-x86-glibc
|
||||
export PROGRAM_NAME=../binaries/Linux/intel/glibc/vlmcsd-x86-glibc
|
||||
export CC=~/openwrt/staging_dir/toolchain-i386_i486_gcc-4.8-linaro_eglibc-2.19/bin/i486-openwrt-linux-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m32 -march=i686 -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -m32 -march=i686 -mtune=generic"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
export THREADS=0
|
||||
|
||||
@ -1247,7 +1254,7 @@ fi
|
||||
export PROGRAM_NAME=../binaries/Linux/intel/glibc/vlmcsd-x86-glibc-minimum
|
||||
export CC=~/openwrt/staging_dir/toolchain-i386_i486_gcc-4.8-linaro_eglibc-2.19/bin/i486-openwrt-linux-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m32 -march=i686 -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -m32 -march=i686 -mtune=generic"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
export THREADS=0
|
||||
export FEATURES=minimum
|
||||
@ -1295,7 +1302,7 @@ export PROGRAM_NAME=../binaries/Linux/intel/static/vlmcsd-x86-musl-static
|
||||
#export CC=/opt/toolchains/i386_i486_gcc-4.9-linaro_musl-1.1.6/bin/i486-openwrt-linux-musl-gcc-4.9.2
|
||||
export CC=/opt/toolchains/i486-musl-gcc-5.3.0-binutils-2.25.1/bin/i486-Hotbird-linux-musl-gcc.br_real
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m32 -march=i486 -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -m32 -march=i486 -mtune=generic"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu -static"
|
||||
export THREADS=0
|
||||
export NOPROCFS=0
|
||||
@ -1326,15 +1333,16 @@ fi
|
||||
# Linux x86 musl static threads
|
||||
export FEATURES=full
|
||||
export PROGRAM_NAME=../binaries/Linux/intel/static/vlmcsd-x86-musl-static-threads
|
||||
export MULTI_NAME=../binaries/Linux/intel/static/vlmcsdmulti-x86-musl-static-threads
|
||||
export CC=/opt/toolchains/i486-musl-gcc-5.3.0-binutils-2.25.1/bin/i486-Hotbird-linux-musl-gcc.br_real
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m32 -march=i486 -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -m32 -march=i486 -mtune=generic"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu -static"
|
||||
export THREADS=1
|
||||
export NOPROCFS=0
|
||||
export AUXV=1
|
||||
|
||||
make $MAKEFLAGS $PROGRAM_NAME
|
||||
make $MAKEFLAGS $PROGRAM_NAME $MULTI_NAME
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
echo Error creating $PROGRAM_NAME
|
||||
@ -1352,7 +1360,7 @@ export CLIENT_NAME=../binaries/Linux/intel/glibc/vlmcs-x32-glibc
|
||||
export PROGRAM_NAME=../binaries/Linux/intel/glibc/vlmcsd-x32-glibc
|
||||
export CC=gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mx32 -march=nocona -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mx32 -march=nocona -mtune=generic"
|
||||
export LDFLAGS="-fuse-ld=gold $SMALLLD -Wl,--hash-style=gnu"
|
||||
export THREADS=0
|
||||
export NOPROCFS=0
|
||||
@ -1373,7 +1381,7 @@ export FEATURES=full
|
||||
export PROGRAM_NAME=../binaries/Linux/intel/glibc/vlmcsd-x32-glibc-threads
|
||||
export CC=gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mx32 -march=nocona -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mx32 -march=nocona -mtune=generic"
|
||||
export LDFLAGS="-fuse-ld=gold $SMALLLD -Wl,--hash-style=gnu -lpthread"
|
||||
export THREADS=1
|
||||
export NOPROCFS=0
|
||||
@ -1396,7 +1404,7 @@ export CLIENT_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcs-armv4el-glibc
|
||||
export PROGRAM_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcsd-armv4el-glibc
|
||||
export CC=/opt/toolchains/armelv5t-glibc-2.23-gcc-6.1.0-binutils-2.26/usr/bin/arm-Hotbird-linux-gnueabi-gcc
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv4 -marm"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv4 -marm"
|
||||
export LDFLAGS="$SMALLLD -static-libgcc"
|
||||
export THREADS=0
|
||||
export NOPROCFS=0
|
||||
@ -1421,7 +1429,7 @@ export PROGRAM_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcsd-armv4el-gli
|
||||
export CC=/opt/toolchains/armelv5t-glibc-2.23-gcc-6.1.0-binutils-2.26/usr/bin/arm-Hotbird-linux-gnueabi-gcc
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv4t -mthumb"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv4t -mthumb"
|
||||
export LDFLAGS="$SMALLLD -static-libgcc"
|
||||
export THREADS=0
|
||||
|
||||
@ -1440,7 +1448,7 @@ fi
|
||||
export PROGRAM_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcsd-armv5el-glibc-thumb
|
||||
export CLIENT_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcs-armv5el-glibc-thumb
|
||||
export MULTI_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcsdmulti-armv5el-glibc-thumb
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv5t -mthumb"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv5t -mthumb"
|
||||
|
||||
make $MAKEFLAGS DNS_PARSER=internal allmulti
|
||||
|
||||
@ -1456,7 +1464,7 @@ fi
|
||||
export PROGRAM_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcsd-armv5el-glibc
|
||||
export CLIENT_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcs-armv5el-glibc
|
||||
export MULTI_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcsdmulti-armv5el-glibc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv5 -marm"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv5 -marm"
|
||||
|
||||
make $MAKEFLAGS DNS_PARSER=internal allmulti
|
||||
|
||||
@ -1474,7 +1482,7 @@ export PROGRAM_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcsd-armv7el-gli
|
||||
export CLIENT_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcs-armv7el-glibc
|
||||
export MULTI_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcsdmulti-armv7el-glibc
|
||||
export CC=/opt/toolchains/armelv7-cortex-a8-glibc-2.18/usr/bin/arm-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv7 -mthumb"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv7 -mthumb"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -1496,7 +1504,7 @@ export PROGRAM_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcsd-armv4el-ope
|
||||
export CLIENT_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcs-armv4el-openwrt-glibc
|
||||
export MULTI_NAME=../binaries/Linux/arm/little-endian/glibc/vlmcsdmulti-armv4el-openwrt-glibc
|
||||
export CC=~/openwrt/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_eglibc-2.19_eabi/bin/arm-openwrt-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv4"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv4"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -1521,7 +1529,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=~/openwrt/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_eglibc-2.19_eabi/bin/arm-openwrt-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv7 -mthumb"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv7 -mthumb"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -1546,7 +1554,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}-static
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}-static
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}-static
|
||||
export CC=/opt/toolchains/armelv5t-musl-gcc6.1.0-binutils-2.26/usr/bin/arm-Hotbird-linux-musleabi-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu -static"
|
||||
@ -1587,7 +1595,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/armelv5t-uclibc-0.9.33/usr/bin/arm-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv5t -mthumb"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv5t -mthumb"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -1613,7 +1621,7 @@ export PROGRAM_NAME=${INSTALLDIR}uclibc/vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}uclibc/vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}uclibc/vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/armelv7-cortex-a8-uclibc-0.9.33/usr/bin/arm-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv7 -mthumb"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv7 -mthumb"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -1649,7 +1657,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=~/openwrt/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/arm-openwrt-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv4 -marm"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv4 -marm"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -1673,7 +1681,7 @@ fi
|
||||
#export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
#export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
#export CC=~/openwrt/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/arm-openwrt-linux-gcc
|
||||
#export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv4t -mthumb"
|
||||
#export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv4t -mthumb"
|
||||
#export FEATURES=full
|
||||
#export CFLAGS="$SMALLCC"
|
||||
#export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -1705,7 +1713,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=~/openwrt/staging_dir/toolchain-arm_mpcore+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi/bin/arm-openwrt-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv7 -mthumb"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv7 -mthumb"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -1768,7 +1776,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/simplebuild/toolchains/mipsoe20/bin/mipsel-unknown-linux-gnu-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -1793,7 +1801,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/simplebuild/toolchains/mipsoe20/bin/mipsel-unknown-linux-gnu-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -1856,7 +1864,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips32el-mips16-glibc-2.18/usr/bin/mipsel-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips32 -mips16"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips32 -mips16"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -1882,7 +1890,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips32el-mips16-uclibc-0.9.33/bin/mipsel-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips32 -mips16"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips32 -mips16"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -1908,7 +1916,7 @@ export CLIENT_NAME=${INSTALLDIR}uclibc/vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}uclibc/vlmcsdmulti${SUFFIX}
|
||||
#export CC=~/openwrt/staging_dir/toolchain-powerpc_405_gcc-4.8-linaro_uClibc-0.9.33.2/bin/powerpc-openwrt-linux-gcc
|
||||
export CC=/opt/toolchains/ppc-uclibc0.9.33.2-gcc-4.9.1-binutils2.24/bin/powerpc-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -L/root/cross-compiler-powerpc/lib -L/root/cross-compiler-powerpc/usr/lib"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -L/root/cross-compiler-powerpc/lib -L/root/cross-compiler-powerpc/usr/lib"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -1944,7 +1952,7 @@ export PROGRAM_NAME=${INSTALLDIR}uclibc/vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}uclibc/vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}uclibc/vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/simplebuild/toolchains/fritz71xx/bin/mipsel-linux-uclibc-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=4kec -mtune=4kec"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=4kec -mtune=4kec"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -1981,7 +1989,7 @@ export PROGRAM_NAME=${INSTALLDIR}uclibc/vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}uclibc/vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}uclibc/vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/simplebuild/toolchains/fritz73xxOS62/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2018,7 +2026,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/simplebuild/toolchains/fritz73xxOS62/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC -D_PEDANTIC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2042,7 +2050,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/simplebuild/toolchains/fritz73xxOS62/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC -DNO_USER_SWITCH -DSIMPLE_SOCKETS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_USER_SWITCH"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2066,7 +2074,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/simplebuild/toolchains/fritz73xxOS62/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export FEATURES=inetd
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2090,7 +2098,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/simplebuild/toolchains/fritz73xxOS62/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -lpthread"
|
||||
@ -2113,7 +2121,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/simplebuild/toolchains/fritz73xxOS62/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=24kc -mtune=24kc -mips16 -mdsp"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2133,7 +2141,7 @@ unset OPENSSL_HMAC
|
||||
|
||||
|
||||
|
||||
#make $MAKEFLAGS CLIENT_NAME=../binaries/Linux/mips/big-endian/uclibc/vlmcs-mips32-uclibc CFLAGS="$SMALL -pipe -flto=jobserver -fwhole-program" PROGRAM_NAME=../binaries/Linux/mips/big-endian/uclibc/vlmcsd-mips32-uclibc CC=/opt/toolchains/mips32eb-uclibc-0.9.33/usr/bin/mips-linux-cc && \
|
||||
#make $MAKEFLAGS CLIENT_NAME=../binaries/Linux/mips/big-endian/uclibc/vlmcs-mips32-uclibc CFLAGS="$SMALL -pipe -flto=16 -fwhole-program" PROGRAM_NAME=../binaries/Linux/mips/big-endian/uclibc/vlmcsd-mips32-uclibc CC=/opt/toolchains/mips32eb-uclibc-0.9.33/usr/bin/mips-linux-cc && \
|
||||
# Linux mips32 big-endian uclibc
|
||||
INSTALLDIR=../binaries/Linux/mips/big-endian/uclibc/
|
||||
SUFFIX=-mips32-uclibc
|
||||
@ -2141,7 +2149,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips32eb-uclibc-0.9.33/usr/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips32"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips32"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2166,7 +2174,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips32eb-uclibc-0.9.33/usr/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips16"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips16"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2191,10 +2199,10 @@ export PROGRAM_NAME=${INSTALLDIR}uclibc/vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}uclibc/vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}uclibc/vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips-openwrt-linux-uclibc/bin/mips-openwrt-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=24kc -mips16"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=24kc -mips16"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC -DNO_LIMIT"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export LDFLAGS="-ldl -lpthread $SMALLLD"
|
||||
export THREADS=0
|
||||
export CRYPTO=internal
|
||||
|
||||
@ -2217,7 +2225,7 @@ export PROGRAM_NAME=${INSTALLDIR}musl/vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}musl/vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}musl/vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips_34kc_gcc-4.9-linaro_musl-1.1.6-mips16/bin/mips-openwrt-linux-musl-gcc-4.9.2
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=24kc -mips16"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=24kc -mips16"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2254,10 +2262,10 @@ export PROGRAM_NAME=${INSTALLDIR}uclibc/vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}uclibc/vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}uclibc/vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips-openwrt-linux-uclibc/bin/mips-openwrt-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=24kc"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=24kc"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC -DNO_LIMIT"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export LDFLAGS="-ldl -lpthread $SMALLLD"
|
||||
export THREADS=0
|
||||
export CRYPTO=internal
|
||||
|
||||
@ -2271,7 +2279,7 @@ fi
|
||||
export PROGRAM_NAME=${INSTALLDIR}static/vlmcsd${SUFFIX}-static
|
||||
export CLIENT_NAME=${INSTALLDIR}static/vlmcs${SUFFIX}-static
|
||||
export MULTI_NAME=${INSTALLDIR}static/vlmcsdmulti${SUFFIX}-static
|
||||
export LDFLAGS="$SMALLLD -static"
|
||||
export LDFLAGS="$LDFLAGS -static"
|
||||
|
||||
make $REUSEOBJFLAGS allmulti
|
||||
|
||||
@ -2291,7 +2299,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips32eb-uclibc-0.9.33/usr/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips16"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips16"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -lpthread"
|
||||
@ -2315,7 +2323,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips32eb-glibc-2.19/usr/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2340,7 +2348,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips32eb-glibc-2.19/usr/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips16"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips16"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2365,7 +2373,7 @@ export PROGRAM_NAME=${INSTALLDIR}musl/vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}musl/vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}musl/vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips32eb-musl/usr/bin/mips-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips32"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips32"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2374,7 +2382,6 @@ export CRYPTO=internal
|
||||
export NOPROCFS=0
|
||||
export AUXV=1
|
||||
|
||||
|
||||
make $MAKEFLAGS allmulti
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
@ -2407,7 +2414,7 @@ export PROGRAM_NAME=${INSTALLDIR}musl/vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}musl/vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}musl/vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips32el-mips16-musl/usr/bin/mipsel-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips16"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips16"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2446,7 +2453,7 @@ export PROGRAM_NAME=${INSTALLDIR}static/vlmcsd${SUFFIX}-static
|
||||
export CLIENT_NAME=${INSTALLDIR}static/vlmcs${SUFFIX}-static
|
||||
export MULTI_NAME=${INSTALLDIR}static/vlmcsdmulti${SUFFIX}-static
|
||||
export CC=/opt/toolchains/mips32el-mips16-musl-fpu/usr/bin/mipsel-linux-cc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips16"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips16"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -static"
|
||||
@ -2472,7 +2479,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/i486-uclibc-0.9.33/bin/i486-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m32 -march=i486 -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -m32 -march=i486 -mtune=generic"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -2491,7 +2498,7 @@ fi
|
||||
|
||||
|
||||
|
||||
#make $MAKEFLAGS CLIENT_NAME=../binaries/Linux/intel/glibc/vlmcs-x64-glibc LDFLAGS="-Wl,--hash-style=gnu" CFLAGS="$SMALL -pipe -flto=jobserver -fwhole-program" PROGRAM_NAME=../binaries/Linux/intel/glibc/vlmcsd-x64-glibc CC=/opt/toolchains/x86_64-glibc-2.19/usr/bin/x86_64-linux-gcc PLATFORMFLAGS="-m64 -mtune=generic"&& \
|
||||
#make $MAKEFLAGS CLIENT_NAME=../binaries/Linux/intel/glibc/vlmcs-x64-glibc LDFLAGS="-Wl,--hash-style=gnu" CFLAGS="$SMALL -pipe -flto=16 -fwhole-program" PROGRAM_NAME=../binaries/Linux/intel/glibc/vlmcsd-x64-glibc CC=/opt/toolchains/x86_64-glibc-2.19/usr/bin/x86_64-linux-gcc PLATFORMFLAGS="-m64 -mtune=generic"&& \
|
||||
# Linux x64 glibc
|
||||
INSTALLDIR=../binaries/Linux/intel/glibc/
|
||||
SUFFIX=-x64-glibc
|
||||
@ -2499,7 +2506,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/x86_64-glibc-2.19/usr/bin/x86_64-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -m64 -mtune=generic"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -2524,7 +2531,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/sparc32-glibc-gcc-4.7.4/bin/sparc-buildroot-linux-gnu-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mcpu=v7"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mcpu=v7"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2542,7 +2549,7 @@ fi
|
||||
|
||||
|
||||
|
||||
#make $MAKEFLAGS ../binaries/Linux/intel/glibc/vlmcsd-x64-glibc-threads CLIENT_NAME=../binaries/Linux/intel/glibc/vlmcs-x64-glibc-threads THREADS=1 LDFLAGS="-Wl,--hash-style=gnu -lpthread" CFLAGS="-pipe -flto=jobserver -fwhole-program" PROGRAM_NAME=../binaries/Linux/intel/glibc/vlmcsd-x64-glibc-threads CC=/opt/toolchains/x86_64-glibc-2.19/usr/bin/x86_64-linux-gcc PLATFORMFLAGS="-m64 -mtune=generic"&& \
|
||||
#make $MAKEFLAGS ../binaries/Linux/intel/glibc/vlmcsd-x64-glibc-threads CLIENT_NAME=../binaries/Linux/intel/glibc/vlmcs-x64-glibc-threads THREADS=1 LDFLAGS="-Wl,--hash-style=gnu -lpthread" CFLAGS="-pipe -flto=16 -fwhole-program" PROGRAM_NAME=../binaries/Linux/intel/glibc/vlmcsd-x64-glibc-threads CC=/opt/toolchains/x86_64-glibc-2.19/usr/bin/x86_64-linux-gcc PLATFORMFLAGS="-m64 -mtune=generic"&& \
|
||||
# Linux x64 glibc with threads
|
||||
INSTALLDIR=../binaries/Linux/intel/glibc/
|
||||
SUFFIX=-x64-glibc-threads
|
||||
@ -2550,7 +2557,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/x86_64-glibc-2.19/usr/bin/x86_64-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -m64 -mtune=generic"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu -lpthread"
|
||||
@ -2567,7 +2574,7 @@ fi
|
||||
|
||||
|
||||
|
||||
#make $MAKEFLAGS LDFLAGS="-Wl,--hash-style=gnu" CLIENT_NAME=../binaries/Linux/intel/glibc/vlmcs-x64-glibc-openssl1.0.0-hard-EXPERIMENTAL CRYPTO=openssl_with_aes CFLAGS="$SMALL -pipe -flto=jobserver -fwhole-program" PROGRAM_NAME=../binaries/Linux/intel/glibc/vlmcsd-x64-glibc-openssl1.0.0-hard-EXPERIMENTAL CC=/opt/toolchains/x86_64-glibc-2.19/usr/bin/x86_64-linux-gcc PLATFORMFLAGS="-m64 -mtune=generic" && \
|
||||
#make $MAKEFLAGS LDFLAGS="-Wl,--hash-style=gnu" CLIENT_NAME=../binaries/Linux/intel/glibc/vlmcs-x64-glibc-openssl1.0.0-hard-EXPERIMENTAL CRYPTO=openssl_with_aes CFLAGS="$SMALL -pipe -flto=16 -fwhole-program" PROGRAM_NAME=../binaries/Linux/intel/glibc/vlmcsd-x64-glibc-openssl1.0.0-hard-EXPERIMENTAL CC=/opt/toolchains/x86_64-glibc-2.19/usr/bin/x86_64-linux-gcc PLATFORMFLAGS="-m64 -mtune=generic" && \
|
||||
# Linux x64 glibc with OpenSSL 1.0.x support
|
||||
INSTALLDIR=../binaries/Linux/intel/glibc/
|
||||
SUFFIX=-x64-glibc-openssl1.0.0-hard-EXPERIMENTAL
|
||||
@ -2575,7 +2582,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/x86_64-glibc-2.19/usr/bin/x86_64-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -m64 -mtune=generic"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -2601,7 +2608,7 @@ export CLIENT_NAME=${INSTALLDIR}musl/vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}musl/vlmcsdmulti${SUFFIX}
|
||||
#export CC=/opt/toolchains/x86_64_gcc-4.9-linaro_musl-1.1.6/bin/x86_64-openwrt-linux-musl-gcc-4.9.2
|
||||
export CC=/opt/toolchains/x86_64-musl-gcc-5.3.0-binutils-2.25.1/bin/x86_64-Hotbird-linux-musl-gcc.br_real
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -m64 -mtune=generic"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -2633,7 +2640,7 @@ fi
|
||||
|
||||
|
||||
|
||||
#make $MAKEFLAGS CC=/opt/toolchains/x86_64-uclibc-0.9.33/bin/x86_64-linux-gcc LDFLAGS="-Wl,--hash-style=gnu" CLIENT_NAME=../binaries/Linux/intel/uclibc/vlmcs-x64-uclibc PROGRAM_NAME=../binaries/Linux/intel/uclibc/vlmcsd-x64-uclibc CFLAGS="$SMALL -flto=jobserver -fwhole-program -pipe -fno-stack-protector" && \
|
||||
#make $MAKEFLAGS CC=/opt/toolchains/x86_64-uclibc-0.9.33/bin/x86_64-linux-gcc LDFLAGS="-Wl,--hash-style=gnu" CLIENT_NAME=../binaries/Linux/intel/uclibc/vlmcs-x64-uclibc PROGRAM_NAME=../binaries/Linux/intel/uclibc/vlmcsd-x64-uclibc CFLAGS="$SMALL -flto=16 -fwhole-program -pipe -fno-stack-protector" && \
|
||||
# Linux x64 uclibc
|
||||
INSTALLDIR=../binaries/Linux/intel/uclibc/
|
||||
SUFFIX=-x64-uclibc
|
||||
@ -2641,7 +2648,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/x86_64-uclibc-0.9.33/bin/x86_64-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mtune=generic"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -m64 -mtune=generic"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
@ -2704,7 +2711,7 @@ export PROGRAM_NAME=${INSTALLDIR}uclibc/vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}uclibc/vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}uclibc/vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/mips32el-uclibc-0.9.33/bin/mipsel-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips32"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -mips32"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
@ -2743,7 +2750,7 @@ export PROGRAM_NAME=${INSTALLDIR}vlmcsd${SUFFIX}
|
||||
export CLIENT_NAME=${INSTALLDIR}vlmcs${SUFFIX}
|
||||
export MULTI_NAME=${INSTALLDIR}vlmcsdmulti${SUFFIX}
|
||||
export CC=/opt/toolchains/armhfv6-glibc-2.19/bin/arm-linux-gcc
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -march=armv6zk -mfpu=vfp -mfloat-abi=hard -mtune=arm1176jzf-s"
|
||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=armv6zk -mfpu=vfp -mfloat-abi=hard -mtune=arm1176jzf-s"
|
||||
export FEATURES=full
|
||||
export CFLAGS="$SMALLCC"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
|
@ -16,10 +16,10 @@ REUSEOBJFLAGS="-j12"
|
||||
CF="-static-libgcc -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
||||
CF45="-static-libgcc -pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
||||
CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
||||
LF="-Wl,-z,norelro"
|
||||
LFCLANG="-Wl,-z,norelro"
|
||||
LF="-lpthread -Wl,-z,norelro"
|
||||
LFCLANG="-lpthread -Wl,-z,norelro"
|
||||
|
||||
gmake -Bj12 allmulti $MAKEFLAGS CC=egcc MULTI_NAME=$BINDIR/vlmcsdmulti-OpenBSD-x64 PROGRAM_NAME=$BINDIR/vlmcsd-OpenBSD-x64 CLIENT_NAME=$BINDIR/vlmcs-OpenBSD-x64 CFLAGS="$CF" LDFLAGS="$LF"
|
||||
gmake -Bj12 allmulti $MAKEFLAGS CC=egcc THREADS=1 MULTI_NAME=$BINDIR/vlmcsdmulti-OpenBSD-x64 PROGRAM_NAME=$BINDIR/vlmcsd-OpenBSD-x64 CLIENT_NAME=$BINDIR/vlmcs-OpenBSD-x64 CFLAGS="$CF" LDFLAGS="$LF"
|
||||
|
||||
#gmake allmulti $MAKEFLAGS CAT=2 MULTI_NAME=vlmcsdmulti-OpenBSD-x86 PROGRAM_NAME=vlmcsd-OpenBSD-x86 CLIENT_NAME=vlmcs-OpenBSD-x86 CFLAGS="$CF45 -m32" LDFLAGS="$LF"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
|
||||
<!-- CreationDate: Tue Oct 25 06:23:57 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
BIN
man/vlmcs.1.pdf
BIN
man/vlmcs.1.pdf
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
.mso www.tmac
|
||||
.TH "VLMCSD-FLOPPY" 7 "June 2016" "Hotbird64" "KMS Activation Manual"
|
||||
.TH "VLMCSD-FLOPPY" 7 "October 2016" "Hotbird64" "KMS Activation Manual"
|
||||
.LO 8
|
||||
|
||||
.SH NAME
|
||||
@ -166,6 +166,9 @@ Sets the password for the pre-defined guest user. This user has the same privili
|
||||
.IP "\fBINETD=\fRY | N"
|
||||
\fBINETD=\fRY specifies that \fBinetd\fR(8) should automatically be started. That means you can telnet and ftp to your virtual machine.
|
||||
|
||||
.IP "\fBVLMCSD_EXTRA_ARGS=\fR\fIcomma-seperated-argument-list\fR"
|
||||
Allows you to specify additional command line options that will be passed to \fBvlmcsd\fR(8). Instead of spaces you use commas between arguments. Example: \fBVLMCSD_EXTRA_ARGS=\fR\-c1,-K3,-M1
|
||||
|
||||
.SH OPERATION
|
||||
|
||||
.SS Diskless System
|
||||
|
@ -310,6 +310,12 @@ CONFIGURATION
|
||||
That means you can telnet and ftp to your virtual machine.
|
||||
|
||||
|
||||
VLMCSD_EXTRA_ARGS=comma-seperated-argument-list
|
||||
Allows you to specify additional command line options that will
|
||||
be passed to vlmcsd(8). Instead of spaces you use commas between
|
||||
arguments. Example: VLMCSD_EXTRA_ARGS=-c1,-K3,-M1
|
||||
|
||||
|
||||
OPERATION
|
||||
Diskless System
|
||||
The floppy144.vfd virtual machine is a diskless system that works
|
||||
@ -527,4 +533,4 @@ SEE ALSO
|
||||
|
||||
|
||||
|
||||
Hotbird64 June 2016 VLMCSD-FLOPPY(7)
|
||||
Hotbird64 October 2016 VLMCSD-FLOPPY(7)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
|
||||
<!-- CreationDate: Tue Oct 25 06:23:57 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@ -499,6 +499,14 @@ pre-defined guest user. This user has the same priviliges
|
||||
<b>inetd</b>(8) should automatically be started. That means
|
||||
you can telnet and ftp to your virtual machine.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>VLMCSD_EXTRA_ARGS=</b><i>comma-seperated-argument-list</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Allows you to specify
|
||||
additional command line options that will be passed to
|
||||
<b>vlmcsd</b>(8). Instead of spaces you use commas between
|
||||
arguments. Example: <b>VLMCSD_EXTRA_ARGS=</b>-c1,-K3,-M1</p>
|
||||
|
||||
<h2>OPERATION
|
||||
<a name="OPERATION"></a>
|
||||
</h2>
|
||||
|
Binary file not shown.
@ -310,6 +310,12 @@ CONFIGURATION
|
||||
That means you can telnet and ftp to your virtual machine.
|
||||
|
||||
|
||||
VLMCSD_EXTRA_ARGS=comma-seperated-argument-list
|
||||
Allows you to specify additional command line options that will
|
||||
be passed to vlmcsd(8). Instead of spaces you use commas between
|
||||
arguments. Example: VLMCSD_EXTRA_ARGS=-c1,-K3,-M1
|
||||
|
||||
|
||||
OPERATION
|
||||
Diskless System
|
||||
The floppy144.vfd virtual machine is a diskless system that works
|
||||
@ -527,4 +533,4 @@ SEE ALSO
|
||||
|
||||
|
||||
|
||||
Hotbird64 June 2016 VLMCSD-FLOPPY(7)
|
||||
Hotbird64 October 2016 VLMCSD-FLOPPY(7)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
|
||||
<!-- CreationDate: Tue Oct 25 06:23:57 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
BIN
man/vlmcsd.7.pdf
BIN
man/vlmcsd.7.pdf
Binary file not shown.
@ -203,6 +203,14 @@ The SKU ID is not checked. Like a genuine KMS server vlmcsd activates a product
|
||||
.IP "\fB-c0\fR and \fB-c1\fR"
|
||||
\fB-c1\fR causes vlmcsd to check if the client time differs no more than four hours from the system time. \fB-c0\fR (the default) disables this check. \fB-c1\fR is useful to prevent emulator detection. A client that tries to detect an emulator could simply send two subsequent request with two time stamps that differ more than four hours from each other. If both requests succeed, the server is an emulator. If you specify \fB-c1\fR on a system with no reliable time source, activations will fail. It is ok to set the correct system time after you started vlmcsd.
|
||||
|
||||
.IP "\fB-M0\fR and \fB-M1\fR"
|
||||
Disables (\fB-M0\fR) or enables (\fB-M1\fR) maintaining a list of client machine IDs (CMIDs). The default is \fB-M0\fR. \fB-M1\fR is useful to prevent emulator detection. By maintaing a CMID list, vlmcsd reports current active clients exactly like a genuine KMS emulator. This includes bug compatibility to the extent that you can permanently kill a genuine KMS emulator by sending an "overcharge request" with a required client count of 376 or more and then request activation for 671 clients. vlmcsd can be reset from this condition by restarting it. If \fB-M0\fR is used, vlmcsd reports current active clients as good as possible. If no client sends an "overcharge request", it is not possible to detect vlmcsd as an emulator with \fB-M0\fR. \fB-M1\fR requires the allocation of a buffer that is about 50 kB in size. On hardware with few memory resources use it only if you really need it.
|
||||
|
||||
If you start vlmcsd from an internet superserver, \fB-M1\fR cannot be used. Since vlmcsd exits after each activation, it cannot maintain any state in memory.
|
||||
|
||||
.IP "\fB-E0\fR and \fB-E1\fR"
|
||||
These options are ignored if you do not also specify \fB-M1\fR. If you use \fB-E0\fR (the default), vlmcsd starts up as a fully "charged" KMS server. Clients activate immediately. \fB-E1\fR lets you start up vlmcsd with an empty CMID list. Activation will start when the required minimum clients (25 for Windows Client OSses, 5 for Windows Server OSses and Office) have registered with the KMS server. As long as the minimum client count has not been reached, clients end up in HRESULT 0xC004F038 "The count reported by your Key Management Service (KMS) is insufficient. Please contact your system administrator". You may use \fBvlmcs\fR(1) or another KMS client emulator to "charge" vlmcsd. \fB-E1\fR does not improve emulator detection prevention. It's primary purpose is to help developers of KMS clients to test "charging" a KMS server.
|
||||
|
||||
.IP "\fB-R\fR \fIrenewal-interval\fR"
|
||||
Instructs clients to renew activation every \fIrenewal-interval\fR. The \fIrenewal-interval\fR is a number optionally immediately followed by a letter indicating the unit. Valid unit letters are s (seconds), m (minutes), h (hours), d (days) and w (weeks). If you do not specify a letter, minutes is assumed.
|
||||
|
||||
|
@ -449,6 +449,44 @@ OPTIONS
|
||||
system time after you started vlmcsd.
|
||||
|
||||
|
||||
-M0 and -M1
|
||||
Disables (-M0) or enables (-M1) maintaining a list of client
|
||||
machine IDs (CMIDs). The default is -M0. -M1 is useful to pre‐
|
||||
vent emulator detection. By maintaing a CMID list, vlmcsd
|
||||
reports current active clients exactly like a genuine KMS emula‐
|
||||
tor. This includes bug compatibility to the extent that you can
|
||||
permanently kill a genuine KMS emulator by sending an "over‐
|
||||
charge request" with a required client count of 376 or more and
|
||||
then request activation for 671 clients. vlmcsd can be reset
|
||||
from this condition by restarting it. If -M0 is used, vlmcsd
|
||||
reports current active clients as good as possible. If no client
|
||||
sends an "overcharge request", it is not possible to detect vlm‐
|
||||
csd as an emulator with -M0. -M1 requires the allocation of a
|
||||
buffer that is about 50 kB in size. On hardware with few memory
|
||||
resources use it only if you really need it.
|
||||
|
||||
If you start vlmcsd from an internet superserver, -M1 cannot be
|
||||
used. Since vlmcsd exits after each activation, it cannot main‐
|
||||
tain any state in memory.
|
||||
|
||||
|
||||
-E0 and -E1
|
||||
These options are ignored if you do not also specify -M1. If you
|
||||
use -E0 (the default), vlmcsd starts up as a fully "charged" KMS
|
||||
server. Clients activate immediately. -E1 lets you start up vlm‐
|
||||
csd with an empty CMID list. Activation will start when the
|
||||
required minimum clients (25 for Windows Client OSses, 5 for
|
||||
Windows Server OSses and Office) have registered with the KMS
|
||||
server. As long as the minimum client count has not been
|
||||
reached, clients end up in HRESULT 0xC004F038 "The count
|
||||
reported by your Key Management Service (KMS) is insufficient.
|
||||
Please contact your system administrator". You may use vlmcs(1)
|
||||
or another KMS client emulator to "charge" vlmcsd. -E1 does not
|
||||
improve emulator detection prevention. It's primary purpose is
|
||||
to help developers of KMS clients to test "charging" a KMS
|
||||
server.
|
||||
|
||||
|
||||
-R renewal-interval
|
||||
Instructs clients to renew activation every renewal-interval.
|
||||
The renewal-interval is a number optionally immediately followed
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
|
||||
<!-- CreationDate: Tue Oct 25 06:23:57 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@ -667,6 +667,51 @@ system with no reliable time source, activations will fail.
|
||||
It is ok to set the correct system time after you started
|
||||
vlmcsd.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>-M0</b> and <b>-M1</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Disables (<b>-M0</b>) or
|
||||
enables (<b>-M1</b>) maintaining a list of client machine
|
||||
IDs (CMIDs). The default is <b>-M0</b>. <b>-M1</b> is useful
|
||||
to prevent emulator detection. By maintaing a CMID list,
|
||||
vlmcsd reports current active clients exactly like a genuine
|
||||
KMS emulator. This includes bug compatibility to the extent
|
||||
that you can permanently kill a genuine KMS emulator by
|
||||
sending an "overcharge request" with a required
|
||||
client count of 376 or more and then request activation for
|
||||
671 clients. vlmcsd can be reset from this condition by
|
||||
restarting it. If <b>-M0</b> is used, vlmcsd reports current
|
||||
active clients as good as possible. If no client sends an
|
||||
"overcharge request", it is not possible to detect
|
||||
vlmcsd as an emulator with <b>-M0</b>. <b>-M1</b> requires
|
||||
the allocation of a buffer that is about 50 kB in size. On
|
||||
hardware with few memory resources use it only if you really
|
||||
need it.</p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em">If you start
|
||||
vlmcsd from an internet superserver, <b>-M1</b> cannot be
|
||||
used. Since vlmcsd exits after each activation, it cannot
|
||||
maintain any state in memory.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>-E0</b> and <b>-E1</b></p>
|
||||
|
||||
<p style="margin-left:22%;">These options are ignored if
|
||||
you do not also specify <b>-M1</b>. If you use <b>-E0</b>
|
||||
(the default), vlmcsd starts up as a fully
|
||||
"charged" KMS server. Clients activate
|
||||
immediately. <b>-E1</b> lets you start up vlmcsd with an
|
||||
empty CMID list. Activation will start when the required
|
||||
minimum clients (25 for Windows Client OSses, 5 for Windows
|
||||
Server OSses and Office) have registered with the KMS
|
||||
server. As long as the minimum client count has not been
|
||||
reached, clients end up in HRESULT 0xC004F038 "The
|
||||
count reported by your Key Management Service (KMS) is
|
||||
insufficient. Please contact your system
|
||||
administrator". You may use <b>vlmcs</b>(1) or another
|
||||
KMS client emulator to "charge" vlmcsd. <b>-E1</b>
|
||||
does not improve emulator detection prevention. It’s
|
||||
primary purpose is to help developers of KMS clients to test
|
||||
"charging" a KMS server.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>-R</b>
|
||||
<i>renewal-interval</i></p>
|
||||
|
||||
|
BIN
man/vlmcsd.8.pdf
BIN
man/vlmcsd.8.pdf
Binary file not shown.
@ -449,6 +449,44 @@ OPTIONS
|
||||
system time after you started vlmcsd.
|
||||
|
||||
|
||||
-M0 and -M1
|
||||
Disables (-M0) or enables (-M1) maintaining a list of client
|
||||
machine IDs (CMIDs). The default is -M0. -M1 is useful to pre‐
|
||||
vent emulator detection. By maintaing a CMID list, vlmcsd
|
||||
reports current active clients exactly like a genuine KMS emula‐
|
||||
tor. This includes bug compatibility to the extent that you can
|
||||
permanently kill a genuine KMS emulator by sending an "over‐
|
||||
charge request" with a required client count of 376 or more and
|
||||
then request activation for 671 clients. vlmcsd can be reset
|
||||
from this condition by restarting it. If -M0 is used, vlmcsd
|
||||
reports current active clients as good as possible. If no client
|
||||
sends an "overcharge request", it is not possible to detect vlm‐
|
||||
csd as an emulator with -M0. -M1 requires the allocation of a
|
||||
buffer that is about 50 kB in size. On hardware with few memory
|
||||
resources use it only if you really need it.
|
||||
|
||||
If you start vlmcsd from an internet superserver, -M1 cannot be
|
||||
used. Since vlmcsd exits after each activation, it cannot main‐
|
||||
tain any state in memory.
|
||||
|
||||
|
||||
-E0 and -E1
|
||||
These options are ignored if you do not also specify -M1. If you
|
||||
use -E0 (the default), vlmcsd starts up as a fully "charged" KMS
|
||||
server. Clients activate immediately. -E1 lets you start up vlm‐
|
||||
csd with an empty CMID list. Activation will start when the
|
||||
required minimum clients (25 for Windows Client OSses, 5 for
|
||||
Windows Server OSses and Office) have registered with the KMS
|
||||
server. As long as the minimum client count has not been
|
||||
reached, clients end up in HRESULT 0xC004F038 "The count
|
||||
reported by your Key Management Service (KMS) is insufficient.
|
||||
Please contact your system administrator". You may use vlmcs(1)
|
||||
or another KMS client emulator to "charge" vlmcsd. -E1 does not
|
||||
improve emulator detection prevention. It's primary purpose is
|
||||
to help developers of KMS clients to test "charging" a KMS
|
||||
server.
|
||||
|
||||
|
||||
-R renewal-interval
|
||||
Instructs clients to renew activation every renewal-interval.
|
||||
The renewal-interval is a number optionally immediately followed
|
||||
|
@ -118,8 +118,16 @@ The SKU ID is not checked. Like a genuine KMS server vlmcsd activates a product
|
||||
.IP "\fBCheckClientTime\fR"
|
||||
Can be TRUE or FALSE. The default is FALSE. If you set this to TRUE \fBvlmcsd\fR(8) checks if the client time differs no more than four hours from the system time. This is useful to prevent emulator detection. A client that tries to detect an emulator could simply send two subsequent request with two time stamps that differ more than four hours from each other. If both requests succeed, the server is an emulator. If you set this to TRUE on a system with no reliable time source, activations will fail. It is ok to set the correct system time after you started \fBvlmcsd\fR(8).
|
||||
|
||||
.IP "\fBMaintainClients\fR"
|
||||
Can be TRUE or FALSE (the default). Disables (FALSE) or enables (TRUE) maintaining a list of client machine IDs (CMIDs). TRUE is useful to prevent emulator detection. By maintaing a CMID list, \fBvlmcsd\fR(8) reports current active clients exactly like a genuine KMS emulator. This includes bug compatibility to the extent that you can permanently kill a genuine KMS emulator by sending an "overcharge request" with a required client count of 376 or more and then request activation for 671 clients. \fBvlmcsd\fR(8) can be reset from this condition by restarting it. If FALSE is used, \fBvlmcsd\fR(8) reports current active clients as good as possible. If no client sends an "overcharge request", it is not possible to detect \fBvlmcsd\fR(8) as an emulator with \fBMaintainClients\fR\~=\~FALSE. Maintaining clients requires the allocation of a buffer that is about 50 kB in size. On hardware with few memory resources use it only if you really need it.
|
||||
|
||||
If you start \fBvlmcsd\fR(8) from an internet superserver, this setting cannot be used. Since \fBvlmcsd\fR(8) exits after each activation, it cannot maintain any state in memory.
|
||||
|
||||
.IP "\fBStartEmpty\fR"
|
||||
This setting is ignored if you do not also specify \fBMaintainClients\fR\~=\~TRUE. If you specify FALSE (the default), \fBvlmcsd\fR(8) starts up as a fully "charged" KMS server. Clients activate immediately. \fBStartEmpty\fR\~=\~TRUE lets you start up \fBvlmcsd\fR(8) with an empty CMID list. Activation will start when the required minimum clients (25 for Windows Client OSses, 5 for Windows Server OSses and Office) have registered with the KMS server. As long as the minimum client count has not been reached, clients end up in HRESULT 0xC004F038 "The count reported by your Key Management Service (KMS) is insufficient. Please contact your system administrator". You may use \fBvlmcs\fR(1) or another KMS client emulator to "charge" \fBvlmcsd\fR(8). Setting this parameter to TRUE does not improve emulator detection prevention. It's primary purpose is to help developers of KMS clients to test "charging" a KMS server.
|
||||
|
||||
.IP "\fBActivationInterval\fR"
|
||||
This is the same as specifying \fB-A\fR on the command line. See \fBvlmcsd\fR(8) for details. The default is 2 hours. Example: ActivationInterval = 1h
|
||||
This is the same as specifying \fB-A\fR on the command line. See \fBvlmcsd\fR(8) for details. The default is 2 hours. Example: ActivationInterval\~=\~1h
|
||||
|
||||
.IP "\fBRenewalInterval\fR"
|
||||
This is the same as specifying \fB-R\fR on the command line. See \fBvlmcsd\fR(8) for details. The default is 7 days. Example: RenewalInterval = 3d. Please note that the KMS client decides itself when to renew activation. Even though vlmcsd sends the renewal interval you specify, it is no more than some kind of recommendation to the client. Older KMS clients did follow the recommendation from a KMS server or emulator. Newer clients do not.
|
||||
|
@ -243,6 +243,46 @@ KEYWORDS
|
||||
csd(8).
|
||||
|
||||
|
||||
MaintainClients
|
||||
Can be TRUE or FALSE (the default). Disables (FALSE) or enables
|
||||
(TRUE) maintaining a list of client machine IDs (CMIDs). TRUE is
|
||||
useful to prevent emulator detection. By maintaing a CMID list,
|
||||
vlmcsd(8) reports current active clients exactly like a genuine
|
||||
KMS emulator. This includes bug compatibility to the extent that
|
||||
you can permanently kill a genuine KMS emulator by sending an
|
||||
"overcharge request" with a required client count of 376 or more
|
||||
and then request activation for 671 clients. vlmcsd(8) can be
|
||||
reset from this condition by restarting it. If FALSE is used,
|
||||
vlmcsd(8) reports current active clients as good as possible. If
|
||||
no client sends an "overcharge request", it is not possible to
|
||||
detect vlmcsd(8) as an emulator with MaintainClients = FALSE.
|
||||
Maintaining clients requires the allocation of a buffer that is
|
||||
about 50 kB in size. On hardware with few memory resources use
|
||||
it only if you really need it.
|
||||
|
||||
If you start vlmcsd(8) from an internet superserver, this set‐
|
||||
ting cannot be used. Since vlmcsd(8) exits after each activa‐
|
||||
tion, it cannot maintain any state in memory.
|
||||
|
||||
|
||||
StartEmpty
|
||||
This setting is ignored if you do not also specify Maintain‐
|
||||
Clients = TRUE. If you specify FALSE (the default), vlmcsd(8)
|
||||
starts up as a fully "charged" KMS server. Clients activate
|
||||
immediately. StartEmpty = TRUE lets you start up vlmcsd(8) with
|
||||
an empty CMID list. Activation will start when the required min‐
|
||||
imum clients (25 for Windows Client OSses, 5 for Windows Server
|
||||
OSses and Office) have registered with the KMS server. As long
|
||||
as the minimum client count has not been reached, clients end up
|
||||
in HRESULT 0xC004F038 "The count reported by your Key Management
|
||||
Service (KMS) is insufficient. Please contact your system admin‐
|
||||
istrator". You may use vlmcs(1) or another KMS client emulator
|
||||
to "charge" vlmcsd(8). Setting this parameter to TRUE does not
|
||||
improve emulator detection prevention. It's primary purpose is
|
||||
to help developers of KMS clients to test "charging" a KMS
|
||||
server.
|
||||
|
||||
|
||||
ActivationInterval
|
||||
This is the same as specifying -A on the command line. See vlm‐
|
||||
csd(8) for details. The default is 2 hours. Example: Activation‐
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
|
||||
<!-- CreationDate: Tue Oct 25 06:23:57 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@ -386,12 +386,60 @@ to TRUE on a system with no reliable time source,
|
||||
activations will fail. It is ok to set the correct system
|
||||
time after you started <b>vlmcsd</b>(8).</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>MaintainClients</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Can be TRUE or FALSE (the
|
||||
default). Disables (FALSE) or enables (TRUE) maintaining a
|
||||
list of client machine IDs (CMIDs). TRUE is useful to
|
||||
prevent emulator detection. By maintaing a CMID list,
|
||||
<b>vlmcsd</b>(8) reports current active clients exactly like
|
||||
a genuine KMS emulator. This includes bug compatibility to
|
||||
the extent that you can permanently kill a genuine KMS
|
||||
emulator by sending an "overcharge request" with a
|
||||
required client count of 376 or more and then request
|
||||
activation for 671 clients. <b>vlmcsd</b>(8) can be reset
|
||||
from this condition by restarting it. If FALSE is used,
|
||||
<b>vlmcsd</b>(8) reports current active clients as good as
|
||||
possible. If no client sends an "overcharge
|
||||
request", it is not possible to detect <b>vlmcsd</b>(8)
|
||||
as an emulator with
|
||||
<b>MaintainClients </b>= FALSE. Maintaining
|
||||
clients requires the allocation of a buffer that is about 50
|
||||
kB in size. On hardware with few memory resources use it
|
||||
only if you really need it.</p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em">If you start
|
||||
<b>vlmcsd</b>(8) from an internet superserver, this setting
|
||||
cannot be used. Since <b>vlmcsd</b>(8) exits after each
|
||||
activation, it cannot maintain any state in memory.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>StartEmpty</b></p>
|
||||
|
||||
<p style="margin-left:22%;">This setting is ignored if you
|
||||
do not also specify <b>MaintainClients </b>= TRUE.
|
||||
If you specify FALSE (the default), <b>vlmcsd</b>(8) starts
|
||||
up as a fully "charged" KMS server. Clients
|
||||
activate immediately. <b>StartEmpty </b>= TRUE
|
||||
lets you start up <b>vlmcsd</b>(8) with an empty CMID list.
|
||||
Activation will start when the required minimum clients (25
|
||||
for Windows Client OSses, 5 for Windows Server OSses and
|
||||
Office) have registered with the KMS server. As long as the
|
||||
minimum client count has not been reached, clients end up in
|
||||
HRESULT 0xC004F038 "The count reported by your Key
|
||||
Management Service (KMS) is insufficient. Please contact
|
||||
your system administrator". You may use <b>vlmcs</b>(1)
|
||||
or another KMS client emulator to "charge"
|
||||
<b>vlmcsd</b>(8). Setting this parameter to TRUE does not
|
||||
improve emulator detection prevention. It’s primary
|
||||
purpose is to help developers of KMS clients to test
|
||||
"charging" a KMS server.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>ActivationInterval</b></p>
|
||||
|
||||
<p style="margin-left:22%;">This is the same as specifying
|
||||
<b>-A</b> on the command line. See <b>vlmcsd</b>(8) for
|
||||
details. The default is 2 hours. Example: ActivationInterval
|
||||
= 1h</p>
|
||||
details. The default is 2 hours. Example:
|
||||
ActivationInterval = 1h</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>RenewalInterval</b></p>
|
||||
|
||||
|
Binary file not shown.
@ -243,6 +243,46 @@ KEYWORDS
|
||||
csd(8).
|
||||
|
||||
|
||||
MaintainClients
|
||||
Can be TRUE or FALSE (the default). Disables (FALSE) or enables
|
||||
(TRUE) maintaining a list of client machine IDs (CMIDs). TRUE is
|
||||
useful to prevent emulator detection. By maintaing a CMID list,
|
||||
vlmcsd(8) reports current active clients exactly like a genuine
|
||||
KMS emulator. This includes bug compatibility to the extent that
|
||||
you can permanently kill a genuine KMS emulator by sending an
|
||||
"overcharge request" with a required client count of 376 or more
|
||||
and then request activation for 671 clients. vlmcsd(8) can be
|
||||
reset from this condition by restarting it. If FALSE is used,
|
||||
vlmcsd(8) reports current active clients as good as possible. If
|
||||
no client sends an "overcharge request", it is not possible to
|
||||
detect vlmcsd(8) as an emulator with MaintainClients = FALSE.
|
||||
Maintaining clients requires the allocation of a buffer that is
|
||||
about 50 kB in size. On hardware with few memory resources use
|
||||
it only if you really need it.
|
||||
|
||||
If you start vlmcsd(8) from an internet superserver, this set‐
|
||||
ting cannot be used. Since vlmcsd(8) exits after each activa‐
|
||||
tion, it cannot maintain any state in memory.
|
||||
|
||||
|
||||
StartEmpty
|
||||
This setting is ignored if you do not also specify Maintain‐
|
||||
Clients = TRUE. If you specify FALSE (the default), vlmcsd(8)
|
||||
starts up as a fully "charged" KMS server. Clients activate
|
||||
immediately. StartEmpty = TRUE lets you start up vlmcsd(8) with
|
||||
an empty CMID list. Activation will start when the required min‐
|
||||
imum clients (25 for Windows Client OSses, 5 for Windows Server
|
||||
OSses and Office) have registered with the KMS server. As long
|
||||
as the minimum client count has not been reached, clients end up
|
||||
in HRESULT 0xC004F038 "The count reported by your Key Management
|
||||
Service (KMS) is insufficient. Please contact your system admin‐
|
||||
istrator". You may use vlmcs(1) or another KMS client emulator
|
||||
to "charge" vlmcsd(8). Setting this parameter to TRUE does not
|
||||
improve emulator detection prevention. It's primary purpose is
|
||||
to help developers of KMS clients to test "charging" a KMS
|
||||
server.
|
||||
|
||||
|
||||
ActivationInterval
|
||||
This is the same as specifying -A on the command line. See vlm‐
|
||||
csd(8) for details. The default is 2 hours. Example: Activation‐
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Fri Oct 21 03:17:10 2016 -->
|
||||
<!-- CreationDate: Tue Oct 25 06:23:57 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
Binary file not shown.
227
src/config.h
227
src/config.h
@ -12,17 +12,17 @@
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------------------
|
||||
* Useful customizations. These options are mandatory. You cannot comment them out.
|
||||
* Feel free to change them to fit your needs.
|
||||
* ----------------------------------------------------------------------------------------
|
||||
*/
|
||||
/*
|
||||
* ----------------------------------------------------------------------------------------
|
||||
* Useful customizations. These options are mandatory. You cannot comment them out.
|
||||
* Feel free to change them to fit your needs.
|
||||
* ----------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef VERSION
|
||||
/*
|
||||
* Define your own version identifier here, e.g. '#define VERSION "my vlmcsd based on svn560"'
|
||||
*/
|
||||
/*
|
||||
* Define your own version identifier here, e.g. '#define VERSION "my vlmcsd based on svn560"'
|
||||
*/
|
||||
|
||||
#define VERSION "private build"
|
||||
|
||||
@ -31,56 +31,56 @@
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Define default ePIDs and HWID here. Preferrably grab ePIDs and HWID
|
||||
* from a real KMS server.
|
||||
*/
|
||||
/*
|
||||
* Define default ePIDs and HWID here. Preferrably grab ePIDs and HWID
|
||||
* from a real KMS server.
|
||||
*/
|
||||
|
||||
#ifndef EPID_WINDOWS
|
||||
#define EPID_WINDOWS "03612-00206-471-109239-03-1033-14393.0000-2932016"
|
||||
#define EPID_WINDOWS "03612-00206-471-452343-03-1033-14393.0000-2932016"
|
||||
#endif
|
||||
|
||||
#ifndef EPID_OFFICE2010
|
||||
#define EPID_OFFICE2010 "03612-00096-199-390352-03-1033-14393.0000-2932016"
|
||||
#define EPID_OFFICE2010 "03612-00096-199-303490-03-1033-14393.0000-2932016"
|
||||
#endif
|
||||
|
||||
#ifndef EPID_OFFICE2013
|
||||
#define EPID_OFFICE2013 "03612-00206-234-938378-03-1033-14393.0000-2932016"
|
||||
#define EPID_OFFICE2013 "03612-00206-234-394838-03-1033-14393.0000-2932016"
|
||||
#endif
|
||||
|
||||
#ifndef EPID_OFFICE2016
|
||||
#define EPID_OFFICE2016 "03612-00206-437-305903-03-1033-14393.0000-2932016"
|
||||
#define EPID_OFFICE2016 "03612-00206-437-938923-03-1033-14393.0000-2932016"
|
||||
#endif
|
||||
|
||||
#ifndef HWID // HwId from the Ratiborus VM
|
||||
#define HWID 0x36, 0x4F, 0x46, 0x3A, 0x88, 0x63, 0xD3, 0x5F
|
||||
#define HWID 0x3A, 0x1C, 0x04, 0x96, 0x00, 0xB6, 0x00, 0x76
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Anything below this line is optional. If you want to use any of these options
|
||||
* uncomment one or more lines starting with "//#define"
|
||||
*/
|
||||
/*
|
||||
* Anything below this line is optional. If you want to use any of these options
|
||||
* uncomment one or more lines starting with "//#define"
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* -------------------------------
|
||||
* Defaults
|
||||
* -------------------------------
|
||||
*/
|
||||
/*
|
||||
* -------------------------------
|
||||
* Defaults
|
||||
* -------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef INI_FILE
|
||||
/*
|
||||
* Uncomment and customize the following line if you want vlmcsd to look for an ini file
|
||||
* at a default location
|
||||
*/
|
||||
/*
|
||||
* Uncomment and customize the following line if you want vlmcsd to look for an ini file
|
||||
* at a default location
|
||||
*/
|
||||
|
||||
//#define INI_FILE "/etc/vlmcsd.ini"
|
||||
//#define INI_FILE "/etc/vlmcsd.ini"
|
||||
|
||||
#endif // INI_FILE
|
||||
|
||||
@ -97,15 +97,15 @@
|
||||
|
||||
|
||||
#ifndef CHILD_HANDLER
|
||||
/*
|
||||
* Uncomment the following #define if you are compiling for a platform that does
|
||||
* not correctly handle the SA_NOCLDWAIT flag when ignoring SIGCHLD, i.e. forked
|
||||
* processes remain as "zombies" after dying. This option will add a SIGCHLD handler that
|
||||
* "waits" for a child that has terminated. This is only required for a few
|
||||
* unixoid OSses.
|
||||
*/
|
||||
/*
|
||||
* Uncomment the following #define if you are compiling for a platform that does
|
||||
* not correctly handle the SA_NOCLDWAIT flag when ignoring SIGCHLD, i.e. forked
|
||||
* processes remain as "zombies" after dying. This option will add a SIGCHLD handler that
|
||||
* "waits" for a child that has terminated. This is only required for a few
|
||||
* unixoid OSses.
|
||||
*/
|
||||
|
||||
//#define CHILD_HANDLER
|
||||
//#define CHILD_HANDLER
|
||||
|
||||
#endif // CHILD_HANDLER
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
* not support custom socket send or receive timeouts.
|
||||
*/
|
||||
|
||||
//#define NO_TIMEOUT
|
||||
//#define NO_TIMEOUT
|
||||
|
||||
#endif // NO_TIMEOUT
|
||||
|
||||
@ -128,7 +128,7 @@
|
||||
* detecting KMS servers via DNS.
|
||||
*/
|
||||
|
||||
//#define NO_DNS
|
||||
//#define NO_DNS
|
||||
|
||||
#endif // NO_DNS
|
||||
|
||||
@ -140,7 +140,7 @@
|
||||
* This affects the output of "vlmcsd -x" only. It should be rarely necessary to use this.
|
||||
*/
|
||||
|
||||
//#define TERMINAL_FIXED_WIDTH 80
|
||||
//#define TERMINAL_FIXED_WIDTH 80
|
||||
|
||||
#endif // TERMINAL_FIXED_WIDTH
|
||||
|
||||
@ -154,7 +154,7 @@
|
||||
* you are testing any KMS server or client emulator that may send malformed KMS packets.
|
||||
*/
|
||||
|
||||
//#define _PEDANTIC
|
||||
//#define _PEDANTIC
|
||||
|
||||
#endif // _PEDANTIC
|
||||
|
||||
@ -185,7 +185,7 @@
|
||||
* This option is not used because Windows doesn't support signals.
|
||||
*/
|
||||
|
||||
//#define NO_PROCFS
|
||||
//#define NO_PROCFS
|
||||
|
||||
#endif // NO_PROCFS
|
||||
|
||||
@ -208,7 +208,7 @@
|
||||
* It it safe to try this by yourself. vlmcsd won't compile if your system doesn't support it.
|
||||
*/
|
||||
|
||||
//#define USE_AUXV
|
||||
//#define USE_AUXV
|
||||
|
||||
#endif // USE_AUXV
|
||||
|
||||
@ -223,7 +223,7 @@
|
||||
* This may be necessary for some embedded devices that have OpenSSL without HMAC support.
|
||||
*/
|
||||
|
||||
//#define _OPENSSL_NO_HMAC
|
||||
//#define _OPENSSL_NO_HMAC
|
||||
|
||||
#endif // _OPENSSL_NO_HMAC
|
||||
|
||||
@ -238,26 +238,26 @@
|
||||
|
||||
|
||||
#ifndef USE_THREADS
|
||||
/*
|
||||
* Do not use fork() but threads to serve your clients.
|
||||
*
|
||||
* Unix-like operarting systems:
|
||||
* You may use this or not. Entirely your choice. Threads do not require explicitly allocating
|
||||
* a shared memory segment which might be a problem on some systems. Using fork() is more robust
|
||||
* although the threaded version of vlmcsd is rock solid too.
|
||||
*
|
||||
* Some older unixoid OSses may not have pthreads. Do NOT use USE_THREADS and define NO_SIGHUP
|
||||
* and NO_LIMIT instead to disable use of the pthreads, shared memory and semaphores.
|
||||
*
|
||||
* Cygwin:
|
||||
* It is recommended to use threads since fork() is extremely slow (no copy on write) and somewhat
|
||||
* unstable.
|
||||
*
|
||||
* Windows:
|
||||
* This option has no effect since fork() is not supported.
|
||||
*/
|
||||
/*
|
||||
* Do not use fork() but threads to serve your clients.
|
||||
*
|
||||
* Unix-like operarting systems:
|
||||
* You may use this or not. Entirely your choice. Threads do not require explicitly allocating
|
||||
* a shared memory segment which might be a problem on some systems. Using fork() is more robust
|
||||
* although the threaded version of vlmcsd is rock solid too.
|
||||
*
|
||||
* Some older unixoid OSses may not have pthreads. Do NOT use USE_THREADS and define NO_SIGHUP
|
||||
* and NO_LIMIT instead to disable use of the pthreads, shared memory and semaphores.
|
||||
*
|
||||
* Cygwin:
|
||||
* It is recommended to use threads since fork() is extremely slow (no copy on write) and somewhat
|
||||
* unstable.
|
||||
*
|
||||
* Windows:
|
||||
* This option has no effect since fork() is not supported.
|
||||
*/
|
||||
|
||||
//#define USE_THREADS
|
||||
//#define USE_THREADS
|
||||
|
||||
#endif // USE_THREADS
|
||||
|
||||
@ -278,7 +278,7 @@
|
||||
* Do not define both _CRYPTO_OPENSSL and _CRYPTO_POLARSSL
|
||||
*/
|
||||
|
||||
//#define _CRYPTO_POLARSSL
|
||||
//#define _CRYPTO_POLARSSL
|
||||
|
||||
#endif // _CRYPTO_POLARSSL
|
||||
|
||||
@ -299,7 +299,7 @@
|
||||
* Do not define both _CRYPTO_OPENSSL and _CRYPTO_POLARSSL
|
||||
*/
|
||||
|
||||
//#define _CRYPTO_OPENSSL
|
||||
//#define _CRYPTO_OPENSSL
|
||||
|
||||
#endif // _CRYPTO_OPENSSL
|
||||
|
||||
@ -319,7 +319,7 @@
|
||||
* Don't use this except for your own research on the internals of OpenSSL.
|
||||
*/
|
||||
|
||||
//#define _USE_AES_FROM_OPENSSL
|
||||
//#define _USE_AES_FROM_OPENSSL
|
||||
|
||||
#endif // _USE_AES_FROM_OPENSSL
|
||||
|
||||
@ -335,7 +335,7 @@
|
||||
* compiled without support for hardware accelerated AES. It's worth a try if _USE_AES_FROM_OPENSSL doesn't work.
|
||||
*/
|
||||
|
||||
//#define _OPENSSL_SOFTWARE
|
||||
//#define _OPENSSL_SOFTWARE
|
||||
|
||||
#endif // _OPENSSL_SOFTWARE
|
||||
|
||||
@ -350,12 +350,12 @@
|
||||
|
||||
|
||||
#ifndef INCLUDE_BETAS
|
||||
/*
|
||||
* Uncomment the following #define if you want obsolete beta/preview SKUs
|
||||
* to be included in the extended product list.
|
||||
*/
|
||||
/*
|
||||
* Uncomment the following #define if you want obsolete beta/preview SKUs
|
||||
* to be included in the extended product list.
|
||||
*/
|
||||
|
||||
//#define INCLUDE_BETAS
|
||||
//#define INCLUDE_BETAS
|
||||
#endif
|
||||
|
||||
|
||||
@ -370,13 +370,13 @@
|
||||
|
||||
|
||||
#ifndef NO_FREEBIND
|
||||
/*
|
||||
* Do not compile support for FREEBIND (Linux) and IP_BINDANY (FreeBSD). This disables the -F1 command
|
||||
* line option and you can bind only to (listen on) IP addresses that are currently up and running on
|
||||
* your system.
|
||||
*/
|
||||
/*
|
||||
* Do not compile support for FREEBIND (Linux) and IP_BINDANY (FreeBSD). This disables the -F1 command
|
||||
* line option and you can bind only to (listen on) IP addresses that are currently up and running on
|
||||
* your system.
|
||||
*/
|
||||
|
||||
//#define NO_FREEBIND
|
||||
//#define NO_FREEBIND
|
||||
|
||||
#endif // NO_FREEBIND
|
||||
|
||||
@ -394,7 +394,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
//#define NO_EXTENDED_PRODUCT_LIST
|
||||
//#define NO_EXTENDED_PRODUCT_LIST
|
||||
|
||||
#endif // NO_EXTENDED_PRODUCT_LIST
|
||||
|
||||
@ -409,7 +409,7 @@
|
||||
* do not save much space by not compiling this list.
|
||||
*/
|
||||
|
||||
//#define NO_BASIC_PRODUCT_LIST
|
||||
//#define NO_BASIC_PRODUCT_LIST
|
||||
|
||||
#endif // NO_BASIC_PRODUCT_LIST
|
||||
|
||||
@ -421,7 +421,7 @@
|
||||
* Removes the -V option from vlmcsd and vlmcs that displays the version information
|
||||
*/
|
||||
|
||||
//#define NO_VERSION_INFORMATION
|
||||
//#define NO_VERSION_INFORMATION
|
||||
|
||||
#endif // NO_VERSION_INFORMATION
|
||||
|
||||
@ -434,7 +434,7 @@
|
||||
* option in the vlmcs client. Disables ini file directive LogVerbose.
|
||||
*/
|
||||
|
||||
//#define NO_VERBOSE_LOG
|
||||
//#define NO_VERBOSE_LOG
|
||||
|
||||
#endif // NO_VERBOSE_LOG
|
||||
|
||||
@ -448,7 +448,7 @@
|
||||
* Implies NO_VERBOSE_LOG, NO_EXTENDED_PRODUCT_LIST and NO_BASIC_PRODUCT_LIST.
|
||||
*/
|
||||
|
||||
//#define NO_LOG
|
||||
//#define NO_LOG
|
||||
|
||||
#endif // NO_LOG
|
||||
|
||||
@ -457,26 +457,39 @@
|
||||
|
||||
#ifndef NO_STRICT_MODES
|
||||
/*
|
||||
* Disables the product whitelisting features. Removes -K0, -K1, -K2 and -K3 from vlmcsd
|
||||
* command line options and WhitelistingLevel from INI file parameters. vlmcsd always behaves
|
||||
* as if it was started with -K0.
|
||||
* Disables emulator detection protection. Removes -M0, -M1, -E0, -E1, -K0, -K1, -K2 and -K3 from
|
||||
* vlmcsd command line options and WhitelistingLevel from INI file parameters. vlmcsd always behaves
|
||||
* as if it was started with -K0, -M0.
|
||||
*/
|
||||
|
||||
//#define NO_STRICT_MODES
|
||||
//#define NO_STRICT_MODES
|
||||
|
||||
#endif // NO_STRICT_MODES
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef NO_RANDOM_EPID
|
||||
|
||||
#ifndef NO_CLIENT_LIST
|
||||
/*
|
||||
* Disables the ability to generate random ePIDs. Useful if you managed to grab ePID/HWID from a
|
||||
* real KMS server and want to use these. Removes -r from the vlmcsd command line and the ini
|
||||
* file directive RandomizationLevel (The randomization level will be harcoded to 0).
|
||||
* Disables the ability to maintain a list of Client Machine IDs (CMIDs). Removes -M0, -M1, -E0 and -E1
|
||||
* from vlmcsd command line options.
|
||||
*/
|
||||
|
||||
//#define NO_RANDOM_EPID
|
||||
//#define NO_CLIENT_LIST
|
||||
|
||||
#endif // !NO_CLIENT_LIST
|
||||
|
||||
|
||||
|
||||
#ifndef NO_RANDOM_EPID
|
||||
/*
|
||||
* Disables the ability to generate random ePIDs. Useful if you managed to grab ePID/HWID from a
|
||||
* real KMS server and want to use these. Removes -r from the vlmcsd command line and the ini
|
||||
* file directive RandomizationLevel (The randomization level will be harcoded to 0).
|
||||
*/
|
||||
|
||||
//#define NO_RANDOM_EPID
|
||||
|
||||
#endif // NO_RANDOM_EPID
|
||||
|
||||
@ -488,7 +501,7 @@
|
||||
* Disables the ability to use a configuration file (aka ini file). Removes -i from the command line.
|
||||
*/
|
||||
|
||||
//#define NO_INI_FILE
|
||||
//#define NO_INI_FILE
|
||||
|
||||
#endif // NO_INI_FILE
|
||||
|
||||
@ -502,7 +515,7 @@
|
||||
* the use of -p from the command line and PidFile from the ini file.
|
||||
*/
|
||||
|
||||
//#define NO_PID_FILE
|
||||
//#define NO_PID_FILE
|
||||
|
||||
#endif // NO_PID_FILE
|
||||
|
||||
@ -520,7 +533,7 @@
|
||||
* Cygwin.
|
||||
*/
|
||||
|
||||
//#define NO_USER_SWITCH
|
||||
//#define NO_USER_SWITCH
|
||||
|
||||
#endif // NO_USER_SWITCH
|
||||
|
||||
@ -533,7 +546,7 @@
|
||||
* access to the man files vlmcsd.8 and vlmcs.1
|
||||
*/
|
||||
|
||||
//#define NO_HELP
|
||||
//#define NO_HELP
|
||||
|
||||
#endif // NO_HELP
|
||||
|
||||
@ -547,7 +560,7 @@
|
||||
* -A and -R from the command line as well as ActivationInterval and RenewalInterval in the ini file.
|
||||
*/
|
||||
|
||||
//#define NO_CUSTOM_INTERVALS
|
||||
//#define NO_CUSTOM_INTERVALS
|
||||
|
||||
#endif // NO_CUSTOM_INTERVALS
|
||||
|
||||
@ -560,7 +573,7 @@
|
||||
* Removes -o from the command line.
|
||||
*/
|
||||
|
||||
//#define NO_PRIVATE_IP_DETECT
|
||||
//#define NO_PRIVATE_IP_DETECT
|
||||
|
||||
#endif // NO_PRIVATE_IP_DETECT
|
||||
|
||||
@ -574,7 +587,7 @@
|
||||
* command line. Socket setup is the job of your superserver.
|
||||
*/
|
||||
|
||||
//#define NO_SOCKETS
|
||||
//#define NO_SOCKETS
|
||||
|
||||
#endif // NO_SOCKETS
|
||||
|
||||
@ -587,7 +600,7 @@
|
||||
* Removes -0, -3, -w and -H from the vlmcsd command line.
|
||||
*/
|
||||
|
||||
//#define NO_CL_PIDS
|
||||
//#define NO_CL_PIDS
|
||||
|
||||
#endif // NO_CL_PIDS
|
||||
|
||||
@ -606,7 +619,7 @@
|
||||
* and NO_LIMIT instead to disable use of the pthreads, shared memory and semaphores.
|
||||
*/
|
||||
|
||||
//#define NO_LIMIT
|
||||
//#define NO_LIMIT
|
||||
|
||||
#endif // NO_LIMIT
|
||||
|
||||
@ -626,7 +639,7 @@
|
||||
* This option has no effect on native Windows since Posix signaling is not supported. It can be used with Cygwin.
|
||||
*/
|
||||
|
||||
//#define NO_SIGHUP
|
||||
//#define NO_SIGHUP
|
||||
|
||||
#endif // NO_SIGHUP
|
||||
|
||||
@ -640,7 +653,7 @@
|
||||
* smaller binaries but makes emulator detection easier.
|
||||
*/
|
||||
|
||||
//#define SIMPLE_RPC
|
||||
//#define SIMPLE_RPC
|
||||
#endif // !SIMPLE_RPC
|
||||
|
||||
|
||||
@ -652,7 +665,7 @@
|
||||
* It still supports IPv4 and IPv6.
|
||||
*/
|
||||
|
||||
//#define SIMPLE_SOCKETS
|
||||
//#define SIMPLE_SOCKETS
|
||||
|
||||
#endif // SIMPLE_SOCKETS
|
||||
|
||||
|
@ -390,3 +390,36 @@ __pure BOOL getArgumentBool(int_fast8_t *result, const char *const argument)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#if __ANDROID__ && !defined(USE_THREADS) // Bionic does not wrap these syscalls (intentionally because Google fears, developers don't know how to use it)
|
||||
|
||||
#ifdef __NR_shmget
|
||||
int shmget(key_t key, size_t size, int shmflg)
|
||||
{
|
||||
return syscall(__NR_shmget, key, size, shmflg);
|
||||
}
|
||||
#endif // __NR_shmget
|
||||
|
||||
#ifdef __NR_shmat
|
||||
void *shmat(int shmid, const void *shmaddr, int shmflg)
|
||||
{
|
||||
return (void *)syscall(__NR_shmat, shmid, shmaddr, shmflg);
|
||||
}
|
||||
#endif // __NR_shmat
|
||||
|
||||
#ifdef __NR_shmdt
|
||||
int shmdt(const void *shmaddr)
|
||||
{
|
||||
return syscall(__NR_shmdt, shmaddr);
|
||||
}
|
||||
#endif // __NR_shmdt
|
||||
|
||||
#ifdef __NR_shmctl
|
||||
int shmctl(int shmid, int cmd, /*struct shmid_ds*/void *buf)
|
||||
{
|
||||
return syscall(__NR_shmctl, shmid, cmd, buf);
|
||||
}
|
||||
#endif // __NR_shmctl
|
||||
|
||||
#endif // __ANDROID__ && !defined(USE_THREADS)
|
||||
|
||||
|
||||
|
@ -9,6 +9,10 @@
|
||||
#include <stdint.h>
|
||||
#include "types.h"
|
||||
|
||||
#if __ANDROID__
|
||||
#include <sys/syscall.h>
|
||||
#endif // __ANDROID__
|
||||
|
||||
#define GUID_LE 0
|
||||
#define GUID_BE 1
|
||||
#define GUID_SWAP 2
|
||||
@ -31,5 +35,11 @@ void hex2bin(BYTE *const bin, const char *hex, const size_t maxbin);
|
||||
__pure BOOL getArgumentBool(int_fast8_t *result, const char *const argument);
|
||||
__pure int IsEqualGuidLE(const GUID *const restrict first, const GUID *const restrict second);
|
||||
|
||||
#if __ANDROID__ && !defined(USE_THREADS) // Bionic does not wrap these syscalls (intentionally because Google fears, developers don't know how to use it)
|
||||
int shmget(key_t key, size_t size, int shmflg);
|
||||
void *shmat(int shmid, const void *shmaddr, int shmflg);
|
||||
int shmdt(const void *shmaddr);
|
||||
int shmctl(int shmid, int cmd, /*struct shmid_ds*/void *buf);
|
||||
#endif // __ANDROID__ && !defined(USE_THREADS)
|
||||
|
||||
#endif // HELPERS_H
|
||||
|
198
src/kms.c
198
src/kms.c
@ -13,8 +13,12 @@
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#if !defined(_WIN32)
|
||||
#if !__ANDROID__
|
||||
#include <sys/shm.h>
|
||||
#endif // !__ANDROID__
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <sys/ipc.h>
|
||||
#endif // !defined(_WIN32)
|
||||
|
||||
#include "output.h"
|
||||
#include "crypto.h"
|
||||
@ -306,7 +310,6 @@ const KmsIdList ExtendedProductList[] = {
|
||||
{ { 0xbb11badf, 0xd8aa, 0x470e, { 0x93, 0x11, 0x20, 0xea, 0xf8, 0x0f, 0xe5, 0xcc, } } /*bb11badf-d8aa-470e-9311-20eaf80fe5cc*/, LOGTEXT("Office Word 2016"), EPID_OFFICE2016, APP_ID_OFFICE2013, KMS_ID_OFFICE2016 },
|
||||
};
|
||||
|
||||
|
||||
// necessary because other .c files cannot access _countof()
|
||||
__pure ProdListIndex_t getExtendedProductListSize(void)
|
||||
{
|
||||
@ -425,6 +428,103 @@ const char* getProductNameLE(const GUID *const guid, const KmsIdList *const List
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef NO_STRICT_MODES
|
||||
#ifndef NO_CLIENT_LIST
|
||||
|
||||
static PClientList_t ClientLists;
|
||||
static BYTE ZeroGuid[16] = { 0 };
|
||||
|
||||
#if !defined(_WIN32) && !defined(__CYGWIN__)
|
||||
pthread_mutex_t* mutex;
|
||||
#define mutex_size (((sizeof(pthread_mutex_t)+7)>>3)<<3)
|
||||
#else
|
||||
CRITICAL_SECTION* mutex;
|
||||
#define mutex_size (((sizeof(CRITICAL_SECTION)+7)>>3)<<3)
|
||||
#endif // _WIN32
|
||||
|
||||
#ifndef USE_THREADS
|
||||
static int shmid_clients = -1;
|
||||
#endif // USE_THREADS
|
||||
|
||||
#if !defined(_WIN32) && !defined(__CYGWIN__)
|
||||
#define lock_client_lists() pthread_mutex_lock(mutex)
|
||||
#define unlock_client_lists() pthread_mutex_unlock(mutex)
|
||||
#define mutex_t pthread_mutex_t
|
||||
#else
|
||||
#define lock_client_lists() EnterCriticalSection(mutex)
|
||||
#define unlock_client_lists() LeaveCriticalSection(mutex)
|
||||
#define mutex_t CRITICAL_SECTION
|
||||
#endif
|
||||
|
||||
void CleanUpClientLists()
|
||||
{
|
||||
# ifndef USE_THREADS
|
||||
shmctl(shmid_clients, IPC_RMID, NULL);
|
||||
# endif // !USE_THREADS
|
||||
}
|
||||
|
||||
void InitializeClientLists()
|
||||
{
|
||||
int_fast8_t i;
|
||||
int_fast16_t j;
|
||||
|
||||
# ifndef USE_THREADS
|
||||
if (
|
||||
(shmid_clients = shmget(IPC_PRIVATE, sizeof(ClientList_t) * _countof(AppList) + mutex_size, IPC_CREAT | 0600)) < 0 ||
|
||||
(mutex = (mutex_t*)shmat(shmid_clients, NULL, 0)) == (mutex_t*)-1
|
||||
)
|
||||
{
|
||||
int errno_save = errno;
|
||||
printerrorf("Warning: CMID lists disabled. Could not create shared memory: %s\n", vlmcsd_strerror(errno_save));
|
||||
if (shmid_clients >= 0) shmctl(shmid_clients, IPC_RMID, NULL);
|
||||
MaintainClients = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
ClientLists = (PClientList_t)((BYTE*)mutex + mutex_size);
|
||||
|
||||
# if __CYGWIN__
|
||||
InitializeCriticalSection(mutex);
|
||||
# else // !__CYGWIN__
|
||||
pthread_mutexattr_t mutex_attr;
|
||||
pthread_mutexattr_init(&mutex_attr);
|
||||
pthread_mutexattr_setpshared(&mutex_attr, PTHREAD_PROCESS_SHARED);
|
||||
pthread_mutex_init(mutex, &mutex_attr);
|
||||
|
||||
# endif // !__CYGWIN__
|
||||
|
||||
# else // USE_THREADS
|
||||
|
||||
ClientLists = (PClientList_t)vlmcsd_malloc(sizeof(ClientList_t) * _countof(AppList));
|
||||
mutex = (mutex_t*)vlmcsd_malloc(sizeof(mutex_t));
|
||||
|
||||
# if !_WIN32 && !__CYGWIN__
|
||||
pthread_mutex_init(mutex, NULL);
|
||||
# else //_WIN32 || __CYGWIN__
|
||||
InitializeCriticalSection(mutex);
|
||||
# endif //_WIN32 || __CYGWIN__
|
||||
|
||||
# endif // USE_THREADS
|
||||
|
||||
memset(ClientLists, 0, sizeof(ClientList_t) * _countof(AppList));
|
||||
|
||||
if (!StartEmpty)
|
||||
{
|
||||
ClientLists[APP_ID_WINDOWS].CurrentCount = 24; ClientLists[APP_ID_WINDOWS].MaxCount = 50;
|
||||
ClientLists[APP_ID_OFFICE2010].CurrentCount = ClientLists[APP_ID_OFFICE2013].CurrentCount = 4;
|
||||
ClientLists[APP_ID_OFFICE2010].MaxCount = ClientLists[APP_ID_OFFICE2013].MaxCount = 10;
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
for (j = 0; j < ClientLists[i].CurrentCount; j++)
|
||||
{
|
||||
get16RandomBytes(&ClientLists[i].Guid[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // NO_CLIENT_LIST
|
||||
#endif // !NO_STRICT_MODES
|
||||
|
||||
#ifndef NO_RANDOM_EPID
|
||||
// formats an int with a fixed number of digits with leading zeros (helper for ePID generation)
|
||||
@ -738,17 +838,29 @@ static HRESULT __stdcall CreateResponseBaseCallback(const REQUEST *const baseReq
|
||||
|
||||
ProdListIndex_t index;
|
||||
getProductNameLE(&baseRequest->KMSID, ProductList, _countof(ProductList), &index);
|
||||
DWORD minClients = LE32(baseRequest->N_Policy);
|
||||
DWORD required_clients = minClients < 1 ? 1 : minClients << 1;
|
||||
|
||||
# ifndef NO_STRICT_MODES
|
||||
|
||||
if (required_clients > 2000)
|
||||
{
|
||||
# ifndef NO_LOG
|
||||
logger("Rejecting request with more than 1000 minimum clients (0x8007000D)\n");
|
||||
# endif
|
||||
|
||||
return 0x8007000D;
|
||||
}
|
||||
|
||||
if (CheckClientTime)
|
||||
{
|
||||
time_t requestTime = (time_t)fileTimeToUnixTime(&baseRequest->ClientTime);
|
||||
|
||||
if (llabs(requestTime - time(NULL)) > 60 * 60 * 4)
|
||||
{
|
||||
# ifndef NO_LOG
|
||||
logger("Client time differs more than 4 hours from system time.\n");
|
||||
# endif // !NO_LOG
|
||||
# ifndef NO_LOG
|
||||
logger("Client time differs more than 4 hours from system time (0xC004F06C)\n");
|
||||
# endif // !NO_LOG
|
||||
|
||||
return 0xC004F06C;
|
||||
}
|
||||
@ -762,7 +874,7 @@ static HRESULT __stdcall CreateResponseBaseCallback(const REQUEST *const baseReq
|
||||
if (IsEqualGuidLE(&ProductList[RetailAndBetaProducts[i]].guid, &baseRequest->KMSID))
|
||||
{
|
||||
# ifndef NO_LOG
|
||||
logger("Refusing retail or beta product\n");
|
||||
logger("Refusing retail or beta product (0xC004F042)\n");
|
||||
# endif // !NO_LOG
|
||||
|
||||
return 0xC004F042;
|
||||
@ -773,7 +885,7 @@ static HRESULT __stdcall CreateResponseBaseCallback(const REQUEST *const baseReq
|
||||
if ((WhitelistingLevel & 1) && index >= _countof(ProductList))
|
||||
{
|
||||
# ifndef NO_LOG
|
||||
logger("Refusing unknown product\n");
|
||||
logger("Refusing unknown product (0xC004F042)\n");
|
||||
# endif // !NO_LOG
|
||||
|
||||
return 0xC004F042;
|
||||
@ -802,16 +914,80 @@ static HRESULT __stdcall CreateResponseBaseCallback(const REQUEST *const baseReq
|
||||
}
|
||||
|
||||
# if !defined(NO_STRICT_MODES)
|
||||
|
||||
ProdListIndex_t appIndex = index >= _countof(AppList) ? _countof(AppList) - 1 : index;
|
||||
|
||||
if ((WhitelistingLevel & 1) && !IsEqualGuidLE(&AppList[appIndex].guid, &baseRequest->AppID))
|
||||
{
|
||||
# ifndef NO_LOG
|
||||
logger("Refusing product with incorrect Application ID\n");
|
||||
logger("Refusing product with incorrect Application ID (0xC004F042)\n");
|
||||
# endif // NO_LOG
|
||||
return 0xC004F042;
|
||||
}
|
||||
|
||||
# ifndef NO_CLIENT_LIST
|
||||
if (MaintainClients)
|
||||
{
|
||||
lock_client_lists();
|
||||
|
||||
int_fast16_t i;
|
||||
int_fast8_t isKnownClient = FALSE;
|
||||
|
||||
if (required_clients > (DWORD)ClientLists[appIndex].MaxCount) ClientLists[appIndex].MaxCount = required_clients;
|
||||
|
||||
for (i = 0; i < ClientLists[appIndex].MaxCount; i++)
|
||||
{
|
||||
if (IsEqualGUID(&ClientLists[appIndex].Guid[i], &baseRequest->CMID))
|
||||
{
|
||||
isKnownClient = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isKnownClient)
|
||||
{
|
||||
baseResponse->Count = LE32(ClientLists[appIndex].CurrentCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < ClientLists[appIndex].MaxCount; i++)
|
||||
{
|
||||
if (IsEqualGUID(ZeroGuid, &ClientLists[appIndex].Guid[i]))
|
||||
{
|
||||
if (ClientLists[appIndex].CurrentCount >= MAX_CLIENTS)
|
||||
{
|
||||
# ifndef NO_LOG
|
||||
logger("Rejecting more than 671 clients (0xC004D104)\n");
|
||||
# endif // !NO_LOG
|
||||
|
||||
unlock_client_lists();
|
||||
return 0xC004D104;
|
||||
}
|
||||
|
||||
baseResponse->Count = LE32(++ClientLists[appIndex].CurrentCount);
|
||||
memcpy(&ClientLists[appIndex].Guid[i], &baseRequest->CMID, sizeof(GUID));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= ClientLists[appIndex].MaxCount)
|
||||
{
|
||||
memcpy(&ClientLists[appIndex].Guid[ClientLists[appIndex].CurrentPosition], &baseRequest->CMID, sizeof(GUID));
|
||||
ClientLists[appIndex].CurrentPosition = (ClientLists[appIndex].CurrentPosition + 1) % (ClientLists[appIndex].MaxCount > MAX_CLIENTS ? MAX_CLIENTS : ClientLists[appIndex].MaxCount);
|
||||
baseResponse->Count = LE32(ClientLists[appIndex].CurrentCount);
|
||||
}
|
||||
}
|
||||
|
||||
unlock_client_lists();
|
||||
}
|
||||
else
|
||||
# endif // !NO_CLIENT_LIST
|
||||
# endif // !defined(NO_STRICT_MODES)
|
||||
{
|
||||
DWORD minimum_answer_clients = index > 0 && index < 4 ? 10 : 50;
|
||||
baseResponse->Count = LE32(required_clients > minimum_answer_clients ? required_clients : minimum_answer_clients);
|
||||
//if (LE32(baseRequest->N_Policy) > LE32(baseResponse->Count)) baseResponse->Count = LE32(LE32(baseRequest->N_Policy) << 1);
|
||||
}
|
||||
|
||||
getEpid(baseResponse, &EpidSource, index, hwId);
|
||||
|
||||
@ -820,15 +996,9 @@ static HRESULT __stdcall CreateResponseBaseCallback(const REQUEST *const baseReq
|
||||
memcpy(&baseResponse->CMID, &baseRequest->CMID, sizeof(GUID));
|
||||
memcpy(&baseResponse->ClientTime, &baseRequest->ClientTime, sizeof(FILETIME));
|
||||
|
||||
DWORD required_clients = LE32(baseRequest->N_Policy) << 1;
|
||||
DWORD minimum_answer_clients = index > 0 && index < 4 ? 10 : 50;
|
||||
|
||||
baseResponse->Count = LE32(required_clients > minimum_answer_clients ? required_clients : minimum_answer_clients);
|
||||
baseResponse->VLActivationInterval = LE32(VLActivationInterval);
|
||||
baseResponse->VLRenewalInterval = LE32(VLRenewalInterval);
|
||||
|
||||
if (LE32(baseRequest->N_Policy) > LE32(baseResponse->Count)) baseResponse->Count = LE32(LE32(baseRequest->N_Policy) << 1);
|
||||
|
||||
#ifndef NO_LOG
|
||||
logResponse(baseResponse, hwId, EpidSource);
|
||||
#endif // NO_LOG
|
||||
|
14
src/kms.h
14
src/kms.h
@ -54,6 +54,15 @@
|
||||
#define ActivationInterval VLActivationInterval
|
||||
#define RenewalInterval VLRenewalInterval
|
||||
|
||||
#define MAX_CLIENTS 671
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GUID Guid[MAX_CLIENTS];
|
||||
int_fast16_t CurrentCount;
|
||||
int_fast16_t MaxCount;
|
||||
int_fast16_t CurrentPosition;
|
||||
} ClientList_t, *PClientList_t;
|
||||
|
||||
typedef struct {
|
||||
VERSION_INFO;
|
||||
@ -292,6 +301,11 @@ extern const KmsIdList ProductList[];
|
||||
extern const KmsIdList AppList[];
|
||||
extern const KmsIdList ExtendedProductList[];
|
||||
|
||||
#ifndef NO_STRICT_MODES
|
||||
void InitializeClientLists();
|
||||
void CleanUpClientLists();
|
||||
#endif // !NO_STRICT_MODES
|
||||
|
||||
extern RequestCallback_t CreateResponseBase;
|
||||
|
||||
#ifdef _PEDANTIC
|
||||
|
@ -835,7 +835,7 @@ static void post_sem(void)
|
||||
#if !defined(NO_LIMIT) && !__minix__
|
||||
if (!InetdMode && MaxTasks != SEM_VALUE_MAX)
|
||||
{
|
||||
semaphore_post(Semaphore);
|
||||
semaphore_post(MaxTaskSemaphore);
|
||||
}
|
||||
#endif // !defined(NO_LIMIT) && !__minix__
|
||||
}
|
||||
@ -846,7 +846,7 @@ static void wait_sem(void)
|
||||
#if !defined(NO_LIMIT) && !__minix__
|
||||
if (!InetdMode && MaxTasks != SEM_VALUE_MAX)
|
||||
{
|
||||
semaphore_wait(Semaphore);
|
||||
semaphore_wait(MaxTaskSemaphore);
|
||||
}
|
||||
#endif // !defined(NO_LIMIT) && !__minix__
|
||||
}
|
||||
|
@ -74,6 +74,7 @@ static void vlogger(const char *message, va_list args)
|
||||
// so formatting the output can be concurrent
|
||||
int len = (int)strlen(mbstr);
|
||||
//# if !_MSC_VER
|
||||
|
||||
vlmcsd_vsnprintf(mbstr + len, sizeof(mbstr) - len, message, args);
|
||||
//# else
|
||||
// wvsprintf(mbstr + len, message, args);
|
||||
@ -630,6 +631,10 @@ void printServerFlags()
|
||||
" NO_STRICT_MODES"
|
||||
# endif // NO_STRICT_MODES
|
||||
|
||||
# ifdef NO_CLIENT_LIST
|
||||
" NO_CLIENT_LIST"
|
||||
# endif // NO_CLIENT_LIST
|
||||
|
||||
# if (_WIN32 || __CYGWIN__) && (!defined(USE_MSRPC) || defined(SUPPORT_WINE))
|
||||
" SUPPORT_WINE"
|
||||
# endif // (_WIN32 || __CYGWIN__) && (!defined(USE_MSRPC) || defined(SUPPORT_WINE))
|
||||
|
@ -108,9 +108,9 @@ static void CheckRpcRequest(const RPC_REQUEST64 *const Request, const unsigned i
|
||||
}
|
||||
else
|
||||
{
|
||||
if (len > _Versions[kmsMajorVersion].RequestSize + requestSize)
|
||||
if (len > _Versions[kmsMajorVersion - 4].RequestSize + requestSize)
|
||||
logger("Warning: %u excess bytes in RPC request.\n",
|
||||
len - _Versions[kmsMajorVersion].RequestSize
|
||||
len - (_Versions[kmsMajorVersion - 4].RequestSize + requestSize)
|
||||
);
|
||||
}
|
||||
|
||||
@ -743,7 +743,7 @@ RpcStatus rpcSendRequest(const RpcCtx sock, const BYTE *const KmsRequest, const
|
||||
RPC_REQUEST64 *RpcRequest;
|
||||
RPC_RESPONSE64 _Response;
|
||||
int status;
|
||||
int_fast8_t useNdr64 = UseClientRpcNDR64 && firstPacketSent;
|
||||
int_fast8_t useNdr64 = RpcFlags.HasNDR64 && UseClientRpcNDR64 && firstPacketSent;
|
||||
size_t size = sizeof(RPC_HEADER) + (useNdr64 ? sizeof(RPC_REQUEST64) : sizeof(RPC_REQUEST)) + requestSize;
|
||||
size_t responseSize2;
|
||||
|
||||
|
@ -21,6 +21,10 @@ char ErrorMessage[MESSAGE_BUFFER_SIZE];
|
||||
#ifndef NO_STRICT_MODES
|
||||
uint32_t WhitelistingLevel = 0;
|
||||
int_fast8_t CheckClientTime = FALSE;
|
||||
#ifndef NO_CLIENT_LIST
|
||||
int_fast8_t MaintainClients = FALSE;
|
||||
int_fast8_t StartEmpty = FALSE;
|
||||
#endif // NO_CLIENT_LIST
|
||||
#endif // !NO_STRICT_MODES
|
||||
|
||||
#ifndef USE_MSRPC
|
||||
@ -95,9 +99,9 @@ int numsockets = 0;
|
||||
|
||||
#if !defined(NO_LIMIT) && !__minix__
|
||||
#ifndef _WIN32 // Posix
|
||||
sem_t *Semaphore;
|
||||
sem_t *MaxTaskSemaphore;
|
||||
#else // _WIN32
|
||||
HANDLE Semaphore;
|
||||
HANDLE MaxTaskSemaphore;
|
||||
#endif // _WIN32
|
||||
|
||||
#endif // !defined(NO_LIMIT) && !__minix__
|
||||
|
@ -16,9 +16,9 @@
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <syslog.h>
|
||||
#if (!defined(NO_LIMIT) || defined(USE_THREADS)) && !__minix__
|
||||
#if !__minix__
|
||||
#include <pthread.h>
|
||||
#endif // (!defined(NO_LIMIT) || defined(USE_THREADS)) && !__minix__
|
||||
#endif // !__minix__
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#if !defined(NO_LIMIT) && !__minix__
|
||||
@ -104,6 +104,10 @@ extern int_fast8_t InetdMode;
|
||||
#ifndef NO_STRICT_MODES
|
||||
extern uint32_t WhitelistingLevel;
|
||||
extern int_fast8_t CheckClientTime;
|
||||
#ifndef NO_CLIENT_LIST
|
||||
extern int_fast8_t MaintainClients;
|
||||
extern int_fast8_t StartEmpty;
|
||||
#endif // NO_CLIENT_LIST
|
||||
#endif // !NO_STRICT_MODES
|
||||
|
||||
|
||||
@ -162,9 +166,9 @@ extern int numsockets;
|
||||
#if !defined(NO_LIMIT) && !__minix__
|
||||
|
||||
#ifndef _WIN32
|
||||
extern sem_t *Semaphore;
|
||||
extern sem_t *MaxTaskSemaphore;
|
||||
#else // _WIN32
|
||||
extern HANDLE Semaphore;
|
||||
extern HANDLE MaxTaskSemaphore;
|
||||
#endif // _WIN32
|
||||
|
||||
#endif // !defined(NO_LIMIT) && !__minix__
|
||||
|
36
src/types.h
36
src/types.h
@ -1,6 +1,10 @@
|
||||
#ifndef __types_h
|
||||
#define __types_h
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
@ -22,7 +26,12 @@
|
||||
#define ANDROID_HELPER1(s) ANDROID_HELPER2(s)
|
||||
#define ANDROID_HELPER2(s) #s
|
||||
|
||||
#if !defined(_WIN32) && !__CYGWIN__
|
||||
#if !_WIN32 && !__CYGWIN__
|
||||
|
||||
#if !__minix__
|
||||
#include <pthread.h>
|
||||
#endif // !__minix__
|
||||
|
||||
#define __declspec(x) __attribute__((__visibility__("default")))
|
||||
#endif
|
||||
|
||||
@ -45,6 +54,7 @@
|
||||
#endif // __ANDROID__
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#include <netinet/in.h>
|
||||
#endif // _WIN32
|
||||
|
||||
@ -64,9 +74,31 @@
|
||||
#endif
|
||||
|
||||
#if !defined(NO_STRICT_MODES) && defined(NO_BASIC_PRODUCT_LIST)
|
||||
#define NO_STRICT_MODES
|
||||
#define NO_STRICT_MODES
|
||||
#endif // !defined(NO_STRICT_MODES) && defined(NO_BASIC_PRODUCT_LIST)
|
||||
|
||||
//#if (__minix__ || defined(NO_SOCKETS)) && !defined(NO_STRICT_MODES)
|
||||
//#define NO_STRICT_MODES
|
||||
//#endif // __minix__ && !defined(NO_STRICT_MODES)
|
||||
|
||||
#if (defined(NO_STRICT_MODES) || defined(NO_SOCKETS)) && !defined(NO_CLIENT_LIST)
|
||||
#define NO_CLIENT_LIST
|
||||
#endif // defined(NO_STRICT_MODES) || defined(NO_SOCKETS) && !defined(NO_CLIENT_LIST)
|
||||
|
||||
#if !_WIN32 && !__CYGWIN__
|
||||
|
||||
#if !defined(_POSIX_THREADS) || (!defined(_POSIX_THREAD_PROCESS_SHARED) && !defined(USE_THREADS))
|
||||
#ifndef NO_CLIENT_LIST
|
||||
#define NO_CLIENT_LIST
|
||||
#endif // !NO_CLIENT_LIST
|
||||
#endif // !defined(_POSIX_THREADS) || (!defined(_POSIX_THREAD_PROCESS_SHARED) && !defined(USE_THREADS))
|
||||
|
||||
#if !defined(_POSIX_THREADS) && !defined(NO_LIMIT)
|
||||
#define NO_LIMIT
|
||||
#endif // !defined(POSIX_THREADS) && !defined(NO_LIMIT)
|
||||
|
||||
#endif // !_WIN32 && !__CYGWIN__
|
||||
|
||||
#ifndef alloca
|
||||
#ifdef __GNUC__
|
||||
#define alloca(x) __builtin_alloca(x)
|
||||
|
@ -133,7 +133,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>USE_THREADS;_PEDANTIC</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_PEDANTIC;USE_THREADS</PreprocessorDefinitions>
|
||||
<ThreadSafeStatics>
|
||||
</ThreadSafeStatics>
|
||||
<ExceptionHandling>Disabled</ExceptionHandling>
|
||||
|
113
src/vlmcsd.c
113
src/vlmcsd.c
@ -42,9 +42,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#if !__ANDROID__
|
||||
#include <sys/shm.h>
|
||||
#else // __ANDROID__
|
||||
#include <sys/syscall.h>
|
||||
#endif // __ANDROID__
|
||||
#endif // !__ANDROID__
|
||||
#endif // !defined(NO_LIMIT) && !__minix__
|
||||
|
||||
#include <sys/wait.h>
|
||||
@ -69,7 +67,9 @@
|
||||
#endif
|
||||
|
||||
#include "vlmcsd.h"
|
||||
// ReSharper disable CppUnusedIncludeDirective
|
||||
#include "endian.h"
|
||||
// ReSharper restore CppUnusedIncludeDirective
|
||||
#include "shared_globals.h"
|
||||
#include "output.h"
|
||||
#ifndef USE_MSRPC
|
||||
@ -80,8 +80,7 @@
|
||||
#include "ntservice.h"
|
||||
#include "helpers.h"
|
||||
|
||||
static const char* const optstring = "N:B:m:t:w:0:3:6:H:A:R:u:g:L:p:i:P:l:r:U:W:C:c:F:o:T:K:SseDdVvqkZ";
|
||||
|
||||
static const char* const optstring = "N:B:m:t:w:0:3:6:H:A:R:u:g:L:p:i:P:l:r:U:W:C:c:F:o:T:K:E:M:SseDdVvqkZ";
|
||||
|
||||
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||
static uint_fast8_t maxsockets = 0;
|
||||
@ -119,6 +118,10 @@ static IniFileParameter_t IniFileParameterList[] =
|
||||
# ifndef NO_STRICT_MODES
|
||||
{ "WhiteListingLevel", INI_PARAM_WHITELISTING_LEVEL },
|
||||
{ "CheckClientTime", INI_PARAM_CHECK_CLIENT_TIME },
|
||||
# ifndef NO_CLIENT_LIST
|
||||
{ "StartEmpty", INI_PARAM_START_EMPTY },
|
||||
{ "MaintainClients", INI_PARAM_MAINTAIN_CLIENTS },
|
||||
# endif // NO_CLIENT_LIST
|
||||
# endif // NO_STRICT_MODES
|
||||
# ifndef NO_RANDOM_EPID
|
||||
{ "RandomizationLevel", INI_PARAM_RANDOMIZATION_LEVEL },
|
||||
@ -180,37 +183,6 @@ static IniFileParameter_t IniFileParameterList[] =
|
||||
static int shmid = -1;
|
||||
#endif
|
||||
|
||||
#if __ANDROID__ && !defined(USE_THREADS) // Bionic does not wrap these syscalls (willingly because Google fears, developers don't know how to use it)
|
||||
|
||||
#ifdef __NR_shmget
|
||||
static int shmget(key_t key, size_t size, int shmflg)
|
||||
{
|
||||
return syscall(__NR_shmget, key, size, shmflg);
|
||||
}
|
||||
#endif // __NR_shmget
|
||||
|
||||
#ifdef __NR_shmat
|
||||
static void *shmat(int shmid, const void *shmaddr, int shmflg)
|
||||
{
|
||||
return (void *)syscall(__NR_shmat, shmid, shmaddr, shmflg);
|
||||
}
|
||||
#endif // __NR_shmat
|
||||
|
||||
#ifdef __NR_shmdt
|
||||
static int shmdt(const void *shmaddr)
|
||||
{
|
||||
return syscall(__NR_shmdt, shmaddr);
|
||||
}
|
||||
#endif // __NR_shmdt
|
||||
|
||||
#ifdef __NR_shmctl
|
||||
static int shmctl(int shmid, int cmd, /*struct shmid_ds*/void *buf)
|
||||
{
|
||||
return syscall(__NR_shmctl, shmid, cmd, buf);
|
||||
}
|
||||
#endif // __NR_shmctl
|
||||
|
||||
#endif // __ANDROID__ && !defined(USE_THREADS)
|
||||
|
||||
#endif // !defined(NO_LIMIT) && !defined (NO_SOCKETS) && !__minix__
|
||||
|
||||
@ -341,6 +313,10 @@ static __noreturn void usage()
|
||||
# ifndef NO_STRICT_MODES
|
||||
" -K 0|1|2|3\t\tset whitelisting level for KMS IDs (default -K0)\n"
|
||||
" -c0, -c1\t\tdisable/enable client time checking (default -c0)\n"
|
||||
# ifndef NO_CLIENT_LIST
|
||||
" -M0, -M1\t\tdisable/enable maintaining clients (default -M0)\n"
|
||||
" -E0, -E1\t\tdisable/enable start with empty client list (default -E0, ignored if -M0)\n"
|
||||
# endif // !NO_CLIENT_LIST
|
||||
# endif // !NO_STRICT_MODES
|
||||
# ifndef USE_MSRPC
|
||||
# if !defined(NO_TIMEOUT) && !__minix__
|
||||
@ -674,7 +650,7 @@ static BOOL setIniFileParameter(uint_fast8_t id, const char *const iniarg)
|
||||
|
||||
# endif // NO_PID_FILE
|
||||
|
||||
#ifndef NO_STRICT_MODES
|
||||
# ifndef NO_STRICT_MODES
|
||||
|
||||
case INI_PARAM_WHITELISTING_LEVEL:
|
||||
success = getIniFileArgumentInt(&WhitelistingLevel, iniarg, 0, 3);
|
||||
@ -684,7 +660,17 @@ static BOOL setIniFileParameter(uint_fast8_t id, const char *const iniarg)
|
||||
success = getIniFileArgumentBool(&CheckClientTime, iniarg);
|
||||
break;
|
||||
|
||||
#endif // !NO_STRICT_MODES
|
||||
# ifndef NO_CLIENT_LIST
|
||||
case INI_PARAM_MAINTAIN_CLIENTS:
|
||||
success = getIniFileArgumentBool(&MaintainClients, iniarg);
|
||||
break;
|
||||
|
||||
case INI_PARAM_START_EMPTY:
|
||||
success = getIniFileArgumentBool(&StartEmpty, iniarg);
|
||||
break;
|
||||
|
||||
# endif // NO_CLIENT_LIST
|
||||
# endif // !NO_STRICT_MODES
|
||||
|
||||
|
||||
# ifndef NO_LOG
|
||||
@ -1286,6 +1272,18 @@ static void parseGeneralArguments() {
|
||||
ignoreIniFileParameter(INI_PARAM_CHECK_CLIENT_TIME);
|
||||
break;
|
||||
|
||||
# ifndef NO_CLIENT_LIST
|
||||
case 'E':
|
||||
if (!getArgumentBool(&StartEmpty, optarg)) usage();
|
||||
ignoreIniFileParameter(INI_PARAM_START_EMPTY);
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
if (!getArgumentBool(&MaintainClients, optarg)) usage();
|
||||
ignoreIniFileParameter(INI_PARAM_MAINTAIN_CLIENTS);
|
||||
break;
|
||||
|
||||
# endif // !NO_CLIENT_LIST
|
||||
# endif // !NO_STRICT_MODES
|
||||
|
||||
case 'D':
|
||||
@ -1458,6 +1456,10 @@ void cleanup()
|
||||
{
|
||||
if (!InetdMode)
|
||||
{
|
||||
# ifndef NO_CLIENT_LIST
|
||||
if (MaintainClients) CleanUpClientLists();
|
||||
# endif // !NO_CLIENT_LIST
|
||||
|
||||
# ifndef NO_PID_FILE
|
||||
if (fn_pid) vlmcsd_unlink(fn_pid);
|
||||
# endif // NO_PID_FILE
|
||||
@ -1468,7 +1470,7 @@ void cleanup()
|
||||
# if !defined(USE_THREADS) && !defined(CYGWIN)
|
||||
if (shmid >= 0)
|
||||
{
|
||||
if (Semaphore != (sem_t*)-1) shmdt(Semaphore);
|
||||
if (MaxTaskSemaphore != (sem_t*)-1) shmdt(MaxTaskSemaphore);
|
||||
shmctl(shmid, IPC_RMID, NULL);
|
||||
}
|
||||
# endif // !defined(USE_THREADS) && !defined(CYGWIN)
|
||||
@ -1520,18 +1522,18 @@ static void allocateSemaphore(void)
|
||||
|
||||
# if !defined(USE_THREADS) && !defined(CYGWIN)
|
||||
|
||||
if ((Semaphore = sem_open("/vlmcsd", O_CREAT /*| O_EXCL*/, 0700, MaxTasks)) == SEM_FAILED) // fails on many systems
|
||||
if ((MaxTaskSemaphore = sem_open("/vlmcsd", O_CREAT /*| O_EXCL*/, 0700, MaxTasks)) == SEM_FAILED) // fails on many systems
|
||||
{
|
||||
// We didn't get a named Semaphore (/dev/shm on Linux) so let's try our own shared page
|
||||
|
||||
if (
|
||||
(shmid = shmget(IPC_PRIVATE, sizeof(sem_t), IPC_CREAT | 0600)) < 0 ||
|
||||
(Semaphore = (sem_t*)shmat(shmid, NULL, 0)) == (sem_t*)-1 ||
|
||||
sem_init(Semaphore, 1, MaxTasks) < 0
|
||||
(MaxTaskSemaphore = (sem_t*)shmat(shmid, NULL, 0)) == (sem_t*)-1 ||
|
||||
sem_init(MaxTaskSemaphore, 1, MaxTasks) < 0
|
||||
)
|
||||
{
|
||||
int errno_save = errno;
|
||||
if (Semaphore != (sem_t*)-1) shmdt(Semaphore);
|
||||
if (MaxTaskSemaphore != (sem_t*)-1) shmdt(MaxTaskSemaphore);
|
||||
if (shmid >= 0) shmctl(shmid, IPC_RMID, NULL);
|
||||
printerrorf("Warning: Could not create semaphore: %s\n", vlmcsd_strerror(errno_save));
|
||||
MaxTasks = SEM_VALUE_MAX;
|
||||
@ -1540,13 +1542,13 @@ static void allocateSemaphore(void)
|
||||
|
||||
# else // THREADS or CYGWIN
|
||||
|
||||
Semaphore = (sem_t*)vlmcsd_malloc(sizeof(sem_t));
|
||||
MaxTaskSemaphore = (sem_t*)vlmcsd_malloc(sizeof(sem_t));
|
||||
|
||||
if (sem_init(Semaphore, sharemode, MaxTasks) < 0) // sem_init is not implemented on Darwin (returns ENOSYS)
|
||||
if (sem_init(MaxTaskSemaphore, sharemode, MaxTasks) < 0) // sem_init is not implemented on Darwin (returns ENOSYS)
|
||||
{
|
||||
free(Semaphore);
|
||||
free(MaxTaskSemaphore);
|
||||
|
||||
if ((Semaphore = sem_open("/vlmcsd", O_CREAT /*| O_EXCL*/, 0700, MaxTasks)) == SEM_FAILED)
|
||||
if ((MaxTaskSemaphore = sem_open("/vlmcsd", O_CREAT /*| O_EXCL*/, 0700, MaxTasks)) == SEM_FAILED)
|
||||
{
|
||||
printerrorf("Warning: Could not create semaphore: %s\n", vlmcsd_strerror(errno));
|
||||
MaxTasks = SEM_VALUE_MAX;
|
||||
@ -1557,7 +1559,7 @@ static void allocateSemaphore(void)
|
||||
|
||||
# else // _WIN32
|
||||
|
||||
if (!((Semaphore = CreateSemaphoreA(NULL, MaxTasks, MaxTasks, NULL))))
|
||||
if (!((MaxTaskSemaphore = CreateSemaphoreA(NULL, MaxTasks, MaxTasks, NULL))))
|
||||
{
|
||||
printerrorf("Warning: Could not create semaphore: %s\n", vlmcsd_strerror(GetLastError()));
|
||||
MaxTasks = SEM_VALUE_MAX;
|
||||
@ -1687,9 +1689,9 @@ int newmain()
|
||||
|
||||
# ifndef NO_LOG
|
||||
// Initialize the Critical Section for proper logging
|
||||
# if _WIN32
|
||||
# if _WIN32 || __CYGWIN__
|
||||
InitializeCriticalSection(&logmutex);
|
||||
# endif // _WIN32
|
||||
# endif // _WIN32 || __CYGWIN__
|
||||
# endif // NO_LOG
|
||||
|
||||
# endif // USE_THREADS
|
||||
@ -1729,13 +1731,16 @@ int newmain()
|
||||
if (S_ISSOCK(statbuf.st_mode))
|
||||
{
|
||||
InetdMode = 1;
|
||||
# ifndef NO_CLIENT_LIST
|
||||
MaintainClients = FALSE;
|
||||
# endif // !NO_CLIENT_LIST
|
||||
nodaemon = 1;
|
||||
# ifndef SIMPLE_SOCKETS
|
||||
maxsockets = 0;
|
||||
# endif // SIMPLE_SOCKETS
|
||||
# endif // !SIMPLE_SOCKETS
|
||||
# ifndef NO_LOG
|
||||
logstdout = 0;
|
||||
# endif // NO_LOG
|
||||
# endif // !NO_LOG
|
||||
}
|
||||
# endif // !defined(_WIN32) && !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||
|
||||
@ -1751,6 +1756,10 @@ int newmain()
|
||||
|
||||
# endif // NO_INI_FILE
|
||||
|
||||
# ifndef NO_CLIENT_LIST
|
||||
if (MaintainClients) InitializeClientLists();
|
||||
# endif // !NO_CLIENT_LIST
|
||||
|
||||
# if defined(USE_MSRPC) && !defined(NO_PRIVATE_IP_DETECT)
|
||||
if (PublicIPProtectionLevel)
|
||||
{
|
||||
|
@ -54,6 +54,8 @@ int server_main(int argc, CARGV argv);
|
||||
#define INI_PARAM_OFFICE2016 23
|
||||
#define INI_PARAM_WHITELISTING_LEVEL 24
|
||||
#define INI_PARAM_CHECK_CLIENT_TIME 25
|
||||
#define INI_PARAM_MAINTAIN_CLIENTS 26
|
||||
#define INI_PARAM_START_EMPTY 27
|
||||
|
||||
#define INI_FILE_PASS_1 1
|
||||
#define INI_FILE_PASS_2 2
|
||||
|
Loading…
Reference in New Issue
Block a user