mirror of
https://github.com/Wind4/vlmcsd.git
synced 2025-07-03 17:27:56 +08:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
f72621f166 | |||
c479a67c2c |
273
GNUmakefile
273
GNUmakefile
@ -5,7 +5,10 @@
|
||||
PROGRAM_NAME ?= vlmcsd
|
||||
CLIENT_NAME ?= vlmcs
|
||||
MULTI_NAME ?= vlmcsdmulti
|
||||
OBJ_NAME ?= libkms-static.o
|
||||
A_NAME ?= libkms.a
|
||||
CONFIG ?= config.h
|
||||
COMPILER_LANGUAGE ?= c
|
||||
|
||||
# crypto library to use for standard algos, could save ~1-2kb ;)
|
||||
# can be either 'openssl', 'polarssl' or anything other for internal impl
|
||||
@ -34,49 +37,72 @@ endif
|
||||
ifneq (,$(findstring androideabi,$(TARGETPLATFORM)))
|
||||
ANDROID := 1
|
||||
UNIX := 1
|
||||
ELF := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring minix,$(TARGETPLATFORM)))
|
||||
MINIX := 1
|
||||
UNIX := 1
|
||||
ELF := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring mingw,$(TARGETPLATFORM)))
|
||||
MINGW := 1
|
||||
WIN := 1
|
||||
PE := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring cygwin,$(TARGETPLATFORM)))
|
||||
CYGWIN := 1
|
||||
WIN := 1
|
||||
PE := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring cygnus,$(TARGETPLATFORM)))
|
||||
CYGWIN := 1
|
||||
WIN := 1
|
||||
PE := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring freebsd,$(TARGETPLATFORM)))
|
||||
FREEBSD := 1
|
||||
UNIX := 1
|
||||
BSD := 1
|
||||
ELF := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring netbsd,$(TARGETPLATFORM)))
|
||||
NETBSD := 1
|
||||
UNIX := 1
|
||||
BSD := 1
|
||||
ELF := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring openbsd,$(TARGETPLATFORM)))
|
||||
OPENBSD := 1
|
||||
UNIX := 1
|
||||
BSD := 1
|
||||
ELF := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring solaris,$(TARGETPLATFORM)))
|
||||
SOLARIS := 1
|
||||
UNIX := 1
|
||||
ELF := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring linux,$(TARGETPLATFORM)))
|
||||
LINUX := 1
|
||||
UNIX := 1
|
||||
ELF := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring gnu,$(TARGETPLATFORM)))
|
||||
ifeq (,$(findstring linux,$(TARGETPLATFORM)))
|
||||
UNIX := 1
|
||||
HURD := 1
|
||||
ELF := 1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CYGWIN),1)
|
||||
@ -89,12 +115,25 @@ else
|
||||
DLL_NAME ?= libkms.so
|
||||
endif
|
||||
|
||||
BASECFLAGS = -DCONFIG=\"$(CONFIG)\" -DBUILD_TIME=$(shell date '+%s') -g -Os -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections
|
||||
BASECFLAGS = -DVLMCSD_COMPILER=\"$(notdir $(CC))\" -DVLMCSD_PLATFORM=\"$(TARGETPLATFORM)\" -DCONFIG=\"$(CONFIG)\" -DBUILD_TIME=$(shell date '+%s') -g -Os -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections
|
||||
BASELDFLAGS =
|
||||
STRIPFLAGS =
|
||||
CLIENTLDFLAGS =
|
||||
SERVERLDFLAGS =
|
||||
|
||||
ifndef SAFE_MODE
|
||||
BASECFLAGS += -fvisibility=hidden -pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants
|
||||
|
||||
ifeq ($(ELF),1)
|
||||
BASELDFLAGS += -Wl,-z,norelro
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring gcc,$(notdir $(CC))))
|
||||
BASECFLAGS += -flto
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(NOLIBS),1)
|
||||
NOLRESOLV=1
|
||||
NOLPTHREAD=1
|
||||
@ -105,20 +144,24 @@ ifneq ($(NO_DNS),1)
|
||||
ifneq ($(NOLRESOLV),1)
|
||||
|
||||
ifeq ($(MINGW),1)
|
||||
BASELDFLAGS += -ldnsapi
|
||||
CLIENTLDFLAGS += -ldnsapi
|
||||
endif
|
||||
|
||||
ifeq ($(LINUX),1)
|
||||
BASELDFLAGS += -lresolv
|
||||
CLIENTLDFLAGS += -lresolv
|
||||
endif
|
||||
|
||||
ifeq ($(HURD),1)
|
||||
CLIENTLDFLAGS += -lresolv
|
||||
endif
|
||||
|
||||
ifeq ($(DARWIN),1)
|
||||
BASELDFLAGS += -lresolv
|
||||
CLIENTLDFLAGS += -lresolv
|
||||
endif
|
||||
|
||||
ifeq ($(CYGWIN),1)
|
||||
DNS_PARSER := internal
|
||||
BASELDFLAGS += -lresolv
|
||||
CLIENTLDFLAGS += -lresolv
|
||||
endif
|
||||
|
||||
ifeq ($(OPENBSD),1)
|
||||
@ -126,7 +169,7 @@ ifneq ($(NO_DNS),1)
|
||||
endif
|
||||
|
||||
ifeq ($(SOLARIS),1)
|
||||
BASELDFLAGS += -lresolv
|
||||
CLIENTLDFLAGS += -lresolv
|
||||
endif
|
||||
|
||||
endif
|
||||
@ -155,16 +198,18 @@ else
|
||||
STRIPFLAGS += -s
|
||||
endif
|
||||
|
||||
LIBRARY_CFLAGS = -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_EXTENDED_PRODUCT_LIST -DNO_BASIC_PRODUCT_LIST -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION
|
||||
|
||||
ifeq ($(FEATURES), embedded)
|
||||
BASECFLAGS += -DNO_HELP -DNO_USER_SWITCH -DNO_BASIC_PRODUCT_LIST -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_VERBOSE_LOG
|
||||
BASECFLAGS += -DNO_HELP -DNO_USER_SWITCH -DNO_BASIC_PRODUCT_LIST -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_VERBOSE_LOG -DNO_VERSION_INFORMATION
|
||||
else ifeq ($(FEATURES), autostart)
|
||||
BASECFLAGS += -DNO_HELP
|
||||
BASECFLAGS += -DNO_HELP -DNO_VERSION_INFORMATION
|
||||
else ifeq ($(FEATURES), minimum)
|
||||
BASECFLAGS += -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_EXTENDED_PRODUCT_LIST -DNO_BASIC_PRODUCT_LIST -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT
|
||||
BASECFLAGS += $(LIBRARY_CFLAGS)
|
||||
else ifeq ($(FEATURES), most)
|
||||
BASECFLAGS += -DNO_SIGHUP -DNO_PID_FILE -DNO_LIMIT
|
||||
else ifeq ($(FEATURES), inetd)
|
||||
BASECFLAGS += -DNO_SIGHUP -DNO_SOCKETS -DNO_PID_FILE -DNO_LIMIT
|
||||
BASECFLAGS += -DNO_SIGHUP -DNO_SOCKETS -DNO_PID_FILE -DNO_LIMIT -DNO_VERSION_INFORMATION
|
||||
else ifeq ($(FEATURES), fixedepids)
|
||||
BASECFLAGS += -DNO_SIGHUP -DNO_CL_PIDS -DNO_RANDOM_EPID -DNO_INI_FILE
|
||||
endif
|
||||
@ -202,7 +247,7 @@ ifdef HWID
|
||||
endif
|
||||
|
||||
ifdef TERMINAL_WIDTH
|
||||
BASECFLAGS += -DTERMINAL_FIXED_WIDTH=$(TERMINAL_WIDTH)
|
||||
BASECFLAGS += -DTERMINAL_FIXED_WIDTH=$(TERMINAL_WIDTH) -DDISPLAY_WIDTH=\"$(TERMINAL_WIDTH)\"
|
||||
endif
|
||||
|
||||
ifeq ($(NOPROCFS), 1)
|
||||
@ -216,13 +261,15 @@ endif
|
||||
ifneq ($(ANDROID), 1)
|
||||
ifneq ($(MINIX), 1)
|
||||
ifneq ($(NOLPTHREAD), 1)
|
||||
ifeq ($(findstring NO_LIMIT,$(CFLAGS) $(BASECFLAGS)),)
|
||||
BASELDFLAGS += -lpthread
|
||||
|
||||
ifeq ($(THREADS), 1)
|
||||
SERVERLDFLAGS += -lpthread
|
||||
endif
|
||||
|
||||
ifneq ($(findstring USE_THREADS,$(BASECFLAGS)),)
|
||||
BASELDFLAGS += -lpthread
|
||||
ifeq (,$(findstring NO_LIMIT,$(CFLAGS) $(BASECFLAGS)))
|
||||
SERVERLDFLAGS += -lpthread
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@ -231,9 +278,9 @@ $(MULTI_NAME): BASECFLAGS += -DMULTI_CALL_BINARY=1
|
||||
|
||||
all: $(CLIENT_NAME) $(PROGRAM_NAME)
|
||||
|
||||
ifdef CAT
|
||||
#ifdef CAT
|
||||
allmulti: $(CLIENT_NAME) $(PROGRAM_NAME) $(MULTI_NAME)
|
||||
endif
|
||||
#endif
|
||||
|
||||
ifneq ($(strip $(VLMCSD_VERSION)),)
|
||||
BASECFLAGS += -DVERSION=\"$(VLMCSD_VERSION),\ built\ $(shell date -u '+%Y-%m-%d %H:%M:%S' | sed -e 's/ /\\ /g')\ UTC\"
|
||||
@ -254,12 +301,12 @@ VLMCS_SRCS = vlmcs.c $(SRCS)
|
||||
VLMCS_OBJS = $(VLMCS_SRCS:.c=.o)
|
||||
|
||||
MULTI_SRCS = vlmcsd.c vlmcs.c vlmcsdmulti.c $(SRCS)
|
||||
MULTI_OBJS = $(MULTI_SRCS:.c=.o)
|
||||
MULTI_OBJS = $(SRCS:.c=.o) vlmcsd-m.o vlmcs-m.o vlmcsdmulti-m.o
|
||||
|
||||
DLL_SRCS = libkms.c $(SRCS)
|
||||
DLL_OBJS = $(DLL_SRCS:.c=.o)
|
||||
|
||||
PDFDOCS = vlmcs.1.pdf vlmcsd.7.pdf vlmcsd.8.pdf vlmcsdmulti.1.pdf vlmcsd.ini.5.pdf
|
||||
PDFDOCS = vlmcs.1.pdf vlmcsd.7.pdf vlmcsd.8.pdf vlmcsdmulti.1.pdf vlmcsd.ini.5.pdf vlmcsd-floppy.7.pdf
|
||||
HTMLDOCS = $(PDFDOCS:.pdf=.html)
|
||||
UNIXDOCS = $(PDFDOCS:.pdf=.unix.txt)
|
||||
DOSDOCS = $(PDFDOCS:.pdf=.dos.txt)
|
||||
@ -268,11 +315,13 @@ ifneq ($(NO_DNS),1)
|
||||
|
||||
VLMCS_SRCS += dns_srv.c
|
||||
MULTI_SRCS += dns_srv.c
|
||||
MULTI_OBJS += dns_srv.o
|
||||
|
||||
ifeq ($(DNS_PARSER),internal)
|
||||
ifneq ($(MINGW),1)
|
||||
VLMCS_SRCS += ns_parse.c ns_name.c
|
||||
MULTI_SRCS += ns_parse.c ns_name.c
|
||||
MULTI_OBJS += ns_parse.o ns_name.o
|
||||
BASECFLAGS += "-DDNS_PARSER_INTERNAL"
|
||||
endif
|
||||
endif
|
||||
@ -283,6 +332,8 @@ ifeq ($(MSRPC),1)
|
||||
VLMCSD_SRCS += msrpc-server.c
|
||||
VLMCS_SRCS += msrpc-client.c
|
||||
MULTI_SRCS += msrpc-server.c msrpc-client.c
|
||||
MULTI_OBJS += msrpc-server-m.o msrpc-client-m.o
|
||||
DLL_SRCS += msrpc-server.c
|
||||
BASECFLAGS += -DUSE_MSRPC -Wno-unknown-pragmas
|
||||
BASELDFLAGS += -lrpcrt4
|
||||
else
|
||||
@ -292,6 +343,7 @@ endif
|
||||
ifeq "$(WIN)" "1"
|
||||
VLMCSD_SRCS += ntservice.c
|
||||
MULTI_SRCS += ntservice.c
|
||||
MULTI_OBJS += ntservice.o
|
||||
endif
|
||||
|
||||
ifeq ($(CRYPTO), openssl_with_aes)
|
||||
@ -312,7 +364,6 @@ else ifeq ($(CRYPTO), polarssl)
|
||||
else ifeq ($(CRYPTO), windows)
|
||||
BASECFLAGS += -D_CRYPTO_WINDOWS
|
||||
SRCS += crypto_windows.c
|
||||
#BASELDFLAGS += -lpolarssl
|
||||
else
|
||||
BASECFLAGS += -D_CRYPTO_INTERNAL
|
||||
SRCS += crypto_internal.c
|
||||
@ -332,9 +383,12 @@ endif
|
||||
|
||||
ifeq ($(VERBOSE),3)
|
||||
COMPILER := $(shell printf "%-40s" $(notdir $(CC)))
|
||||
ARCHIVER := $(shell printf "%-40s" $(notdir $(AR)))
|
||||
endif
|
||||
|
||||
ifeq ($(CAT),2)
|
||||
ARCMD := AR
|
||||
|
||||
ifdef CAT
|
||||
LDCMD := CC/LD
|
||||
else
|
||||
LDCMD := LD
|
||||
@ -344,99 +398,112 @@ endif
|
||||
|
||||
%.o: %.c
|
||||
ifeq ($(VERBOSE),1)
|
||||
$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
|
||||
$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
|
||||
ifeq ($(DEPENDENCIES),1)
|
||||
$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
|
||||
$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
|
||||
endif
|
||||
else
|
||||
@echo "$(COMPILER) CC $@ <- $<"
|
||||
@$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
|
||||
@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
|
||||
ifeq ($(DEPENDENCIES),1)
|
||||
@echo "$(COMPILER) DEP $*.d <- $<"
|
||||
@$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
|
||||
@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
|
||||
endif
|
||||
endif
|
||||
|
||||
vlmcsd_all.c: $(VLMCSD_SRCS)
|
||||
%-m.o: %.c
|
||||
ifeq ($(VERBOSE),1)
|
||||
cat $^ > $@
|
||||
$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -o $@ -c $<
|
||||
ifeq ($(DEPENDENCIES),1)
|
||||
$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
|
||||
endif
|
||||
else
|
||||
@echo "$(COMPILER) CAT $@ <- $^"
|
||||
@cat $^ > $@
|
||||
@echo "$(COMPILER) CC $@ <- $<"
|
||||
@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -o $@ -c $<
|
||||
ifeq ($(DEPENDENCIES),1)
|
||||
@echo "$(COMPILER) DEP $*.d <- $<"
|
||||
@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
|
||||
endif
|
||||
endif
|
||||
|
||||
vlmcs_all.c: $(VLMCS_SRCS)
|
||||
ifeq ($(VERBOSE),1)
|
||||
cat $^ > $@
|
||||
else
|
||||
@echo "$(COMPILER) CAT $@ <- $^"
|
||||
@cat $^ > $@
|
||||
endif
|
||||
|
||||
vlmcsdmulti_all.c: $(MULTI_SRCS)
|
||||
ifeq ($(VERBOSE),1)
|
||||
cat $^ > $@
|
||||
else
|
||||
@echo "$(COMPILER) CAT $@ <- $^"
|
||||
@cat $^ > $@
|
||||
endif
|
||||
|
||||
ifdef CAT
|
||||
ifeq ($(CAT),2)
|
||||
$(PROGRAM_NAME): vlmcsd_all.c
|
||||
BUILDCOMMAND = cat $^ | $(CC) -x$(COMPILER_LANGUAGE) -o $@ -
|
||||
VLMCSD_PREREQUISITES = $(VLMCSD_SRCS)
|
||||
VLMCS_PREREQUISITES = $(VLMCS_SRCS)
|
||||
MULTI_PREREQUISITES = $(MULTI_SRCS)
|
||||
DLL_PREREQUISITES = $(DLL_SRCS)
|
||||
OBJ_PREREQUISITES = $(DLL_SRCS)
|
||||
else
|
||||
$(PROGRAM_NAME): vlmcsd_all.o
|
||||
BUILDCOMMAND = $(CC) -o $@ $^
|
||||
VLMCSD_PREREQUISITES = $(VLMCSD_OBJS)
|
||||
VLMCS_PREREQUISITES = $(VLMCS_OBJS)
|
||||
MULTI_PREREQUISITES = $(MULTI_OBJS)
|
||||
DLL_PREREQUISITES = $(DLL_OBJS)
|
||||
OBJ_PREREQUISITES = $(DLL_OBJS)
|
||||
endif
|
||||
|
||||
ifeq ($(VERBOSE),1)
|
||||
BUILDCOMMANDPREFIX = +
|
||||
else
|
||||
$(PROGRAM_NAME): $(VLMCSD_OBJS)
|
||||
BUILDCOMMANDPREFIX = +@
|
||||
endif
|
||||
ifeq ($(VERBOSE),1)
|
||||
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
|
||||
else
|
||||
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
|
||||
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
|
||||
|
||||
INFOCOMMAND = +@echo "$(COMPILER) $(LDCMD) $@ <- $^"
|
||||
ARINFOCOMMAND = +@echo "$(ARCHIVER) $(ARCMD) $@ <. $^"
|
||||
|
||||
VLMCSD_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS)
|
||||
VLMCS_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(CLIENTLDFLAGS)
|
||||
MULTI_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(CLIENTLDFLAGS) $(SERVERLDFLAGS)
|
||||
DLL_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -shared -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
|
||||
OBJ_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
|
||||
|
||||
$(PROGRAM_NAME): $(VLMCSD_PREREQUISITES)
|
||||
ifneq ($(VERBOSE),1)
|
||||
$(INFOCOMMAND)
|
||||
endif
|
||||
$(VLMCSD_COMMAND)
|
||||
|
||||
$(CLIENT_NAME): $(VLMCS_PREREQUISITES)
|
||||
ifneq ($(VERBOSE),1)
|
||||
$(INFOCOMMAND)
|
||||
endif
|
||||
$(VLMCS_COMMAND)
|
||||
|
||||
$(MULTI_NAME): $(MULTI_PREREQUISITES)
|
||||
ifneq ($(VERBOSE),1)
|
||||
$(INFOCOMMAND)
|
||||
endif
|
||||
$(MULTI_COMMAND)
|
||||
|
||||
$(DLL_NAME): $(DLL_PREREQUISITES)
|
||||
ifneq ($(VERBOSE),1)
|
||||
$(INFOCOMMAND)
|
||||
endif
|
||||
$(DLL_COMMAND)
|
||||
|
||||
ifndef CAT
|
||||
$(OBJ_NAME):
|
||||
+@echo Cannot make $@ without CAT defined. Please create $(A_NAME)
|
||||
else
|
||||
$(OBJ_NAME): $(OBJ_PREREQUISITES)
|
||||
ifneq ($(VERBOSE),1)
|
||||
$(INFOCOMMAND)
|
||||
endif
|
||||
$(OBJ_COMMAND)
|
||||
endif
|
||||
|
||||
ifdef CAT
|
||||
ifeq ($(CAT),2)
|
||||
$(CLIENT_NAME): vlmcs_all.c
|
||||
$(A_NAME): $(OBJ_NAME)
|
||||
else
|
||||
$(CLIENT_NAME): vlmcs_all.o
|
||||
$(A_NAME): BASECFLAGS += -fvisibility=hidden -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
|
||||
$(A_NAME): $(DLL_OBJS)
|
||||
endif
|
||||
else
|
||||
$(CLIENT_NAME): $(VLMCS_OBJS)
|
||||
endif
|
||||
ifeq ($(VERBOSE),1)
|
||||
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
|
||||
else
|
||||
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
|
||||
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
|
||||
ifneq ($(VERBOSE),1)
|
||||
$(ARINFOCOMMAND)
|
||||
endif
|
||||
|
||||
ifdef CAT
|
||||
ifeq ($(CAT),2)
|
||||
$(MULTI_NAME): vlmcsdmulti_all.c
|
||||
else
|
||||
$(MULTI_NAME): vlmcsdmulti_all.o
|
||||
endif
|
||||
else
|
||||
$(MULTI_NAME): $(MULTI_OBJS)
|
||||
endif
|
||||
ifeq ($(VERBOSE),1)
|
||||
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
|
||||
else
|
||||
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
|
||||
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
$(DLL_NAME): $(DLL_SRCS)
|
||||
ifeq ($(VERBOSE),1)
|
||||
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) -shared -DIS_LIBRARY=1 -UNO_SOCKETS -UUSE_MSRPC
|
||||
else
|
||||
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
|
||||
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) -shared -DIS_LIBRARY=1 -UNO_SOCKETS -UUSE_MSRPC
|
||||
endif
|
||||
|
||||
+@rm -f $@
|
||||
$(BUILDCOMMANDPREFIX)$(AR) rcs $@ $^
|
||||
|
||||
%.pdf : %
|
||||
ifeq ($(shell uname), Darwin)
|
||||
@ -467,10 +534,13 @@ htmldocs : $(HTMLDOCS)
|
||||
alldocs : $(UNIXDOCS) $(HTMLDOCS) $(PDFDOCS) $(DOSDOCS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.d *_all.c $(PROGRAM_NAME) $(MULTI_NAME) $(DLL_NAME) $(CLIENT_NAME) $(PDFDOCS) $(DOSDOCS) $(UNIXDOCS) $(HTMLDOCS)
|
||||
rm -f *.o *.d *_all.c libkms_all_*.c $(PROGRAM_NAME) $(MULTI_NAME) $(DLL_NAME) $(CLIENT_NAME) $(PDFDOCS) $(DOSDOCS) $(UNIXDOCS) $(HTMLDOCS) $(OBJ_NAME) $(A_NAME) *.a
|
||||
|
||||
dnsclean:
|
||||
rm -f dns_srv.o
|
||||
|
||||
help:
|
||||
@echo "Type:"
|
||||
@echo "Type"
|
||||
@echo " ${MAKE} - to build $(PROGRAM_NAME) and $(CLIENT_NAME)"
|
||||
@echo " ${MAKE} clean - to remove $(PROGRAM_NAME) and $(CLIENT_NAME)"
|
||||
@echo " ${MAKE} help - to see this help"
|
||||
@ -485,8 +555,9 @@ help:
|
||||
@echo " ${MAKE} $(CLIENT_NAME) - to build the client only."
|
||||
@echo " ${MAKE} $(MULTI_NAME) - to build $(PROGRAM_NAME) and $(CLIENT_NAME) in a single multi-call binary"
|
||||
@echo " ${MAKE} $(DLL_NAME) - to build the shared library $(DLL_NAME)"
|
||||
@echo " ${MAKE} $(A_NAME) - to build the static library $(A_NAME)"
|
||||
@echo ""
|
||||
@echo "Options:"
|
||||
@echo "Options"
|
||||
@echo " CONFIG=<x> Compile <x> as instead of config.h."
|
||||
@echo " INI=<x> Compile $(PROGRAM_NAME) with default ini file <x>"
|
||||
@echo " PROGRAM_NAME=<x> Use <x> as output file name for the KMS server. Defaults to vlmcsd."
|
||||
@ -498,7 +569,10 @@ help:
|
||||
@echo " CRYPTO=openssl_with_aes_soft EXPERIMENTAL: Use openssl for SHA256/HMAC and AES calculations (software)."
|
||||
@echo " CRYPTO=polarssl Use polarssl instead of internal crypto code for SHA256/HMAC calculations."
|
||||
@echo " CRYPTO=windows Use Windows CryptoAPI instead of internal crypto code for SHA256/HMAC calculations."
|
||||
@echo " MSRPC=1 Use Microsoft RPC instead of vlmcsd's internal RPC. Only works with Windows and Cygwin targets."
|
||||
@echo " CC=<x> Use compiler <x>. Supported compilers are gcc, icc, tcc and clang. Others may or may not work."
|
||||
@echo " AR=<x> Use <x> instead of ar to build $(A_NAME). Set to gcc-ar if you want to use gcc's LTO feature."
|
||||
@echo " COMPILER_LANGUAGE=<x> May be c or c++."
|
||||
@echo " TERMINAL_WIDTH=<x> Assume a fixed terminal width of <x> columns. Use in case of problems only."
|
||||
@echo " VLMCSD_VERSION=<x> Sets <x> as your version identifier. Defaults to \"private build\"."
|
||||
@echo " CFLAGS=<x> Pass <x> as additional arguments to the compiler."
|
||||
@ -522,7 +596,7 @@ help:
|
||||
@echo " FEATURES=minimum Compiles only basic features of $(PROGRAM_NAME)."
|
||||
@echo " FEATURES=fixedepids $(PROGRAM_NAME) only uses bultin internal ePIDs."
|
||||
@echo ""
|
||||
@echo "Useful CFLAGS to save memory when running $(PROGRAM_NAME) on very small embedded devices (finer control than FEATURES=):"
|
||||
@echo "Useful CFLAGS to save memory when running $(PROGRAM_NAME) on very small embedded devices (finer control than FEATURES=)"
|
||||
@echo " -DNO_EXTENDED_PRODUCT_LIST Don't compile the detailed product list."
|
||||
@echo " -DNO_BASIC_PRODUCT_LIST Don't compile the basic product list."
|
||||
@echo " -DNO_VERBOSE_LOG Don't support verbose logging. Removes -v option."
|
||||
@ -533,26 +607,29 @@ help:
|
||||
@echo " -DNO_USER_SWITCH Don't support changing uid/gid after program start. Removes -u and -g options."
|
||||
@echo " -DNO_HELP Don't support command line help."
|
||||
@echo " -DNO_CUSTOM_INTERVALS Don't support custom intervals for retry and refresh activation. Removes -A and -R options."
|
||||
@echo " -DNO_FREEBIND Don't support binding to foreign IP addresses. Removes -F0 and -F1 options. Only affects FreeBSD and Linux."
|
||||
@echo " -DSIMPLE_SOCKETS Compile $(PROGRAM_NAME) with basic socket support only. Removes -L option."
|
||||
@echo " -DNO_SOCKETS Don't support standalone operation. Requires an internet superserver to start $(PROGRAM_NAME)."
|
||||
@echo " -DNO_CL_PIDS Don't support specifying ePIDs and HwId from the command line in $(PROGRAM_NAME)."
|
||||
@echo " -DNO_LIMIT Don't support limiting concurrent clients in $(PROGRAM_NAME)."
|
||||
@echo " -DNO_SIGHUP Don't support SIGHUP handling in $(PROGRAM_NAME)."
|
||||
@echo " -DNO_VERSION_INFORMATION Don't support displaying version information in $(PROGRAM_NAME) and $(CLIENT_NAME). Removes -V option."
|
||||
@echo " -DENABLE_DEPRECATED_OPTIONS Enable command line options that provide compatibility with previous versions of $(PROGRAM_NAME)."
|
||||
@echo ""
|
||||
@echo "Troubleshooting options"
|
||||
@echo " CAT=1 Combine all sources in a single file."
|
||||
@echo " CAT=2 Combine all sources in a single file and don't create a *.o file."
|
||||
@echo " CAT=1 Combine all sources in a single in-memory file and compile directly to target."
|
||||
@echo " NOPROCFS=1 Don't rely on a properly mounted proc filesystem in /proc."
|
||||
@echo " AUXV=1 Use /proc/self/auxv (requires Linux with glibc >= 2.16 or musl.)"
|
||||
@echo " NOLPTHREAD=1 Disable detection if -lpthread is required (for use with Android NDK)."
|
||||
@echo " NOLRESOLV=1 Disable detection if -lresolv is requires (for use with Android NDK)."
|
||||
@echo " NOLRESOLV=1 Disable detection if -lresolv is required (for use with Android NDK)."
|
||||
@echo " NOLIBS=1 Do not attempt to autodetect any library dependencies."
|
||||
@echo " OPENSSL_HMAC=0 Compile for openssl versions that don't have HMAC support (required on some embedded devices)."
|
||||
@echo " NO_TIMEOUT=1 Do not set timeouts for sockets (for systems that don't support it)."
|
||||
@echo " CHILD_HANDLER=1 Install a handler for SIGCHLD (for systems that don't support SA_NOCLDWAIT)."
|
||||
@echo " NO_DNS=1 Compile vlmcs without support for detecting KMS servers via DNS."
|
||||
@echo " NO_DNS=1 Compile $(CLIENT_NAME) without support for detecting KMS servers via DNS."
|
||||
@echo " DNS_PARSER=internal Use $(CLIENT_NAME) internal DNS parsing routines. No effect on MingW (native Windows)."
|
||||
@echo ""
|
||||
@echo "Other useful CFLAGS:"
|
||||
@echo "Other useful CFLAGS"
|
||||
@echo " -DSUPPORT_WINE Add code that the Windows version of $(PROGRAM_NAME) runs on Wine if MSRPC=1"
|
||||
@echo " -D_PEDANTIC Report rare error/warning conditions instead of silently ignoring them."
|
||||
@echo " -DINCLUDE_BETAS Include SKU / activation IDs for obsolete beta/preview products."
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
64
config.h
64
config.h
@ -37,15 +37,15 @@
|
||||
*/
|
||||
|
||||
#ifndef EPID_WINDOWS
|
||||
#define EPID_WINDOWS "06401-00206-271-298329-03-1033-9600.0000-0452015"
|
||||
#define EPID_WINDOWS "06401-00206-271-398432-03-1033-9600.0000-1422016"
|
||||
#endif
|
||||
|
||||
#ifndef EPID_OFFICE2010
|
||||
#define EPID_OFFICE2010 "06401-00096-199-198322-03-1033-9600.0000-0452015"
|
||||
#define EPID_OFFICE2010 "06401-00096-199-198384-03-1033-9600.0000-1422016"
|
||||
#endif
|
||||
|
||||
#ifndef EPID_OFFICE2013
|
||||
#define EPID_OFFICE2013 "06401-00206-234-398213-03-1033-9600.0000-0452015"
|
||||
#define EPID_OFFICE2013 "06401-00206-234-384729-03-1033-9600.0000-1422016"
|
||||
#endif
|
||||
|
||||
#ifndef HWID // HwId from the Ratiborus VM
|
||||
@ -82,6 +82,25 @@
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* -------------------------------
|
||||
* Backward compatibility
|
||||
* -------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#if !defined(ENABLE_DEPRECATED_OPTIONS)
|
||||
/*
|
||||
* comment out the following line if you want vlmcsd no to support command line options
|
||||
* that have been present in previous versions of vlmcsd and are now obsolete
|
||||
*/
|
||||
|
||||
//#define ENABLE_DEPRECATED_OPTIONS
|
||||
|
||||
#endif // ENABLE_DEPRECATED_OPTIONS
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------------------
|
||||
@ -366,6 +385,20 @@
|
||||
*/
|
||||
|
||||
|
||||
#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.
|
||||
*/
|
||||
|
||||
//#define NO_FREEBIND
|
||||
|
||||
#endif // NO_FREEBIND
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef NO_EXTENDED_PRODUCT_LIST
|
||||
/*
|
||||
* Do not compile the extended product list. Removes the list of Activation GUIDs (aka
|
||||
@ -399,6 +432,18 @@
|
||||
|
||||
|
||||
|
||||
#ifndef NO_VERSION_INFORMATION
|
||||
/*
|
||||
* Removes the -V option from vlmcsd and vlmcs that displays the version information
|
||||
*/
|
||||
|
||||
//#define NO_VERSION_INFORMATION
|
||||
|
||||
#endif // NO_VERSION_INFORMATION
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef NO_VERBOSE_LOG
|
||||
/*
|
||||
* Removes the ability to do verbose logging and disables -v and -q in vlmcsd. It does not remove the -v
|
||||
@ -577,6 +622,19 @@
|
||||
|
||||
|
||||
|
||||
#ifndef SIMPLE_SOCKETS
|
||||
/*
|
||||
* Disables the ability to choose IP addresses using the -L option in vlmcsd. vlmcsd will listen on all IP addresses.
|
||||
* It still supports IPv4 and IPv6.
|
||||
*/
|
||||
|
||||
//#define SIMPLE_SOCKETS
|
||||
|
||||
#endif // SIMPLE_SOCKETS
|
||||
|
||||
|
||||
|
||||
|
||||
/* Don't change anything BELOW this line */
|
||||
|
||||
|
||||
|
1070
floppy/.config-busybox
Normal file
1070
floppy/.config-busybox
Normal file
File diff suppressed because it is too large
Load Diff
1528
floppy/.config-linux-kernel
Normal file
1528
floppy/.config-linux-kernel
Normal file
File diff suppressed because it is too large
Load Diff
1528
floppy/.config-linux-kernel-efi
Normal file
1528
floppy/.config-linux-kernel-efi
Normal file
File diff suppressed because it is too large
Load Diff
254
floppy/.config-uClibc-ng
Normal file
254
floppy/.config-uClibc-ng
Normal file
@ -0,0 +1,254 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# uClibc-ng 1.0.15 C Library Configuration
|
||||
#
|
||||
# TARGET_alpha is not set
|
||||
# TARGET_arc is not set
|
||||
# TARGET_arm is not set
|
||||
# TARGET_avr32 is not set
|
||||
# TARGET_bfin is not set
|
||||
# TARGET_c6x is not set
|
||||
# TARGET_cris is not set
|
||||
# TARGET_frv is not set
|
||||
# TARGET_h8300 is not set
|
||||
# TARGET_hppa is not set
|
||||
TARGET_i386=y
|
||||
# TARGET_ia64 is not set
|
||||
# TARGET_lm32 is not set
|
||||
# TARGET_m68k is not set
|
||||
# TARGET_metag is not set
|
||||
# TARGET_microblaze is not set
|
||||
# TARGET_mips is not set
|
||||
# TARGET_nios2 is not set
|
||||
# TARGET_or1k is not set
|
||||
# TARGET_powerpc is not set
|
||||
# TARGET_sh is not set
|
||||
# TARGET_sparc is not set
|
||||
# TARGET_x86_64 is not set
|
||||
# TARGET_xtensa is not set
|
||||
|
||||
#
|
||||
# Target Architecture Features and Options
|
||||
#
|
||||
TARGET_ARCH="i386"
|
||||
FORCE_OPTIONS_FOR_ARCH=y
|
||||
# CONFIG_386 is not set
|
||||
CONFIG_486=y
|
||||
# CONFIG_586 is not set
|
||||
# CONFIG_686 is not set
|
||||
TARGET_SUBARCH="i486"
|
||||
|
||||
#
|
||||
# Using ELF file format
|
||||
#
|
||||
ARCH_HAS_DEPRECATED_SYSCALLS=y
|
||||
ARCH_LITTLE_ENDIAN=y
|
||||
|
||||
#
|
||||
# Using Little Endian
|
||||
#
|
||||
ARCH_HAS_MMU=y
|
||||
ARCH_USE_MMU=y
|
||||
UCLIBC_HAS_FLOATS=y
|
||||
UCLIBC_HAS_FPU=y
|
||||
DO_C99_MATH=y
|
||||
DO_XSI_MATH=y
|
||||
# UCLIBC_HAS_FENV is not set
|
||||
# UCLIBC_HAS_LONG_DOUBLE_MATH is not set
|
||||
KERNEL_HEADERS="/root/openadk/target_generic-x86_uclibc-ng/usr/include"
|
||||
HAVE_DOT_CONFIG=y
|
||||
|
||||
#
|
||||
# General Library Settings
|
||||
#
|
||||
DOPIC=y
|
||||
ARCH_HAS_UCONTEXT=y
|
||||
HAVE_SHARED=y
|
||||
# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
|
||||
LDSO_LDD_SUPPORT=y
|
||||
LDSO_CACHE_SUPPORT=y
|
||||
# LDSO_PRELOAD_ENV_SUPPORT is not set
|
||||
# LDSO_PRELOAD_FILE_SUPPORT is not set
|
||||
LDSO_BASE_FILENAME="ld.so"
|
||||
# LDSO_STANDALONE_SUPPORT is not set
|
||||
# LDSO_PRELINK_SUPPORT is not set
|
||||
# UCLIBC_STATIC_LDCONFIG is not set
|
||||
LDSO_RUNPATH=y
|
||||
LDSO_RUNPATH_OF_EXECUTABLE=y
|
||||
LDSO_SAFE_RUNPATH=y
|
||||
LDSO_SEARCH_INTERP_PATH=y
|
||||
LDSO_LD_LIBRARY_PATH=y
|
||||
LDSO_NO_CLEANUP=y
|
||||
UCLIBC_CTOR_DTOR=y
|
||||
# LDSO_GNU_HASH_SUPPORT is not set
|
||||
# HAS_NO_THREADS is not set
|
||||
UCLIBC_HAS_THREADS_NATIVE=y
|
||||
UCLIBC_HAS_THREADS=y
|
||||
UCLIBC_HAS_TLS=y
|
||||
PTHREADS_DEBUG_SUPPORT=y
|
||||
UCLIBC_HAS_SYSLOG=y
|
||||
UCLIBC_HAS_LFS=y
|
||||
MALLOC=y
|
||||
# MALLOC_SIMPLE is not set
|
||||
# MALLOC_STANDARD is not set
|
||||
MALLOC_GLIBC_COMPAT=y
|
||||
# UCLIBC_HAS_OBSTACK is not set
|
||||
UCLIBC_DYNAMIC_ATEXIT=y
|
||||
COMPAT_ATEXIT=y
|
||||
UCLIBC_HAS_UTMPX=y
|
||||
UCLIBC_HAS_UTMP=y
|
||||
UCLIBC_SUSV2_LEGACY=y
|
||||
UCLIBC_SUSV3_LEGACY=y
|
||||
UCLIBC_HAS_CONTEXT_FUNCS=y
|
||||
# UCLIBC_SUSV3_LEGACY_MACROS is not set
|
||||
UCLIBC_SUSV4_LEGACY=y
|
||||
# UCLIBC_STRICT_HEADERS is not set
|
||||
# UCLIBC_HAS_STUBS is not set
|
||||
UCLIBC_HAS_SHADOW=y
|
||||
UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
|
||||
UCLIBC_HAS___PROGNAME=y
|
||||
UCLIBC_HAS_PTY=y
|
||||
ASSUME_DEVPTS=y
|
||||
UNIX98PTY_ONLY=y
|
||||
UCLIBC_HAS_GETPT=y
|
||||
UCLIBC_HAS_LIBUTIL=y
|
||||
UCLIBC_HAS_TM_EXTENSIONS=y
|
||||
UCLIBC_HAS_TZ_CACHING=y
|
||||
UCLIBC_HAS_TZ_FILE=y
|
||||
UCLIBC_HAS_TZ_FILE_READ_MANY=y
|
||||
UCLIBC_TZ_FILE_PATH="/etc/TZ"
|
||||
UCLIBC_FALLBACK_TO_ETC_LOCALTIME=y
|
||||
|
||||
#
|
||||
# Advanced Library Settings
|
||||
#
|
||||
UCLIBC_PWD_BUFFER_SIZE=256
|
||||
UCLIBC_GRP_BUFFER_SIZE=256
|
||||
|
||||
#
|
||||
# Support various families of functions
|
||||
#
|
||||
UCLIBC_LINUX_MODULE_26=y
|
||||
# UCLIBC_LINUX_MODULE_24 is not set
|
||||
UCLIBC_LINUX_SPECIFIC=y
|
||||
UCLIBC_HAS_GNU_ERROR=y
|
||||
UCLIBC_BSD_SPECIFIC=y
|
||||
UCLIBC_HAS_BSD_ERR=y
|
||||
UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
|
||||
# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set
|
||||
# UCLIBC_NTP_LEGACY is not set
|
||||
UCLIBC_SV4_DEPRECATED=y
|
||||
UCLIBC_HAS_REALTIME=y
|
||||
UCLIBC_HAS_ADVANCED_REALTIME=y
|
||||
UCLIBC_HAS_EPOLL=y
|
||||
UCLIBC_HAS_XATTR=y
|
||||
# UCLIBC_HAS_PROFILING is not set
|
||||
UCLIBC_HAS_CRYPT_IMPL=y
|
||||
UCLIBC_HAS_SHA256_CRYPT_IMPL=y
|
||||
# UCLIBC_HAS_SHA512_CRYPT_IMPL is not set
|
||||
UCLIBC_HAS_CRYPT=y
|
||||
UCLIBC_HAS_NETWORK_SUPPORT=y
|
||||
UCLIBC_HAS_SOCKET=y
|
||||
UCLIBC_HAS_IPV4=y
|
||||
UCLIBC_HAS_IPV6=y
|
||||
# UCLIBC_HAS_RPC is not set
|
||||
UCLIBC_USE_NETLINK=y
|
||||
UCLIBC_SUPPORT_AI_ADDRCONFIG=y
|
||||
UCLIBC_HAS_BSD_RES_CLOSE=y
|
||||
UCLIBC_HAS_COMPAT_RES_STATE=y
|
||||
# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set
|
||||
UCLIBC_HAS_RESOLVER_SUPPORT=y
|
||||
UCLIBC_HAS_LIBRESOLV_STUB=y
|
||||
UCLIBC_HAS_LIBNSL_STUB=y
|
||||
|
||||
#
|
||||
# String and Stdio Support
|
||||
#
|
||||
UCLIBC_HAS_STRING_GENERIC_OPT=y
|
||||
UCLIBC_HAS_STRING_ARCH_OPT=y
|
||||
UCLIBC_HAS_STDIO_FUTEXES=y
|
||||
UCLIBC_HAS_CTYPE_TABLES=y
|
||||
UCLIBC_HAS_CTYPE_SIGNED=y
|
||||
# UCLIBC_HAS_CTYPE_UNSAFE is not set
|
||||
UCLIBC_HAS_CTYPE_CHECKED=y
|
||||
# UCLIBC_HAS_CTYPE_ENFORCED is not set
|
||||
UCLIBC_HAS_WCHAR=y
|
||||
# UCLIBC_HAS_LOCALE is not set
|
||||
UCLIBC_HAS_HEXADECIMAL_FLOATS=y
|
||||
UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
|
||||
UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
|
||||
# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
|
||||
# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
|
||||
# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
|
||||
# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
|
||||
UCLIBC_HAS_STDIO_BUFSIZ_4096=y
|
||||
# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
|
||||
UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
|
||||
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
|
||||
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
|
||||
# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
|
||||
UCLIBC_HAS_STDIO_GETC_MACRO=y
|
||||
UCLIBC_HAS_STDIO_PUTC_MACRO=y
|
||||
UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
|
||||
# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
|
||||
UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
|
||||
# UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set
|
||||
UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
|
||||
UCLIBC_HAS_PRINTF_M_SPEC=y
|
||||
UCLIBC_HAS_ERRNO_MESSAGES=y
|
||||
# UCLIBC_HAS_SYS_ERRLIST is not set
|
||||
UCLIBC_HAS_SIGNUM_MESSAGES=y
|
||||
# UCLIBC_HAS_SYS_SIGLIST is not set
|
||||
UCLIBC_HAS_GNU_GETOPT=y
|
||||
UCLIBC_HAS_GETOPT_LONG=y
|
||||
UCLIBC_HAS_GNU_GETSUBOPT=y
|
||||
UCLIBC_HAS_ARGP=y
|
||||
|
||||
#
|
||||
# Big and Tall
|
||||
#
|
||||
UCLIBC_HAS_REGEX=y
|
||||
# UCLIBC_HAS_REGEX_OLD is not set
|
||||
UCLIBC_HAS_FNMATCH=y
|
||||
# UCLIBC_HAS_FNMATCH_OLD is not set
|
||||
UCLIBC_HAS_WORDEXP=y
|
||||
UCLIBC_HAS_NFTW=y
|
||||
UCLIBC_HAS_FTW=y
|
||||
UCLIBC_HAS_FTS=y
|
||||
UCLIBC_HAS_GLOB=y
|
||||
UCLIBC_HAS_GNU_GLOB=y
|
||||
|
||||
#
|
||||
# Library Installation Options
|
||||
#
|
||||
RUNTIME_PREFIX="/"
|
||||
DEVEL_PREFIX="/usr/"
|
||||
MULTILIB_DIR="lib"
|
||||
HARDWIRED_ABSPATH=y
|
||||
|
||||
#
|
||||
# Security options
|
||||
#
|
||||
# UCLIBC_BUILD_PIE is not set
|
||||
UCLIBC_HAS_ARC4RANDOM=y
|
||||
# ARC4RANDOM_USES_NODEV is not set
|
||||
# UCLIBC_HAS_SSP is not set
|
||||
UCLIBC_BUILD_RELRO=y
|
||||
UCLIBC_BUILD_NOW=y
|
||||
UCLIBC_BUILD_NOEXECSTACK=y
|
||||
|
||||
#
|
||||
# Development/debugging options
|
||||
#
|
||||
CROSS_COMPILER_PREFIX=""
|
||||
UCLIBC_EXTRA_CFLAGS=""
|
||||
# DODEBUG is not set
|
||||
# DOSTRIP is not set
|
||||
# DOASSERTS is not set
|
||||
# SUPPORT_LD_DEBUG is not set
|
||||
# SUPPORT_LD_DEBUG_EARLY is not set
|
||||
# UCLIBC_MALLOC_DEBUGGING is not set
|
||||
# UCLIBC_HAS_BACKTRACE is not set
|
||||
WARNINGS="-Wall"
|
||||
# EXTRA_WARNINGS is not set
|
||||
# DOMULTI is not set
|
BIN
floppy144.vfd
BIN
floppy144.vfd
Binary file not shown.
26
kms.c
26
kms.c
@ -51,6 +51,7 @@ const KmsIdList ProductList[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef IS_LIBRARY
|
||||
// Application ID is used by KMS server to count KeyManagementServiceCurrentCount
|
||||
// Do not change the order of this list. Append items as necessary
|
||||
const KmsIdList AppList[] = {
|
||||
@ -59,6 +60,7 @@ const KmsIdList AppList[] = {
|
||||
/* 002 */ { { 0x0FF1CE15, 0xA989, 0x479D, { 0xaf, 0x46, 0xf2, 0x75, 0xc6, 0x37, 0x06, 0x63 } } /*"0FF1CE15-A989-479D-AF46-F275C6370663"*/, FRIENDLY_NAME_OFFICE2013, EPID_OFFICE2013, 0, 0},
|
||||
/* 003 */ { { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, NULL, NULL, 0, 0 }
|
||||
};
|
||||
#endif // IS_LIBRARY
|
||||
|
||||
#ifndef NO_EXTENDED_PRODUCT_LIST
|
||||
const KmsIdList ExtendedProductList [] = {
|
||||
@ -258,7 +260,7 @@ static const struct KMSHostOS { uint16_t Type; uint16_t Build; } HostOS[] =
|
||||
{ 55041, 7601 }, // Windows Server 2008 R2 SP1
|
||||
{ 5426, 9200 }, // Windows Server 2012
|
||||
{ 6401, 9600 }, // Windows Server 2012 R2
|
||||
{ 3612, 10240}, // Windows Server 2016
|
||||
//{ 3612, 10240}, // Windows Server 2016
|
||||
};
|
||||
|
||||
// GroupID and PIDRange
|
||||
@ -377,9 +379,10 @@ static int getRandomServerType()
|
||||
# ifndef USE_MSRPC
|
||||
else
|
||||
{
|
||||
// return 9200/9600/10240 if NDR64 is in use, otherwise 6002/7601
|
||||
if (UseRpcNDR64) return (rand() % 3) + 2;
|
||||
return (rand() % 2);
|
||||
// return 9200/9600 if NDR64 is in use, otherwise 6002/7601
|
||||
return (rand() % 2) + (UseRpcNDR64 ? 2 : 0);
|
||||
// if (UseRpcNDR64) return (rand() % 3) + 2;
|
||||
// return (rand() % 2);
|
||||
}
|
||||
# endif // USE_MSRPC
|
||||
}
|
||||
@ -424,12 +427,12 @@ static void generateRandomPid(const int index, char *const szPid, int serverType
|
||||
strcat(szPid, itoc(numberBuffer, HostOS[serverType].Build, 0));
|
||||
strcat(szPid, ".0000-");
|
||||
|
||||
# define minTime ((time_t)1436958000) // Release Date Windows 10 RTM Escrow
|
||||
# define minTime ((time_t)1382029200) // Release Date Win 2012R2
|
||||
|
||||
time_t maxTime, kmsTime;
|
||||
time(&maxTime);
|
||||
|
||||
if (maxTime < minTime) // Just in case the system time is < 07/15/2015 1:00 pm
|
||||
if (maxTime < (time_t)BUILD_TIME) // Just in case the system time is < 10/17/2013 1:00 pm
|
||||
maxTime = (time_t)BUILD_TIME;
|
||||
|
||||
kmsTime = (rand32() % (maxTime - minTime)) + minTime;
|
||||
@ -519,6 +522,7 @@ static void logRequest(const REQUEST *const baseRequest)
|
||||
/*
|
||||
* Converts a utf-8 ePID string to UCS-2 and writes it to a RESPONSE struct
|
||||
*/
|
||||
#ifndef IS_LIBRARY
|
||||
static void getEpidFromString(RESPONSE *const Response, const char *const pid)
|
||||
{
|
||||
size_t length = utf8_to_ucs2(Response->KmsPID, pid, PID_BUFFER_SIZE, PID_BUFFER_SIZE * 3);
|
||||
@ -567,6 +571,7 @@ static void getEpid(RESPONSE *const baseResponse, const char** EpidSource, const
|
||||
}
|
||||
getEpidFromString(baseResponse, pid);
|
||||
}
|
||||
#endif // IS_LIBRARY
|
||||
|
||||
|
||||
#if !defined(NO_LOG) && defined(_PEDANTIC)
|
||||
@ -627,6 +632,7 @@ static void logResponse(const RESPONSE *const baseResponse, const BYTE *const hw
|
||||
/*
|
||||
* Creates the unencrypted base response
|
||||
*/
|
||||
#ifndef IS_LIBRARY
|
||||
static BOOL __stdcall CreateResponseBaseCallback(const REQUEST *const baseRequest, RESPONSE *const baseResponse, BYTE *const hwId, const char* const ipstr)
|
||||
{
|
||||
const char* EpidSource;
|
||||
@ -663,6 +669,13 @@ static BOOL __stdcall CreateResponseBaseCallback(const REQUEST *const baseReques
|
||||
|
||||
RequestCallback_t CreateResponseBase = &CreateResponseBaseCallback;
|
||||
|
||||
#else // IS_LIBRARY
|
||||
|
||||
RequestCallback_t CreateResponseBase = NULL;
|
||||
|
||||
#endif // IS_LIBRARY
|
||||
|
||||
|
||||
////TODO: Move to helpers.c
|
||||
void get16RandomBytes(void* ptr)
|
||||
{
|
||||
@ -670,7 +683,6 @@ void get16RandomBytes(void* ptr)
|
||||
for (i = 0; i < 4; i++) ((DWORD*)ptr)[i] = rand32();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Creates v4 response
|
||||
*/
|
||||
|
@ -29,7 +29,14 @@ __stdcall BOOL KmsCallBack(const REQUEST *const baseRequest, RESPONSE *const bas
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
printf("libvlmcs-test.c: Program start\n");
|
||||
int version = GetLibKmsVersion();
|
||||
|
||||
if (version < 0x30001)
|
||||
{
|
||||
fprintf(stderr, "KMS library version %u.%u or greater required\n", (unsigned int)(version >> 16), (unsigned int)(version & 0xffff));
|
||||
}
|
||||
|
||||
printf("%s: Program start\n", GetEmulatorVersion());
|
||||
StartKmsServer(1688, KmsCallBack);
|
||||
return 0;
|
||||
}
|
||||
|
54
libkms.c
54
libkms.c
@ -7,9 +7,13 @@
|
||||
#endif // CONFIG
|
||||
#include CONFIG
|
||||
|
||||
#ifdef EXTERNAL
|
||||
#undef EXTERNAL
|
||||
#endif
|
||||
|
||||
#define EXTERNAL dllexport
|
||||
|
||||
#define DLLVERSION 0x30000
|
||||
#define DLLVERSION 0x30001
|
||||
|
||||
#include "libkms.h"
|
||||
#include "shared_globals.h"
|
||||
@ -24,6 +28,10 @@
|
||||
#include <netinet/in.h>
|
||||
#endif // WIN32
|
||||
|
||||
#ifdef IS_LIBRARY
|
||||
char ErrorMessage[MESSAGE_BUFFER_SIZE];
|
||||
#endif // IS_LIBRARY
|
||||
|
||||
static int_fast8_t IsServerStarted = FALSE;
|
||||
|
||||
|
||||
@ -42,6 +50,7 @@ EXTERNC __declspec(EXTERNAL) DWORD __cdecl SendActivationRequest
|
||||
|
||||
EXTERNC __declspec(EXTERNAL) DWORD __cdecl StartKmsServer(const int port, RequestCallback_t requestCallback)
|
||||
{
|
||||
#ifndef SIMPLE_SOCKETS
|
||||
char listenAddress[64];
|
||||
|
||||
if (IsServerStarted) return !0;
|
||||
@ -97,6 +106,39 @@ EXTERNC __declspec(EXTERNAL) DWORD __cdecl StartKmsServer(const int port, Reques
|
||||
|
||||
IsServerStarted = FALSE;
|
||||
return 0;
|
||||
|
||||
# else // SIMPLE_SOCKETS
|
||||
|
||||
if (IsServerStarted) return !0;
|
||||
int error;
|
||||
|
||||
# ifdef _WIN32
|
||||
# ifndef USE_MSRPC
|
||||
// Windows Sockets must be initialized
|
||||
WSADATA wsadata;
|
||||
|
||||
if ((error = WSAStartup(0x0202, &wsadata)))
|
||||
{
|
||||
return error;
|
||||
}
|
||||
# endif // USE_MSRPC
|
||||
# endif // _WIN32
|
||||
|
||||
defaultport = vlmcsd_malloc(16);
|
||||
snprintf((char*)defaultport, (size_t)16, "%i", port);
|
||||
|
||||
CreateResponseBase = requestCallback;
|
||||
error = listenOnAllAddresses();
|
||||
if (error) return error;
|
||||
|
||||
IsServerStarted = TRUE;
|
||||
runServer();
|
||||
IsServerStarted = FALSE;
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
# endif // SIMPLE_SOCKETS
|
||||
}
|
||||
|
||||
|
||||
@ -105,7 +147,11 @@ EXTERNC __declspec(EXTERNAL) DWORD __cdecl StopKmsServer()
|
||||
if (!IsServerStarted) return !0;
|
||||
|
||||
closeAllListeningSockets();
|
||||
|
||||
# ifndef SIMPLE_SOCKETS
|
||||
if (SocketList) free(SocketList);
|
||||
# endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -115,3 +161,9 @@ EXTERNC __declspec(EXTERNAL) int __cdecl GetLibKmsVersion()
|
||||
return DLLVERSION;
|
||||
}
|
||||
|
||||
|
||||
EXTERNC __declspec(EXTERNAL) const char* const __cdecl GetEmulatorVersion()
|
||||
{
|
||||
return VERSION;
|
||||
}
|
||||
|
||||
|
11
libkms.h
11
libkms.h
@ -9,24 +9,19 @@
|
||||
#include "kms.h"
|
||||
#include "rpc.h"
|
||||
|
||||
#ifndef EXTERNC
|
||||
#ifdef __cplusplus
|
||||
#define EXTERNC extern "C"
|
||||
#define EXTERNC EXTERN "C"
|
||||
#else
|
||||
#define EXTERNC
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && !__CYGWIN__
|
||||
#define __declspec(x) __attribute__((__visibility__("default")))
|
||||
#endif
|
||||
|
||||
#if !defined(EXTERNAL)
|
||||
#define EXTERNAL dllimport
|
||||
#endif
|
||||
|
||||
EXTERNC __declspec(EXTERNAL) DWORD __cdecl SendActivationRequest(const char* const hostname, const int port, RESPONSE* baseResponse, const REQUEST* const baseRequest, RESPONSE_RESULT* result, BYTE *hwid);
|
||||
EXTERNC __declspec(EXTERNAL) DWORD __cdecl StartKmsServer(const int port, RequestCallback_t requestCallback);
|
||||
EXTERNC __declspec(EXTERNAL) DWORD __cdecl StopKmsServer();
|
||||
EXTERNC __declspec(EXTERNAL) int __cdecl GetLibKmsVersion();
|
||||
EXTERNC __declspec(EXTERNAL) const char* const __cdecl GetEmulatorVersion();
|
||||
//EXTERN_C __declspec(EXTERNAL) unsigned int __cdecl GetRandom32();
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
export VERBOSE=3
|
||||
export DNS_PARSER=OS
|
||||
|
||||
rm -f vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm -f vlmcsd-Dragon* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
|
||||
|
||||
MAKEFLAGS="-B -j12"
|
||||
@ -14,10 +14,9 @@ CF45="-static-libgcc -pipe -fno-common -fno-exceptions -fno-stack-protector -fno
|
||||
CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
||||
LF="-Wl,-z,norelro -Wl,--hash-style=sysv -Wl,--build-id=none"
|
||||
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=sysv"
|
||||
export CC=gcc5
|
||||
|
||||
gmake $MAKEFLAGS PROGRAM_NAME=vlmcsd-DragonFly-x64 CLIENT_NAME=vlmcs-DragonFly-x64 CFLAGS="$CF" LDFLAGS="$LF"
|
||||
rm vlmcsd.o vlmcs.o
|
||||
gmake vlmcsdmulti-DragonFly-x64 $REUSEOBJFLAGS CFLAGS="$CF" LDFLAGS="$LF" MULTI_NAME=vlmcsdmulti-DragonFly-x64
|
||||
gmake $MAKEFLAGS MULTI_NAME=vlmcsdmulti-DragonFly-x64 PROGRAM_NAME=vlmcsd-DragonFly-x64 CLIENT_NAME=vlmcs-DragonFly-x64 CFLAGS="$CF" LDFLAGS="$LF" allmulti
|
||||
|
||||
rm *.o
|
||||
|
||||
@ -28,4 +27,4 @@ cp -af vlmcsd-DragonFly-x64 /usr/local/sbin/vlmcsd
|
||||
cp -af vlmcs-DragonFly-x64 /usr/local/bin/vlmcs
|
||||
|
||||
# Copy everything to distribution server
|
||||
scp -p vlmcsdmulti-* vlmcsd-* vlmcs-* root@ubuntu64:x/binaries/DragonFly/intel/
|
||||
scp -p vlmcsdmulti-* vlmcsd-Dragon* vlmcs-* root@ubuntu64:x/binaries/DragonFly/intel/
|
||||
|
37
make_freebsd
37
make_freebsd
@ -3,7 +3,7 @@
|
||||
export VERBOSE=3
|
||||
export DNS_PARSER=OS
|
||||
|
||||
rm -f vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm -f vlmcsd-Free* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
|
||||
|
||||
MAKEFLAGS="-B -j12"
|
||||
@ -14,33 +14,24 @@ CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tabl
|
||||
LF="-Wl,-z,norelro -Wl,--hash-style=gnu -Wl,--build-id=none"
|
||||
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=gnu"
|
||||
|
||||
gmake $MAKEFLAGS allmulti CAT=2 MULTI_NAME=vlmcsdmulti-FreeBSD-10.2-x64-gcc CLIENT_NAME=vlmcs-FreeBSD-10.2-x64-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x64-gcc CC=gcc5 CFLAGS="$CF" LDFLAGS="$LF"
|
||||
|
||||
gmake $MAKEFLAGS CLIENT_NAME=vlmcs-FreeBSD-10.2-x64 PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x64 CC=clang36 CFLAGS="$CFCLANG" LDFLAGS="$LF"
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.*
|
||||
gmake $REUSEOBJFLAGS vlmcsdmulti-FreeBSD-10.2-x64 MULTI_NAME=vlmcsdmulti-FreeBSD-10.2-x64 CC=clang36 CFLAGS="$CFCLANG" LDFLAGS="$LF"
|
||||
|
||||
gmake $MAKEFLAGS CLIENT_NAME=vlmcs-FreeBSD-10.2-x86 PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x86 CC=clang36 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.*
|
||||
gmake $REUSEOBJFLAGS vlmcsdmulti-FreeBSD-10.2-x86 MULTI_NAME=vlmcsdmulti-FreeBSD-10.2-x86 CC=clang36 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
|
||||
|
||||
gmake $MAKEFLAGS allmulti CAT=2 MULTI_NAME=vlmcsdmulti-FreeBSD-10.2-x86-gcc CLIENT_NAME=vlmcs-FreeBSD-10.2-x86-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x86-gcc CC=gcc5 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-L/usr/lib32 -B/usr/lib32 $LF"
|
||||
|
||||
gmake $MAKEFLAGS CAT=2 vlmcsd-FreeBSD-10.2-x64-threads-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x64-threads-gcc THREADS=1 CC=gcc5 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
|
||||
gmake $MAKEFLAGS vlmcsd-FreeBSD-10.2-x64-threads PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x64-threads THREADS=1 CC=clang36 CFLAGS="$CFCLANG" LDFLAGS="-lpthread $LF"
|
||||
gmake $MAKEFLAGS vlmcsd-FreeBSD-10.2-x86-threads PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x86-threads THREADS=1 CC=clang36 CFLAGS="$CFCLANG -m32" LDFLAGS="-lpthread $LF"
|
||||
gmake $MAKEFLAGS CAT=2 vlmcsd-FreeBSD-10.2-x86-threads-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x86-threads-gcc THREADS=1 CC=gcc5 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-lpthread -L/usr/lib32 -B/usr/lib32 $LF"
|
||||
|
||||
gmake $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=vlmcs-FreeBSD-10.2-x64-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x64-openssl1.0.1-EXPERIMENTAL CC=clang36 CFLAGS="$CFCLANG" LDFLAGS="$LF"
|
||||
gmake $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=vlmcs-FreeBSD-10.2-x86-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x86-openssl1.0.1-EXPERIMENTAL CC=clang36 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
|
||||
gmake $MAKEFLAGS allmulti CAT=2 MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x64-gcc CLIENT_NAME=vlmcs-FreeBSD-10.3-x64-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-gcc CC=gcc5 CFLAGS="$CF" LDFLAGS="$LF"
|
||||
gmake $MAKEFLAGS MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x64 CLIENT_NAME=vlmcs-FreeBSD-10.3-x64 PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64 CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="$LF" allmulti
|
||||
gmake $MAKEFLAGS MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x86 CLIENT_NAME=vlmcs-FreeBSD-10.3-x86 PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86 CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
|
||||
gmake $MAKEFLAGS allmulti CAT=2 MULTI_NAME=vlmcsdmulti-FreeBSD-10.3-x86-gcc CLIENT_NAME=vlmcs-FreeBSD-10.3-x86-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-gcc CC=gcc5 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-L/usr/lib32 -B/usr/lib32 $LF"
|
||||
gmake $MAKEFLAGS CAT=2 vlmcsd-FreeBSD-10.3-x64-threads-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-threads-gcc THREADS=1 CC=gcc5 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
|
||||
gmake $MAKEFLAGS vlmcsd-FreeBSD-10.3-x64-threads PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-threads THREADS=1 CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="-lpthread $LF"
|
||||
gmake $MAKEFLAGS vlmcsd-FreeBSD-10.3-x86-threads PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-threads THREADS=1 CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="-lpthread $LF"
|
||||
gmake $MAKEFLAGS CAT=2 vlmcsd-FreeBSD-10.3-x86-threads-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-threads-gcc THREADS=1 CC=gcc5 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-lpthread -L/usr/lib32 -B/usr/lib32 $LF"
|
||||
gmake $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=vlmcs-FreeBSD-10.3-x64-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x64-openssl1.0.1-EXPERIMENTAL CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="$LF"
|
||||
gmake $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=vlmcs-FreeBSD-10.3-x86-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=vlmcsd-FreeBSD-10.3-x86-openssl1.0.1-EXPERIMENTAL CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
|
||||
|
||||
rm *.o
|
||||
|
||||
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
|
||||
sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
|
||||
|
||||
sudo cp -af vlmcsd-FreeBSD-10.2-x86-gcc /usr/local/sbin/vlmcsd
|
||||
sudo cp -af vlmcs-FreeBSD-10.2-x86-gcc /usr/local/bin/vlmcs
|
||||
sudo cp -af vlmcsd-FreeBSD-10.3-x86-gcc /usr/local/sbin/vlmcsd
|
||||
sudo cp -af vlmcs-FreeBSD-10.3-x86-gcc /usr/local/bin/vlmcs
|
||||
|
||||
# Copy everything to distribution server
|
||||
scp -p vlmcsdmulti-* vlmcsd-* vlmcs-* root@ubuntu64:x/binaries/FreeBSD/intel/
|
||||
scp -p vlmcsdmulti-* vlmcsd-Free* vlmcs-* root@ubuntu64:x/binaries/FreeBSD/intel/
|
||||
|
37
make_hurd
Executable file
37
make_hurd
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
export VERBOSE=3
|
||||
export DNS_PARSER=OS
|
||||
|
||||
rm -f vlmcsd-hurd* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
|
||||
|
||||
MAKEFLAGS="-B -j1"
|
||||
|
||||
export CC=gcc
|
||||
CF="-flto=jobserver -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
||||
LF="-fuse-ld=gold -lresolv -Wl,-z,norelro,--hash-style=gnu,--build-id=none"
|
||||
|
||||
make $MAKEFLAGS MULTI_NAME=vlmcsdmulti-hurd-x86-glibc vlmcsdmulti-hurd-x86-glibc PROGRAM_NAME=vlmcsd-hurd-x86-glibc CLIENT_NAME=vlmcs-hurd-x86-glibc CFLAGS="$CF" LDFLAGS="$LF" allmulti
|
||||
|
||||
make clean
|
||||
|
||||
sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
|
||||
|
||||
cp -af vlmcsd-hurd-x86-glibc /usr/local/sbin/vlmcsd
|
||||
cp -af vlmcs-hurd-x86-glibc /usr/local/bin/vlmcs
|
||||
|
||||
# Copy man pages
|
||||
mkdir -p /usr/local/man/man1 2>/dev/null
|
||||
mkdir -p /usr/local/man/man5 2>/dev/null
|
||||
mkdir -p /usr/local/man/man8 2>/dev/null
|
||||
mkdir -p /usr/local/man/man7 2>/dev/null
|
||||
cp -af vlmcs.1 vlmcsdmulti.1 /usr/local/man/man1/
|
||||
cp -af vlmcsd.7 /usr/local/man/man7/
|
||||
cp -af vlmcsd.8 /usr/local/man/man8/
|
||||
cp -af vlmcsd.ini.5 /usr/local/man/man5/
|
||||
bzip2 -f -9 /usr/local/man/man5/vlmcsd.ini.5 /usr/local/man/man1/vlmcs.1 /usr/local/man/man1/vlmcsdmulti.1 /usr/local/man/man7/vlmcsd.7 /usr/local/man/man8/vlmcsd.8
|
||||
|
||||
# Copy everything to distribution server
|
||||
scp -p vlmcsdmulti-* vlmcsd-hurd* vlmcs-* root@ubuntu64.internal:x/binaries/Hurd/intel/
|
||||
|
45
make_kfreebsd
Executable file
45
make_kfreebsd
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
export VERBOSE=3
|
||||
export DNS_PARSER=OS
|
||||
|
||||
rm -f vlmcsd-Free* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
|
||||
|
||||
MAKEFLAGS="-B -j`nproc`"
|
||||
|
||||
export CC=gcc
|
||||
CF="-flto=jobserver -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
||||
LF="-lresolv -Wl,-z,norelro,--hash-style=gnu,--build-id=none"
|
||||
|
||||
export PROGRAM_NAME=vlmcsd-FreeBSD-10.1-x64-glibc
|
||||
export CLIENT_NAME=vlmcs-FreeBSD-10.1-x64-glibc
|
||||
export MULTI_NAME=vlmcsdmulti-FreeBSD-10.1-x64-glibc
|
||||
|
||||
make $MAKEFLAGS CFLAGS="$CF -m64" LDFLAGS="$LF" CAT=2 allmulti
|
||||
|
||||
export PROGRAM_NAME=vlmcsd-FreeBSD-10.1-x86-glibc
|
||||
export CLIENT_NAME=vlmcs-FreeBSD-10.1-x86-glibc
|
||||
export MULTI_NAME=vlmcsdmulti-FreeBSD-10.1-x86-glibc
|
||||
|
||||
make $MAKEFLAGS CFLAGS="$CF -m32" LDFLAGS="$LF" CAT=2 allmulti
|
||||
|
||||
sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
|
||||
|
||||
cp -af $PROGRAM_NAME /usr/local/sbin/vlmcsd
|
||||
cp -af $CLIENT_NAME /usr/local/bin/vlmcs
|
||||
|
||||
# Copy man pages
|
||||
mkdir -p /usr/local/man/man1 2>/dev/null
|
||||
mkdir -p /usr/local/man/man5 2>/dev/null
|
||||
mkdir -p /usr/local/man/man8 2>/dev/null
|
||||
mkdir -p /usr/local/man/man7 2>/dev/null
|
||||
cp -af vlmcs.1 vlmcsdmulti.1 /usr/local/man/man1/
|
||||
cp -af vlmcsd.7 /usr/local/man/man7/
|
||||
cp -af vlmcsd.8 /usr/local/man/man8/
|
||||
cp -af vlmcsd.ini.5 /usr/local/man/man5/
|
||||
bzip2 -f -9 /usr/local/man/man5/vlmcsd.ini.5 /usr/local/man/man1/vlmcs.1 /usr/local/man/man1/vlmcsdmulti.1 /usr/local/man/man7/vlmcsd.7 /usr/local/man/man8/vlmcsd.8
|
||||
|
||||
# Copy everything to distribution server
|
||||
scp -p vlmcsdmulti-* vlmcsd-Free* vlmcs-* root@ubuntu64.internal:x/binaries/FreeBSD/intel/
|
||||
|
1097
make_linux
1097
make_linux
File diff suppressed because it is too large
Load Diff
@ -1,50 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
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"
|
||||
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m31 -mesa -mpacked-stack -msmall-exec"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
export THREADS=0
|
||||
export FEATURES=full
|
||||
|
||||
export MULTI_NAME=vlmcsdmulti-s390-glibc
|
||||
export CLIENT_NAME=vlmcs-s390-glibc
|
||||
export PROGRAM_NAME=vlmcsd-s390-glibc
|
||||
|
||||
make -B -j`nproc` $CLIENT_NAME $PROGRAM_NAME
|
||||
|
||||
rm -f vlmcsd.o vlmcs.o vlmcsdmulti.o
|
||||
make -j`nproc` $MULTI_NAME
|
||||
|
||||
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
|
||||
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mzarch -mpacked-stack -msmall-exec"
|
||||
export MULTI_NAME=vlmcsdmulti-s390x-glibc
|
||||
export CLIENT_NAME=vlmcs-s390x-glibc
|
||||
export PROGRAM_NAME=vlmcsd-s390x-glibc
|
||||
|
||||
make -B -j`nproc` $CLIENT_NAME $PROGRAM_NAME
|
||||
|
||||
rm -f vlmcsd.o vlmcs.o vlmcsdmulti.o
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mzarch -mpacked-stack -msmall-exec"
|
||||
make -j`nproc` $MULTI_NAME
|
||||
|
||||
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
|
||||
|
||||
cp -af vlmcsd-s390-glibc /usr/local/sbin/vlmcsd
|
||||
cp -af vlmcs-s390-glibc /usr/local/bin/vlmcs
|
||||
|
||||
mkdir -p /usr/local/man/man1 2>/dev/null
|
||||
mkdir -p /usr/local/man/man5 2>/dev/null
|
||||
mkdir -p /usr/local/man/man8 2>/dev/null
|
||||
mkdir -p /usr/local/man/man7 2>/dev/null
|
||||
cp -a vlmcs.1 vlmcsdmulti.1 /usr/local/man/man1/
|
||||
cp -a vlmcsd.7 /usr/local/man/man7/
|
||||
cp -a vlmcsd.8 /usr/local/man/man8/
|
||||
cp -a vlmcsd.ini.5 /usr/local/man/man5/
|
||||
pbzip2 -f -9 /usr/local/man/man5/vlmcsd.ini.5 /usr/local/man/man1/vlmcs.1 /usr/local/man/man1/vlmcsdmulti.1 /usr/local/man/man7/vlmcsd.7 /usr/local/man/man8/vlmcsd.8
|
||||
|
||||
scp -p vlmcsdmulti-s390-glibc vlmcs-s390-glibc vlmcsd-s390-glibc vlmcsdmulti-s390x-glibc vlmcs-s390x-glibc vlmcsd-s390x-glibc ubuntu64.internal:x/binaries/Linux/s390/glibc
|
@ -16,9 +16,7 @@ export CLIENT_NAME=vlmcs$SUFFIX
|
||||
export MULTI_NAME=vlmcsdmulti$SUFFIX
|
||||
|
||||
gmake clean
|
||||
gmake -B
|
||||
rm -f vlmcsd.o vlmcs.o vlmcsdmulti.o
|
||||
gmake $MULTI_NAME
|
||||
gmake -B allmulti
|
||||
|
||||
strip -s --strip-unneeded --remove-section .eh_frame_hdr --remove-section .eh_frame --remove-section .ident --remove-section .note.minix.ident --remove-section .note.netbsd.pax --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag *$SUFFIX
|
||||
|
||||
|
121
make_multilib_linux
Executable file
121
make_multilib_linux
Executable file
@ -0,0 +1,121 @@
|
||||
#!/bin/bash
|
||||
|
||||
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"
|
||||
|
||||
rm -f vlmcsd vlmcs vlmcsdmulti vlmcsd-s390* vlmcsd-sparc64* vlmcsd-mips64* vlmcs-* vlmcsdmulti-*
|
||||
|
||||
## IBM S/390
|
||||
|
||||
export CFLAGS="$SMALLCC"
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m31 -mesa -mpacked-stack -msmall-exec"
|
||||
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
|
||||
export THREADS=0
|
||||
export FEATURES=full
|
||||
export CC=s390x-linux-gnu-gcc
|
||||
export VERBOSE=3
|
||||
|
||||
export MULTI_NAME=vlmcsdmulti-s390-glibc
|
||||
export CLIENT_NAME=vlmcs-s390-glibc
|
||||
export PROGRAM_NAME=vlmcsd-s390-glibc
|
||||
|
||||
make -B -j`nproc` allmulti
|
||||
|
||||
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
|
||||
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mzarch -mpacked-stack -msmall-exec"
|
||||
export MULTI_NAME=vlmcsdmulti-s390x-glibc
|
||||
export CLIENT_NAME=vlmcs-s390x-glibc
|
||||
export PROGRAM_NAME=vlmcsd-s390x-glibc
|
||||
|
||||
make -B -j`nproc` allmulti
|
||||
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
|
||||
|
||||
|
||||
|
||||
## SPARC64
|
||||
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mcpu=v7"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export CC=sparc64-linux-gnu-gcc
|
||||
|
||||
export MULTI_NAME=vlmcsdmulti-sparc64v9-glibc
|
||||
export CLIENT_NAME=vlmcs-sparc64v9-glibc
|
||||
export PROGRAM_NAME=vlmcsd-sparc64v9-glibc
|
||||
|
||||
make -B -j`nproc` allmulti
|
||||
|
||||
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
|
||||
|
||||
|
||||
|
||||
## MIPS64 BIG-ENDIAN
|
||||
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mno-mips16"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export CC=mips64-linux-gnuabi64-gcc
|
||||
|
||||
export MULTI_NAME=vlmcsdmulti-mips64-glibc
|
||||
export CLIENT_NAME=vlmcs-mips64-glibc
|
||||
export PROGRAM_NAME=vlmcsd-mips64-glibc
|
||||
|
||||
make -B -j`nproc` allmulti
|
||||
|
||||
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
|
||||
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
|
||||
export MULTI_NAME=vlmcsdmulti-mips64mm-glibc
|
||||
export CLIENT_NAME=vlmcs-mips64mm-glibc
|
||||
export PROGRAM_NAME=vlmcsd-mips64mm-glibc
|
||||
|
||||
make -B -j`nproc` allmulti
|
||||
|
||||
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
|
||||
|
||||
|
||||
## MIPS64 LITTLE-ENDIAN
|
||||
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mno-mips16"
|
||||
export LDFLAGS="$SMALLLD"
|
||||
export CC=mips64el-linux-gnuabi64-gcc
|
||||
|
||||
export MULTI_NAME=vlmcsdmulti-mips64el-glibc
|
||||
export CLIENT_NAME=vlmcs-mips64el-glibc
|
||||
export PROGRAM_NAME=vlmcsd-mips64el-glibc
|
||||
|
||||
make -B -j`nproc` allmulti
|
||||
|
||||
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
|
||||
|
||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
|
||||
export MULTI_NAME=vlmcsdmulti-mips64elmm-glibc
|
||||
export CLIENT_NAME=vlmcs-mips64elmm-glibc
|
||||
export PROGRAM_NAME=vlmcsd-mips64elmm-glibc
|
||||
|
||||
make -B -j`nproc` allmulti
|
||||
|
||||
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
|
||||
|
||||
|
||||
|
||||
if [ "$1" == "nocopy" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mkdir -p /usr/local/man/man1 2>/dev/null
|
||||
mkdir -p /usr/local/man/man5 2>/dev/null
|
||||
mkdir -p /usr/local/man/man8 2>/dev/null
|
||||
mkdir -p /usr/local/man/man7 2>/dev/null
|
||||
cp -a vlmcs.1 vlmcsdmulti.1 /usr/local/man/man1/
|
||||
cp -a vlmcsd.7 /usr/local/man/man7/
|
||||
cp -a vlmcsd.8 /usr/local/man/man8/
|
||||
cp -a vlmcsd.ini.5 /usr/local/man/man5/
|
||||
pbzip2 -f -9 /usr/local/man/man5/vlmcsd.ini.5 /usr/local/man/man1/vlmcs.1 /usr/local/man/man1/vlmcsdmulti.1 /usr/local/man/man7/vlmcsd.7 /usr/local/man/man8/vlmcsd.8
|
||||
|
||||
scp -p vlmcsdmulti-s390-glibc vlmcs-s390-glibc vlmcsd-s390-glibc vlmcsdmulti-s390x-glibc vlmcs-s390x-glibc vlmcsd-s390x-glibc ubuntu64.internal:x/binaries/Linux/s390/glibc
|
||||
scp -p vlmcsdmulti-sparc64v9-glibc vlmcs-sparc64v9-glibc vlmcsd-sparc64v9-glibc ubuntu64.internal:x/binaries/Linux/sparc/glibc
|
||||
scp -p vlmcsdmulti-mips64-glibc vlmcs-mips64-glibc vlmcsd-mips64-glibc vlmcsdmulti-mips64mm-glibc vlmcs-mips64mm-glibc vlmcsd-mips64mm-glibc ubuntu64.internal:x/binaries/Linux/mips/big-endian/glibc
|
||||
scp -p vlmcsdmulti-mips64el-glibc vlmcs-mips64el-glibc vlmcsd-mips64el-glibc vlmcsdmulti-mips64elmm-glibc vlmcs-mips64elmm-glibc vlmcsd-mips64elmm-glibc ubuntu64.internal:x/binaries/Linux/mips/little-endian/glibc
|
||||
scp -p -P 2222 vlmcsdmulti-s390-glibc vlmcs-s390-glibc vlmcsd-s390-glibc vlmcsdmulti-s390x-glibc vlmcs-s390x-glibc vlmcsd-s390x-glibc s390:vlmcsd
|
||||
scp -p -P 2222 vlmcsdmulti-s390-glibc vlmcsdmulti-s390x-glibc s390:/usr/local/sbin
|
16
make_netbsd
16
make_netbsd
@ -3,33 +3,31 @@
|
||||
export VERBOSE=3
|
||||
export DNS_PARSER=OS
|
||||
|
||||
rm -f vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
|
||||
rm -f vlmcsd-NetBSD* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
gmake clean
|
||||
|
||||
MAKEFLAGS="-B -j12"
|
||||
REUSEOBJFLAGS="-j12"
|
||||
|
||||
CF="-flto=12 -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"
|
||||
CF45="-flto=12 -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 -Wl,--hash-style=sysv -Wl,--build-id=none"
|
||||
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=sysv"
|
||||
|
||||
gmake $MAKEFLAGS CC=/usr/pkg/gcc49/bin/gcc PROGRAM_NAME=vlmcsd-NetBSD-x64 CLIENT_NAME=vlmcs-NetBSD-x64 CFLAGS="$CF" LDFLAGS="$LF"
|
||||
rm vlmcsd.o vlmcs.o
|
||||
gmake vlmcsdmulti-NetBSD-x64 $REUSEOBJFLAGS CC=/usr/pkg/gcc49/bin/gcc CFLAGS="$CF" LDFLAGS="$LF" MULTI_NAME=vlmcsdmulti-NetBSD-x64
|
||||
gmake $MAKEFLAGS CC=/usr/pkg/gcc5/bin/gcc PROGRAM_NAME=vlmcsd-NetBSD-x64 CLIENT_NAME=vlmcs-NetBSD-x64 MULTI_NAME=vlmcsdmulti-NetBSD-x64 allmulti CFLAGS="$CF" LDFLAGS="$LF"
|
||||
|
||||
gmake allmulti $MAKEFLAGS CAT=2 MULTI_NAME=vlmcsdmulti-NetBSD-x86 PROGRAM_NAME=vlmcsd-NetBSD-x86 CLIENT_NAME=vlmcs-NetBSD-x86 CFLAGS="$CF45 -m32" LDFLAGS="$LF"
|
||||
gmake allmulti CC=gcc $MAKEFLAGS CAT=2 MULTI_NAME=vlmcsdmulti-NetBSD-x86 PROGRAM_NAME=vlmcsd-NetBSD-x86 CLIENT_NAME=vlmcs-NetBSD-x86 CFLAGS="$CF45 -m32" LDFLAGS="$LF"
|
||||
|
||||
#gmake $MAKEFLAGS CC=clang PROGRAM_NAME=vlmcsd-NetBSD-x64-clang CLIENT_NAME=vlmcs-NetBSD-x64-clang CFLAGS="$CFCLANG" LDFLAGS="$LFCLANG"
|
||||
|
||||
rm *.o
|
||||
|
||||
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
|
||||
strip -s --strip-unneeded -R .ident -R .got -R .note.netbsd.pax -R .gnu.version -R .eh_frame -R .note.gnu.gold-version -R .comment -R .note -R .note.gnu.build-id -R .note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
|
||||
#sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
|
||||
|
||||
cp -af vlmcsd-NetBSD-x86 /usr/local/sbin/vlmcsd
|
||||
cp -af vlmcs-NetBSD-x86 /usr/local/bin/vlmcs
|
||||
|
||||
# Copy everything to distribution server
|
||||
scp -p vlmcsdmulti-* vlmcsd-* vlmcs-* root@ubuntu64:x/binaries/NetBSD/intel/
|
||||
scp -p vlmcsdmulti-* vlmcsd-Net* vlmcs-* root@ubuntu64:x/binaries/NetBSD/intel/
|
||||
|
@ -3,7 +3,7 @@
|
||||
export VERBOSE=3
|
||||
export DNS_PARSER=OS
|
||||
|
||||
rm -f vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm -f vlmcsd-Open* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
|
||||
|
||||
MAKEFLAGS="-B -j12"
|
||||
@ -15,7 +15,7 @@ CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tabl
|
||||
LF="-Wl,-z,norelro"
|
||||
LFCLANG="-Wl,-z,norelro"
|
||||
|
||||
gmake allmulti CAT=2 $MAKEFLAGS CC=egcc MULTI_NAME=vlmcsdmulti-OpenBSD-x64 PROGRAM_NAME=vlmcsd-OpenBSD-x64 CLIENT_NAME=vlmcs-OpenBSD-x64 CFLAGS="$CF" LDFLAGS="$LF"
|
||||
gmake -Bj12 allmulti $MAKEFLAGS CC=egcc MULTI_NAME=vlmcsdmulti-OpenBSD-x64 PROGRAM_NAME=vlmcsd-OpenBSD-x64 CLIENT_NAME=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"
|
||||
|
||||
@ -30,4 +30,4 @@ cp -f vlmcsd-OpenBSD-x64 /usr/local/sbin/vlmcsd
|
||||
cp -f vlmcs-OpenBSD-x64 /usr/local/bin/vlmcs
|
||||
|
||||
# Copy everything to distribution server
|
||||
scp -p vlmcsdmulti-* vlmcsd-* vlmcs-* root@ubuntu64:x/binaries/OpenBSD/intel/
|
||||
scp -p vlmcsdmulti-* vlmcsd-Open* vlmcs-* root@ubuntu64:x/binaries/OpenBSD/intel/
|
||||
|
48
make_osx
48
make_osx
@ -3,49 +3,35 @@
|
||||
export VERBOSE=3
|
||||
export DNS_PARSER=OS
|
||||
|
||||
rm vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm vlmcsd-Mac* vlmcsd-iOS* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm vlmcsd vlmcs vlmcsdmulti 2>/dev/null
|
||||
|
||||
MAKEFLAGS="-j -B"
|
||||
MAKEFLAGS="-Bj"
|
||||
REUSEOBJFLAGS="-j"
|
||||
CFGCC="-static-libgcc -mdynamic-no-pic -Os -flto=jobserver -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
||||
CFCLANG="-mdynamic-no-pic -Os -flto -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
||||
CFGCC42="-static-libgcc -mdynamic-no-pic -Os -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
||||
|
||||
make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x86 PROGRAM_NAME=vlmcsd-MacOSX-x86 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
make $REUSEOBJFLAGS vlmcsdmulti-MacOSX-x86 MULTI_NAME=vlmcsdmulti-MacOSX-x86 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
|
||||
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-MacOSX-x86 CLIENT_NAME=vlmcs-MacOSX-x86 PROGRAM_NAME=vlmcsd-MacOSX-x86 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
|
||||
make $MAKEFLAGS vlmcsd-MacOSX-x86-threads THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x86-threads CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
|
||||
make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x64 PROGRAM_NAME=vlmcsd-MacOSX-x64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
make $REUSEOBJFLAGS vlmcsdmulti-MacOSX-x64 MULTI_NAME=vlmcsdmulti-MacOSX-x64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
|
||||
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-MacOSX-x64 CLIENT_NAME=vlmcs-MacOSX-x64 PROGRAM_NAME=vlmcsd-MacOSX-x64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
|
||||
make $MAKEFLAGS vlmcsd-MacOSX-x64-threads THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x64-threads CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
|
||||
#make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x86-openssl-EXPERIMENTAL PROGRAM_NAME=vlmcsd-MacOSX-x86-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes_soft CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.4" && \
|
||||
#make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x64-openssl-EXPERIMENTAL PROGRAM_NAME=vlmcsd-MacOSX-x64-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes_soft CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.4" && \
|
||||
|
||||
#make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-7.1-armv7 PROGRAM_NAME=vlmcsd-iOS-7.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk" && \
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
#rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
#make $REUSEOBJFLAGS vlmcsdmulti-iOS-7.1-armv7 MULTI_NAME=vlmcsdmulti-iOS-7.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk" && \
|
||||
|
||||
make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-9.1-armv7 PROGRAM_NAME=vlmcsd-iOS-9.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot ~/toolchains/iPhoneOS9.1.sdk" && \
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
make $REUSEOBJFLAGS vlmcsdmulti-iOS-9.1-armv7 MULTI_NAME=vlmcsdmulti-iOS-9.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot ~/toolchains/iPhoneOS9.1.sdk" && \
|
||||
make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-9.1-armv8-aarch64 PROGRAM_NAME=vlmcsd-iOS-9.1-armv8-aarch64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -arch arm64 -miphoneos-version-min=7.0 -isysroot ~/toolchains/iPhoneOS9.1.sdk" && \
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
make $REUSEOBJFLAGS vlmcsdmulti-iOS-9.1-armv8-aarch64 MULTI_NAME=vlmcsdmulti-iOS-9.1-armv8-aarch64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -arch arm64 -miphoneos-version-min=7.0 -isysroot ~/toolchains/iPhoneOS9.1.sdk" && \
|
||||
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-iOS-armv7 CLIENT_NAME=vlmcs-iOS-armv7 PROGRAM_NAME=vlmcsd-iOS-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot ~/toolchains/iPhoneOS.sdk" && \
|
||||
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-iOS-armv8-aarch64 CLIENT_NAME=vlmcs-iOS-armv8-aarch64 PROGRAM_NAME=vlmcsd-iOS-armv8-aarch64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -arch arm64 -miphoneos-version-min=7.0 -isysroot ~/toolchains/iPhoneOS.sdk" && \
|
||||
|
||||
make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-6.1-armv7 PROGRAM_NAME=vlmcsd-iOS-6.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS6.1.sdk -isysroot ~/toolchains/iPhoneOS6.1.sdk" && \
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
make $REUSEOBJFLAGS vlmcsdmulti-iOS-6.1-armv7 MULTI_NAME=vlmcsdmulti-iOS-6.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS6.1.sdk -isysroot ~/toolchains/iPhoneOS6.1.sdk" && \
|
||||
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-iOS-6.1-armv7 CLIENT_NAME=vlmcs-iOS-6.1-armv7 PROGRAM_NAME=vlmcsd-iOS-6.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS6.1.sdk -isysroot ~/toolchains/iPhoneOS6.1.sdk" && \
|
||||
|
||||
make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-5.1-armv7-clang3.4 PROGRAM_NAME=vlmcsd-iOS-5.1-armv7-clang3.4 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
make $REUSEOBJFLAGS vlmcsdmulti-iOS-5.1-armv7-clang3.4 MULTI_NAME=vlmcsdmulti-iOS-5.1-armv7-clang3.4 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
|
||||
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-iOS-5.1-armv7-clang3.4 CLIENT_NAME=vlmcs-iOS-5.1-armv7-clang3.4 PROGRAM_NAME=vlmcsd-iOS-5.1-armv7-clang3.4 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
|
||||
|
||||
#PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH clang --version
|
||||
PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-5.1-armv6-clang3.1 PROGRAM_NAME=vlmcsd-iOS-5.1-armv6-clang3.1 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH make $REUSEOBJFLAGS vlmcsdmulti-iOS-5.1-armv6-clang3.1 MULTI_NAME=vlmcsdmulti-iOS-5.1-armv6-clang3.1 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
|
||||
PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-iOS-5.1-armv6-clang3.1 CLIENT_NAME=vlmcs-iOS-5.1-armv6-clang3.1 PROGRAM_NAME=vlmcsd-iOS-5.1-armv6-clang3.1 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
|
||||
|
||||
#PATH=~/toolchains/gcc4.2/usr/bin/bin:$PATH make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-4.1-armv6-llvm-gcc4.2 PROGRAM_NAME=vlmcsd-iOS-4.1-armv6-llvm-gcc4.2 CC=llvm-g++-4.2 CFLAGS="$CFGCC42" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS4.1.sdk -isysroot ~/toolchains/iPhoneOS4.1.sdk" && \
|
||||
#rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
@ -56,18 +42,12 @@ PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH make $REUSEOBJFLAGS vlmcsdmult
|
||||
#PATH=~/toolchains/gcc4.2/usr/bin:$PATH make $REUSEOBJFLAGS vlmcsdmulti-iOS-4.1-armv7-llvm-clang MULTI_NAME=vlmcsdmulti-iOS-4.1-armv7-llvm-clang CC=~/toolchains/gcc4.2/usr/bin/bin/clang CFLAGS="$CFGCC42" PLATFORMFLAGS="-mthumb -arch armv7 -miphoneos-version-min=4.1 --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk" && \
|
||||
|
||||
|
||||
PATH=~/toolchains/gcc4.2/usr/bin:$PATH make -Bj PROGRAM_NAME=vlmcsd-MacOSX-ppc CLIENT_NAME=vlmcs-MacOSX-ppc CC=gcc CFLAGS="$CFGCC42 -isysroot ~/toolchains/MacOSX10.5.sdk -arch ppc -mmacosx-version-min=10.0" && \
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
PATH=~/toolchains/gcc4.2/usr/bin:$PATH make -j vlmcsdmulti-MacOSX-ppc MULTI_NAME=vlmcsdmulti-MacOSX-ppc CC=gcc CFLAGS="$CFGCC42 -isysroot ~/toolchains/MacOSX10.5.sdk -arch ppc -mmacosx-version-min=10.0"
|
||||
PATH=~/toolchains/gcc4.2/usr/bin:$PATH make -Bj allmulti SAFE_MODE=1 MULTI_NAME=vlmcsdmulti-MacOSX-ppc PROGRAM_NAME=vlmcsd-MacOSX-ppc CLIENT_NAME=vlmcs-MacOSX-ppc CC=gcc CFLAGS="$CFGCC42 -isysroot ~/toolchains/MacOSX10.5.sdk -arch ppc -mmacosx-version-min=10.0" && \
|
||||
|
||||
|
||||
make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x86-gcc PROGRAM_NAME=vlmcsd-MacOSX-x86-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
make $REUSEOBJFLAGS vlmcsdmulti-MacOSX-x86-gcc MULTI_NAME=vlmcsdmulti-MacOSX-x86-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
|
||||
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-MacOSX-x86-gcc CLIENT_NAME=vlmcs-MacOSX-x86-gcc PROGRAM_NAME=vlmcsd-MacOSX-x86-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
|
||||
make $MAKEFLAGS vlmcsd-MacOSX-x86-threads-gcc THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x86-threads-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
|
||||
make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x64-gcc PROGRAM_NAME=vlmcsd-MacOSX-x64-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
|
||||
make $REUSEOBJFLAGS vlmcsdmulti-MacOSX-x64-gcc MULTI_NAME=vlmcsdmulti-MacOSX-x64-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
|
||||
make $MAKEFLAGS allmulti MULTI_NAME=vlmcsdmulti-MacOSX-x64-gcc CLIENT_NAME=vlmcs-MacOSX-x64-gcc PROGRAM_NAME=vlmcsd-MacOSX-x64-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
|
||||
make $MAKEFLAGS vlmcsd-MacOSX-x64-threads-gcc THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x64-threads-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
|
||||
|
||||
# Sign the iOS binaries
|
||||
@ -88,7 +68,7 @@ sudo mkdir -p /usr/local/share/man/man5
|
||||
|
||||
sudo cp -p vlmcsd.8 /usr/local/share/man/man8
|
||||
sudo cp -p vlmcs.1 vlmcsdmulti.1 /usr/local/share/man/man1
|
||||
sudo cp -p vlmcsd.7 /usr/local/share/man/man7
|
||||
sudo cp -p vlmcsd-floppy.7 vlmcsd.7 /usr/local/share/man/man7
|
||||
sudo cp -p vlmcsd.ini.5 //usr/local/share/man/man5
|
||||
|
||||
# Copy the stuff to distribution server
|
||||
|
12
make_solaris
12
make_solaris
@ -10,7 +10,7 @@ fi
|
||||
|
||||
SOLARIS_VERSION=`uname -v`
|
||||
|
||||
rm -f vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm -f vlmcsd-Solaris* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
||||
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
|
||||
|
||||
MAKEFLAGS="-B -j`nproc`"
|
||||
@ -24,9 +24,7 @@ LF="-fwhole-program -Wl,-z,norelro -Wl,--hash-style=sysv -Wl,--build-id=none"
|
||||
if [ "$CAT" != "" ]; then
|
||||
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcs-Solaris$SOLARIS_VERSION-x86 vlmcsd-Solaris$SOLARIS_VERSION-x86 vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x86 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86 MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CC=gcc CFLAGS="$CF" LDFLAGS="$LF"
|
||||
else
|
||||
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x86 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86 CC=gcc CFLAGS="$CF" LDFLAGS="$LF"
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.*
|
||||
gmake $REUSEOBJFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CC=gcc CFLAGS="$CF" LDFLAGS="$LF"
|
||||
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x86 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" allmulti
|
||||
fi
|
||||
|
||||
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsd-Solaris$SOLARIS_VERSION-x86-threads PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86-threads CC=gcc THREADS=1 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
|
||||
@ -39,9 +37,7 @@ LF="$LF -Wl,-melf_x86_64_sol2"
|
||||
if [ "$CAT" != "" ]; then
|
||||
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 vlmcs-Solaris$SOLARIS_VERSION-x64 vlmcsd-Solaris$SOLARIS_VERSION-x64 MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x64 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64"
|
||||
else
|
||||
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x64 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64"
|
||||
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.*
|
||||
gmake $REUSEOBJFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64"
|
||||
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x64 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64" allmulti
|
||||
fi
|
||||
|
||||
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsd-Solaris$SOLARIS_VERSION-x64-threads PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64-threads CC=gcc THREADS=1 CFLAGS="$CF" LDFLAGS="$LF -lpthread" PLATFORMFLAGS="-m64"
|
||||
@ -54,4 +50,4 @@ gstrip -s --strip-unneeded --remove-section=.note.gnu.gold-version --remove-sect
|
||||
#sstrip -z vlmcs-* vlmcsd-*
|
||||
|
||||
# Copy stuff to distribution server
|
||||
scp -p vlmcsd-* vlmcs-* vlmcsdmulti-* root@ubuntu64:x/binaries/Solaris/intel
|
||||
scp -p vlmcsd-Sola* vlmcs-* vlmcsdmulti-* root@ubuntu64:x/binaries/Solaris/intel
|
||||
|
47
make_windows
47
make_windows
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -f cygkms*.dll libkms*.dll vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* vlmcsd.exe vlmcs.exe vlmcsdmulti.exe 2> /dev/null
|
||||
rm -f cygkms*.dll libkms*.dll vlmcs-* vlmcsd-win* vlmcsd-cyg* vlmcsdmulti-* *_all.* vlmcsd.exe vlmcs.exe vlmcsdmulti.exe 2> /dev/null
|
||||
|
||||
export CAT=2
|
||||
export VERBOSE=3
|
||||
@ -10,18 +10,18 @@ CF="-Wno-missing-braces -fno-common -fno-exceptions -fno-non-call-exceptions -fn
|
||||
CFMSRPC="-Wno-missing-braces -Wno-unused-variable $CF" # -fno-common -fno-stack-protector -fmerge-all-constants -pipe"
|
||||
PF32=""
|
||||
PF64="-mpreferred-stack-boundary=4 -march=nocona -mtune=generic"
|
||||
LFCYG32="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
|
||||
LFWIN32="-fwhole-program -lws2_32 -Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
|
||||
LFCYG64="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware"
|
||||
LFWIN64="-fwhole-program -lws2_32 -Wl,--nxcompat,--dynamicbase,--tsaware"
|
||||
LFCYG32="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware,--disable-long-section-names"
|
||||
LFWIN32="-fwhole-program -lws2_32 -Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware,--disable-long-section-names"
|
||||
LFCYG64="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--disable-long-section-names,--high-entropy-va"
|
||||
LFWIN64="-fwhole-program -lws2_32 -Wl,--nxcompat,--dynamicbase,--tsaware,--disable-long-section-names,--high-entropy-va"
|
||||
|
||||
MAKEFLAGS="-j$NUMCPU -B"
|
||||
REUSEFLAGS="-j$NUMCPU"
|
||||
|
||||
make $MAKEFLAGS cygkms32.dll FEATURES=minimum THREADS=1 DLL_NAME=cygkms32.dll DNS_PARSER=internal CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
|
||||
make $MAKEFLAGS cygkms64.dll FEATURES=minimum THREADS=1 DLL_NAME=cygkms64.dll DNS_PARSER=internal CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
|
||||
make $MAKEFLAGS all vlmcsdmulti-cygwin-x86 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-x86 PROGRAM_NAME=vlmcsd-cygwin-x86 MULTI_NAME=vlmcsdmulti-cygwin-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
|
||||
make $MAKEFLAGS all vlmcsdmulti-cygwin-x64 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-x64 PROGRAM_NAME=vlmcsd-cygwin-x64 MULTI_NAME=vlmcsdmulti-cygwin-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
|
||||
make $MAKEFLAGS cygkms32.dll FEATURES=minimum THREADS=1 DLL_NAME=cygkms32.dll DNS_PARSER=internal CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32 -Wl,--no-seh"
|
||||
make $MAKEFLAGS cygkms64.dll FEATURES=minimum THREADS=1 DLL_NAME=cygkms64.dll DNS_PARSER=internal CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64 -Wl,--no-seh"
|
||||
make $MAKEFLAGS all vlmcsdmulti-cygwin-x86 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-x86 PROGRAM_NAME=vlmcsd-cygwin-x86 MULTI_NAME=vlmcsdmulti-cygwin-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32 -Wl,--no-seh"
|
||||
make $MAKEFLAGS all vlmcsdmulti-cygwin-x64 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-x64 PROGRAM_NAME=vlmcsd-cygwin-x64 MULTI_NAME=vlmcsdmulti-cygwin-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64 -Wl,--no-seh"
|
||||
make $MAKEFLAGS MSRPC=1 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-msrpc-x86 PROGRAM_NAME=vlmcsd-cygwin-msrpc-x86 MULTI_NAME=vlmcsdmulti-cygwin-msrpc-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF -fasynchronous-unwind-tables" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
|
||||
make $MAKEFLAGS MSRPC=1 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-msrpc-x64 PROGRAM_NAME=vlmcsd-cygwin-msrpc-x64 MULTI_NAME=vlmcsdmulti-cygwin-msrpc-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
|
||||
unset CAT
|
||||
@ -34,19 +34,24 @@ make $MAKEFLAGS THREADS=1 MSRPC=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-m
|
||||
|
||||
export CAT=2
|
||||
|
||||
make $MAKEFLAGS libkms32.dll CRYPTO=windows FEATURES=minimum THREADS=1 DLL_NAME=libkms32.dll CC=i686-w64-MingW32-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF32" LDFLAGS="-static-libgcc $LFWIN32"
|
||||
make $MAKEFLAGS libkms64.dll CRYPTO=windows FEATURES=minimum THREADS=1 DLL_NAME=libkms64.dll CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF64" LDFLAGS="-static-libgcc $LFWIN64"
|
||||
make $MAKEFLAGS all vlmcsdmulti-Windows-x86 THREADS=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-x86 PROGRAM_NAME=vlmcsd-Windows-x86 MULTI_NAME=vlmcsdmulti-Windows-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF32" LDFLAGS="$LFWIN32"
|
||||
make $MAKEFLAGS all vlmcsdmulti-Windows-x64 THREADS=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-x64 PROGRAM_NAME=vlmcsd-Windows-x64 MULTI_NAME=vlmcsdmulti-Windows-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF64" LDFLAGS="$LFWIN64"
|
||||
make -Bj MSRPC=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-msrpc-x86 PROGRAM_NAME=vlmcsd-Windows-msrpc-x86 MULTI_NAME=vlmcsdmulti-Windows-msrpc-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="-Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
|
||||
make $MAKEFLAGS THREADS=1 MSRPC=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-msrpc-x64 PROGRAM_NAME=vlmcsd-Windows-msrpc-x64 MULTI_NAME=vlmcsdmulti-Windows-msrpc-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
|
||||
unset CAT
|
||||
make $MAKEFLAGS vlmcsdmulti-Windows-msrpc-x86 THREADS=1 MSRPC=1 CRYPTO=windows MULTI_NAME=vlmcsdmulti-Windows-msrpc-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="-Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
|
||||
make $MAKEFLAGS vlmcsdmulti-Windows-msrpc-x64 THREADS=1 MSRPC=1 CRYPTO=windows MULTI_NAME=vlmcsdmulti-Windows-msrpc-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
|
||||
#make $MAKEFLAGS libkms32.dll CRYPTO=windows FEATURES=minimum THREADS=1 DLL_NAME=libkms32.dll CC=i686-w64-MingW32-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF32" LDFLAGS="-static-libgcc $LFWIN32"
|
||||
#make $MAKEFLAGS libkms64.dll CRYPTO=windows FEATURES=minimum THREADS=1 DLL_NAME=libkms64.dll CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF64" LDFLAGS="-static-libgcc $LFWIN64"
|
||||
#make $MAKEFLAGS all vlmcsdmulti-Windows-x86 THREADS=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-x86 PROGRAM_NAME=vlmcsd-Windows-x86 MULTI_NAME=vlmcsdmulti-Windows-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF32" LDFLAGS="$LFWIN32"
|
||||
#make $MAKEFLAGS all vlmcsdmulti-Windows-x64 THREADS=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-x64 PROGRAM_NAME=vlmcsd-Windows-x64 MULTI_NAME=vlmcsdmulti-Windows-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF64" LDFLAGS="$LFWIN64"
|
||||
#make -Bj MSRPC=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-msrpc-x86 PROGRAM_NAME=vlmcsd-Windows-msrpc-x86 MULTI_NAME=vlmcsdmulti-Windows-msrpc-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="-Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
|
||||
#make $MAKEFLAGS THREADS=1 MSRPC=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-msrpc-x64 PROGRAM_NAME=vlmcsd-Windows-msrpc-x64 MULTI_NAME=vlmcsdmulti-Windows-msrpc-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
|
||||
#unset CAT
|
||||
#make $MAKEFLAGS vlmcsdmulti-Windows-msrpc-x86 THREADS=1 MSRPC=1 CRYPTO=windows MULTI_NAME=vlmcsdmulti-Windows-msrpc-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="-Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
|
||||
#make $MAKEFLAGS vlmcsdmulti-Windows-msrpc-x64 THREADS=1 MSRPC=1 CRYPTO=windows MULTI_NAME=vlmcsdmulti-Windows-msrpc-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
|
||||
export CAT=2
|
||||
|
||||
rm -f *_all.* *.o 2> /dev/null &
|
||||
|
||||
echo ""
|
||||
echo "Copying MingW binaries from distribution server"
|
||||
|
||||
scp -p root@ubuntu64:x/binaries/Windows/intel/* .
|
||||
|
||||
echo ""
|
||||
echo "Installing binaries"
|
||||
|
||||
@ -68,12 +73,12 @@ mkdir -p /usr/share/man/man1
|
||||
mkdir -p /usr/share/man/man7
|
||||
mkdir -p /usr/share/man/man5
|
||||
|
||||
cp -p vlmcsd.7 /usr/share/man/man7
|
||||
cp -p vlmcsd.7 vlmcsd-floppy.7 /usr/share/man/man7
|
||||
cp -p vlmcsd.8 /usr/share/man/man8
|
||||
cp -p vlmcsd.ini.5 /usr/share/man/man5
|
||||
cp -p vlmcs.1 vlmcsdmulti.1 /usr/share/man/man1
|
||||
|
||||
bzip2 -f /usr/share/man/man5/vlmcsd.ini.5 /usr/share/man/man7/vlmcsd.7 /usr/share/man/man8/vlmcsd.8 /usr/share/man/man1/vlmcs.1 /usr/share/man/man1/vlmcsdmulti.1 &
|
||||
bzip2 -f /usr/share/man/man7/vlmcsd-floppy.7 /usr/share/man/man5/vlmcsd.ini.5 /usr/share/man/man7/vlmcsd.7 /usr/share/man/man8/vlmcsd.8 /usr/share/man/man1/vlmcs.1 /usr/share/man/man1/vlmcsdmulti.1 &
|
||||
|
||||
# Copy stuff to distribution server
|
||||
scp -p vlmcsd-* vlmcs-* vlmcsdmulti-* *.dll root@ubuntu64:x/binaries/Windows/intel
|
||||
scp -p vlmcsd-cyg* vlmcsd-Win* vlmcs-* vlmcsdmulti-* *.dll root@ubuntu64:x/binaries/Windows/intel
|
||||
|
161
network.c
161
network.c
@ -207,8 +207,88 @@ SOCKET connectToAddress(const char *const addr, const int AddressFamily, int_fas
|
||||
return s;
|
||||
}
|
||||
|
||||
// fix for lame tomato toolchain
|
||||
# if !defined(IPV6_V6ONLY) && defined(__linux__)
|
||||
# define IPV6_V6ONLY (26)
|
||||
# endif // !defined(IPV6_V6ONLY) && defined(__linux__)
|
||||
|
||||
|
||||
#ifndef NO_SOCKETS
|
||||
#ifdef SIMPLE_SOCKETS
|
||||
|
||||
static int_fast8_t allowSocketReuse(SOCKET s)
|
||||
{
|
||||
# if !defined(_WIN32) && !defined(__CYGWIN__)
|
||||
BOOL socketOption = TRUE;
|
||||
# else // _WIN32
|
||||
BOOL socketOption = FALSE;
|
||||
# endif // _WIN32
|
||||
|
||||
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (sockopt_t)&socketOption, sizeof(socketOption)))
|
||||
{
|
||||
# ifdef _PEDANTIC
|
||||
printerrorf("Warning: %s does not support socket option SO_REUSEADDR: %s\n", ipstr, vlmcsd_strerror(socket_errno));
|
||||
# endif // _PEDANTIC
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int listenOnAllAddresses()
|
||||
{
|
||||
uint32_t port_listen;
|
||||
|
||||
if (!stringToInt(defaultport, 1, 65535, &port_listen))
|
||||
{
|
||||
printerrorf("Fatal: Port must be numeric between 1 and 65535.\n");
|
||||
exit(!0);
|
||||
}
|
||||
|
||||
struct sockaddr_in6 addr;
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sin6_family = AF_INET6;
|
||||
addr.sin6_port = BE16((uint16_t)port_listen);
|
||||
addr.sin6_addr = in6addr_any;
|
||||
BOOL v6only = FALSE;
|
||||
|
||||
s_server = socket(AF_INET6, SOCK_STREAM, 0);
|
||||
|
||||
if (s_server == INVALID_SOCKET
|
||||
|| allowSocketReuse(s_server)
|
||||
|| setsockopt(s_server, IPPROTO_IPV6, IPV6_V6ONLY, (sockopt_t)&v6only, sizeof(v6only))
|
||||
|| bind(s_server, (struct sockaddr *)&addr, sizeof(addr))
|
||||
|| listen(s_server, SOMAXCONN) )
|
||||
{
|
||||
socketclose(s_server);
|
||||
struct sockaddr_in addr = {
|
||||
.sin_family = AF_INET,
|
||||
.sin_port = BE16((uint16_t)port_listen),
|
||||
};
|
||||
|
||||
addr.sin_addr.s_addr = BE32(INADDR_ANY);
|
||||
s_server = socket(AF_INET, SOCK_STREAM, 0);
|
||||
|
||||
if ( s_server == INVALID_SOCKET
|
||||
|| allowSocketReuse(s_server)
|
||||
|| bind(s_server, (struct sockaddr *)&addr, sizeof(addr))
|
||||
|| listen(s_server, SOMAXCONN) )
|
||||
{
|
||||
int error = socket_errno;
|
||||
printerrorf("Fatal: Cannot bind to TCP port %u: %s\n", port_listen, vlmcsd_strerror(error));
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NO_LOG
|
||||
logger("Listening on TCP port %u\n", port_listen);
|
||||
#endif // NO_LOG
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else // !SIMPLE_SOCKETS
|
||||
|
||||
|
||||
// Create a Listening socket for addrinfo sa and return socket s
|
||||
// szHost and szPort are for logging only
|
||||
@ -249,20 +329,67 @@ static int listenOnAddress(const struct addrinfo *const ai, SOCKET *s)
|
||||
|
||||
BOOL socketOption = TRUE;
|
||||
|
||||
// fix for lame tomato toolchain
|
||||
# ifndef IPV6_V6ONLY
|
||||
# ifdef __linux__
|
||||
# define IPV6_V6ONLY (26)
|
||||
# endif // __linux__
|
||||
# endif // IPV6_V6ONLY
|
||||
|
||||
# ifdef IPV6_V6ONLY
|
||||
if (ai->ai_family == AF_INET6) setsockopt(*s, IPPROTO_IPV6, IPV6_V6ONLY, (sockopt_t)&socketOption, sizeof(socketOption));
|
||||
if (ai->ai_family == AF_INET6 && setsockopt(*s, IPPROTO_IPV6, IPV6_V6ONLY, (sockopt_t)&socketOption, sizeof(socketOption)))
|
||||
{
|
||||
# ifdef _PEDANTIC
|
||||
# if defined(_WIN32) || defined(__CYGWIN__)
|
||||
// if (IsWindowsVistaOrGreater()) //Doesn't work with older version of MingW32-w64 toolchain
|
||||
if ((GetVersion() & 0xff) > 5)
|
||||
# endif // _WIN32
|
||||
printerrorf("Warning: %s does not support socket option IPV6_V6ONLY: %s\n", ipstr, vlmcsd_strerror(socket_errno));
|
||||
# endif // _PEDANTIC
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifndef _WIN32
|
||||
setsockopt(*s, SOL_SOCKET, SO_REUSEADDR, (sockopt_t)&socketOption, sizeof(socketOption));
|
||||
if (setsockopt(*s, SOL_SOCKET, SO_REUSEADDR, (sockopt_t)&socketOption, sizeof(socketOption)))
|
||||
{
|
||||
# ifdef _PEDANTIC
|
||||
printerrorf("Warning: %s does not support socket option SO_REUSEADDR: %s\n", ipstr, vlmcsd_strerror(socket_errno));
|
||||
# endif // _PEDANTIC
|
||||
}
|
||||
# endif // _WIN32
|
||||
|
||||
# if HAVE_FREEBIND
|
||||
# if (defined(IP_NONLOCALOK) || __FreeBSD_kernel__ || __FreeBSD__) && !defined(IPV6_BINDANY)
|
||||
# define IPV6_BINDANY 64
|
||||
# endif // (defined(IP_NONLOCALOK) || __FreeBSD_kernel__ || __FreeBSD__) && !defined(IPV6_BINDANY)
|
||||
|
||||
if (freebind)
|
||||
{
|
||||
# if defined(IP_FREEBIND) // Linux
|
||||
if (setsockopt(*s, IPPROTO_IP, IP_FREEBIND, (sockopt_t)&socketOption, sizeof(socketOption)))
|
||||
{
|
||||
printerrorf("Warning: Cannot use FREEBIND on %s: %s\n", ipstr, vlmcsd_strerror(socket_errno));
|
||||
}
|
||||
# endif // defined(IP_FREEBIND)
|
||||
|
||||
# if defined(IP_BINDANY) // FreeBSD IPv4
|
||||
if (ai->ai_family == AF_INET && setsockopt(*s, IPPROTO_IP, IP_BINDANY, (sockopt_t)&socketOption, sizeof(socketOption)))
|
||||
{
|
||||
printerrorf("Warning: Cannot use BINDANY on %s: %s\n", ipstr, vlmcsd_strerror(socket_errno));
|
||||
}
|
||||
# endif // defined(IP_BINDANY)
|
||||
|
||||
# if defined(IPV6_BINDANY) // FreeBSD IPv6
|
||||
if (ai->ai_family == AF_INET6 && setsockopt(*s, IPPROTO_IP, IPV6_BINDANY, (sockopt_t)&socketOption, sizeof(socketOption)))
|
||||
{
|
||||
# ifdef _PEDANTIC // FreeBSD defines the symbol but doesn't have BINDANY in IPv6 (Kame stack doesn't have it)
|
||||
printerrorf("Warning: Cannot use BINDANY on %s: %s\n", ipstr, vlmcsd_strerror(socket_errno));
|
||||
# endif
|
||||
}
|
||||
# endif // defined(IPV6_BINDANY)
|
||||
|
||||
# if defined(IP_NONLOCALOK) && !defined(IP_BINDANY) // FreeBSD with GNU userspace IPv4
|
||||
if (ai->ai_family == AF_INET && setsockopt(*s, IPPROTO_IP, IP_NONLOCALOK, (sockopt_t)&socketOption, sizeof(socketOption)))
|
||||
{
|
||||
printerrorf("Warning: Cannot use BINDANY on %s: %s\n", ipstr, vlmcsd_strerror(socket_errno));
|
||||
}
|
||||
# endif // defined(IP_NONLOCALOK) && !defined(IP_BINDANY)
|
||||
}
|
||||
|
||||
# endif // HAVE_FREEBIND
|
||||
|
||||
if (bind(*s, ai->ai_addr, ai->ai_addrlen) || listen(*s, SOMAXCONN))
|
||||
{
|
||||
@ -279,7 +406,6 @@ static int listenOnAddress(const struct addrinfo *const ai, SOCKET *s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// Adds a listening socket for an address string,
|
||||
// e.g. 127.0.0.1:1688 or [2001:db8:dead:beef::1]:1688
|
||||
BOOL addListeningSocket(const char *const addr)
|
||||
@ -366,10 +492,18 @@ static SOCKET network_accept_any()
|
||||
else
|
||||
return accept(sock, NULL, NULL);
|
||||
}
|
||||
#endif // !SIMPLE_SOCKETS
|
||||
|
||||
|
||||
void closeAllListeningSockets()
|
||||
{
|
||||
# ifdef SIMPLE_SOCKETS
|
||||
|
||||
shutdown(s_server, VLMCSD_SHUT_RDWR);
|
||||
socketclose(s_server);
|
||||
|
||||
# else // !SIMPLE_SOCKETS
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < numsockets; i++)
|
||||
@ -377,6 +511,8 @@ void closeAllListeningSockets()
|
||||
shutdown(SocketList[i], VLMCSD_SHUT_RDWR);
|
||||
socketclose(SocketList[i]);
|
||||
}
|
||||
|
||||
#endif // !SIMPLE_SOCKETS
|
||||
}
|
||||
#endif // NO_SOCKETS
|
||||
|
||||
@ -641,13 +777,16 @@ int runServer()
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Standalone mode
|
||||
for (;;)
|
||||
{
|
||||
int error;
|
||||
SOCKET s_client;
|
||||
|
||||
#ifdef SIMPLE_SOCKETS
|
||||
if ( (s_client = accept(s_server, NULL, NULL)) == INVALID_SOCKET )
|
||||
#else // Standalone mode fully featured sockets
|
||||
if ( (s_client = network_accept_any()) == INVALID_SOCKET )
|
||||
#endif // Standalone mode fully featured sockets
|
||||
{
|
||||
error = socket_errno;
|
||||
|
||||
|
@ -22,6 +22,9 @@ int_fast8_t sendrecv(SOCKET sock, BYTE *data, int len, int_fast8_t do_send);
|
||||
#ifndef NO_SOCKETS
|
||||
|
||||
void closeAllListeningSockets();
|
||||
#ifdef SIMPLE_SOCKETS
|
||||
int listenOnAllAddresses();
|
||||
#endif // SIMPLE_SOCKETS
|
||||
BOOL addListeningSocket(const char *const addr);
|
||||
__pure int_fast8_t checkProtocolStack(const int addressfamily);
|
||||
|
||||
|
395
output.c
395
output.c
@ -94,25 +94,35 @@ int logger(const char *const fmt, ...)
|
||||
// Output to stderr if it is available or to log otherwise (e.g. if running as daemon/service)
|
||||
void printerrorf(const char *const fmt, ...)
|
||||
{
|
||||
int error = errno;
|
||||
va_list arglist;
|
||||
|
||||
va_start(arglist, fmt);
|
||||
|
||||
#ifndef NO_LOG
|
||||
#ifdef _NTSERVICE
|
||||
# ifdef IS_LIBRARY
|
||||
|
||||
snprintf(ErrorMessage, MESSAGE_BUFFER_SIZE, fmt, arglist);
|
||||
|
||||
# else // !IS_LIBRARY
|
||||
|
||||
# ifndef NO_LOG
|
||||
# ifdef _NTSERVICE
|
||||
if (InetdMode || IsNTService)
|
||||
#else // !_NTSERVICE
|
||||
# else // !_NTSERVICE
|
||||
if (InetdMode)
|
||||
#endif // NTSERVIICE
|
||||
# endif // NTSERVIICE
|
||||
vlogger(fmt, arglist);
|
||||
else
|
||||
#endif //NO_LOG
|
||||
# endif //NO_LOG
|
||||
|
||||
# endif // IS_LIBRARY
|
||||
{
|
||||
vfprintf(stderr, fmt, arglist);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
va_end(arglist);
|
||||
errno = error;
|
||||
}
|
||||
|
||||
|
||||
@ -130,10 +140,12 @@ int errorout(const char* fmt, ...)
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_VERBOSE_LOG
|
||||
static const char *LicenseStatusText[] =
|
||||
{
|
||||
"Unlicensed", "Licensed", "OOB grace", "OOT grace", "Non-Genuine", "Notification", "Extended grace"
|
||||
};
|
||||
#endif // NO_VERBOSE_LOG
|
||||
|
||||
|
||||
void uuid2StringLE(const GUID *const guid, char *const string)
|
||||
@ -152,7 +164,7 @@ void uuid2StringLE(const GUID *const guid, char *const string)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_VERBOSE_LOG
|
||||
void logRequestVerbose(const REQUEST *const Request, const PRINTFUNC p)
|
||||
{
|
||||
char guidBuffer[GUID_STRING_LENGTH + 1];
|
||||
@ -208,7 +220,6 @@ void logRequestVerbose(const REQUEST *const Request, const PRINTFUNC p)
|
||||
p("N count policy (minimum clients): %u\n", (uint32_t)LE32(Request->N_Policy));
|
||||
}
|
||||
|
||||
|
||||
void logResponseVerbose(const char *const ePID, const BYTE *const hwid, const RESPONSE *const response, const PRINTFUNC p)
|
||||
{
|
||||
char guidBuffer[GUID_STRING_LENGTH + 1];
|
||||
@ -237,4 +248,374 @@ void logResponseVerbose(const char *const ePID, const BYTE *const hwid, const RE
|
||||
p("Renewal interval policy : %u\n", (uint32_t)LE32(response->VLRenewalInterval));
|
||||
p("Activation interval policy : %u\n", (uint32_t)LE32(response->VLActivationInterval));
|
||||
}
|
||||
#endif // NO_VERBOSE_LOG
|
||||
|
||||
|
||||
#ifndef NO_VERSION_INFORMATION
|
||||
void printPlatform()
|
||||
{
|
||||
int testNumber = 0x1234;
|
||||
|
||||
# ifdef VLMCSD_COMPILER
|
||||
printf
|
||||
(
|
||||
"Compiler: %s\n", VLMCSD_COMPILER
|
||||
# ifdef __VERSION__
|
||||
" " __VERSION__
|
||||
# endif // __VERSION__
|
||||
);
|
||||
# endif // VLMCSD_COMPILER
|
||||
|
||||
printf
|
||||
(
|
||||
"Intended platform:%s %s\n", ""
|
||||
|
||||
# if __i386__ || _M_IX86
|
||||
" Intel x86"
|
||||
# endif
|
||||
|
||||
# if __x86_64__ || __amd64__ || _M_X64 || _M_AMD64
|
||||
" Intel x86_64"
|
||||
# endif
|
||||
|
||||
# if _M_ARM || __arm__
|
||||
" ARM"
|
||||
# endif
|
||||
|
||||
# if __thumb__
|
||||
" thumb"
|
||||
# endif
|
||||
|
||||
# if __aarch64__
|
||||
" ARM64"
|
||||
# endif
|
||||
|
||||
# if __hppa__
|
||||
" HP/PA RISC"
|
||||
# endif
|
||||
|
||||
# if __ia64__
|
||||
" Intel Itanium"
|
||||
# endif
|
||||
|
||||
# if __mips__
|
||||
" MIPS"
|
||||
# endif
|
||||
|
||||
# if defined(_MIPS_ARCH)
|
||||
" " _MIPS_ARCH
|
||||
# endif
|
||||
|
||||
# if __mips16
|
||||
" mips16"
|
||||
# endif
|
||||
|
||||
# if __mips_micromips
|
||||
" micromips"
|
||||
# endif
|
||||
|
||||
# if __ppc__ || __powerpc__
|
||||
" PowerPC"
|
||||
# endif
|
||||
|
||||
# if __powerpc64__ || __ppc64__
|
||||
" PowerPC64"
|
||||
# endif
|
||||
|
||||
# if __sparc__
|
||||
" SPARC"
|
||||
# endif
|
||||
|
||||
# if defined(__s390__) && !defined(__zarch__) && !defined(__s390x__)
|
||||
" IBM S/390"
|
||||
# endif
|
||||
|
||||
# if __zarch__ || __s390x__
|
||||
" IBM z/Arch (S/390x)"
|
||||
# endif
|
||||
|
||||
# if __m68k__
|
||||
" Motorola 68k"
|
||||
# endif
|
||||
|
||||
# if __ANDROID__
|
||||
" Android"
|
||||
# endif
|
||||
|
||||
# if __ANDROID_API__
|
||||
" (API level " ANDROID_API_LEVEL ")"
|
||||
# endif
|
||||
|
||||
# if __FreeBSD__ || __FreeBSD_kernel__
|
||||
" FreeBSD"
|
||||
# endif
|
||||
|
||||
# if __NetBSD__
|
||||
" NetBSD"
|
||||
# endif
|
||||
|
||||
# if __OpenBSD__
|
||||
" OpenBSD"
|
||||
# endif
|
||||
|
||||
# if __DragonFly__
|
||||
" DragonFly BSD"
|
||||
# endif
|
||||
|
||||
# if defined(__CYGWIN__) && !defined(_WIN64)
|
||||
" Cygwin32"
|
||||
# endif
|
||||
|
||||
# if defined(__CYGWIN__) && defined(_WIN64)
|
||||
" Cygwin64"
|
||||
# endif
|
||||
|
||||
# if __GNU__
|
||||
" GNU"
|
||||
# endif
|
||||
|
||||
# if __gnu_hurd__
|
||||
" Hurd"
|
||||
# endif
|
||||
|
||||
# if __MACH__
|
||||
" Mach"
|
||||
# endif
|
||||
|
||||
# if __linux__
|
||||
" Linux"
|
||||
# endif
|
||||
|
||||
# if __APPLE__ && __MACH__
|
||||
" Darwin"
|
||||
# endif
|
||||
|
||||
# if __minix__
|
||||
" Minix"
|
||||
# endif
|
||||
|
||||
# if __QNX__
|
||||
" QNX"
|
||||
# endif
|
||||
|
||||
# if __svr4__ || __SVR4
|
||||
" SYSV R4"
|
||||
# endif
|
||||
|
||||
# if (defined(__sun__) || defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))
|
||||
" Solaris"
|
||||
# endif
|
||||
|
||||
# if (defined(__sun__) || defined(sun) || defined(__sun)) && !defined(__SVR4) && !defined(__svr4__)
|
||||
" SunOS"
|
||||
# endif
|
||||
|
||||
# if defined(_WIN32) && !defined(_WIN64)
|
||||
" Windows32"
|
||||
# endif
|
||||
|
||||
# if defined(_WIN32) && defined(_WIN64)
|
||||
" Windows64"
|
||||
# endif
|
||||
|
||||
# if __MVS__ || __TOS_MVS__
|
||||
" z/OS"
|
||||
# endif
|
||||
|
||||
# if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
" glibc"
|
||||
# endif
|
||||
|
||||
# if __UCLIBC__
|
||||
" uclibc"
|
||||
# endif
|
||||
|
||||
# if defined(__linux__) && !defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__ANDROID__) && !defined(__BIONIC__)
|
||||
" musl"
|
||||
# endif
|
||||
|
||||
//# if _MIPSEL || __MIPSEL__ || __ARMEL__ || __THUMBEL__
|
||||
// " little-endian"
|
||||
//# endif
|
||||
//
|
||||
//# if _MIPSEB || __MIPSEB__ || __ARMEB__ || __THUMBEB__
|
||||
// " big-endian"
|
||||
//# endif
|
||||
|
||||
# if __PIE__ || __pie__
|
||||
" PIE"
|
||||
# endif
|
||||
,
|
||||
*((uint8_t*)&testNumber) == 0x34 ? "little-endian" : "big-endian"
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void printCommonFlags()
|
||||
{
|
||||
printf
|
||||
(
|
||||
"Common flags:%s\n",""
|
||||
|
||||
# ifdef NO_EXTENDED_PRODUCT_LIST
|
||||
" NO_EXTENDED_PRODUCT_LIST"
|
||||
# endif // NO_EXTENDED_PRODUCT_LIST
|
||||
|
||||
# ifdef NO_BASIC_PRODUCT_LIST
|
||||
" NO_BASIC_PRODUCT_LIST"
|
||||
# endif // NO_BASIC_PRODUCT_LIST
|
||||
|
||||
# ifdef USE_MSRPC
|
||||
" USE_MSRPC"
|
||||
# endif // USE_MSRPC
|
||||
|
||||
# ifdef _CRYPTO_OPENSSL
|
||||
" _CRYPTO_OPENSSL"
|
||||
# endif // _CRYPTO_OPENSSL
|
||||
|
||||
# ifdef _CRYPTO_POLARSSL
|
||||
" _CRYPTO_POLARSSL"
|
||||
# endif // _CRYPTO_POLARSSL
|
||||
|
||||
# ifdef _CRYPTO_WINDOWS
|
||||
" _CRYPTO_WINDOWS"
|
||||
# endif // _CRYPTO_WINDOWS
|
||||
|
||||
# if defined(_OPENSSL_SOFTWARE) && defined(_CRYPTO_OPENSSL)
|
||||
" _OPENSSL_SOFTWARE"
|
||||
# endif // _OPENSSL_SOFTWARE
|
||||
|
||||
# if defined(_USE_AES_FROM_OPENSSL) && defined(_CRYPTO_OPENSSL)
|
||||
" _USE_AES_FROM_OPENSSL"
|
||||
# endif // _USE_AES_FROM_OPENSSL
|
||||
|
||||
# if defined(_OPENSSL_NO_HMAC) && defined(_CRYPTO_OPENSSL)
|
||||
" OPENSSL_HMAC=0"
|
||||
# endif // _OPENSSL_NO_HMAC
|
||||
|
||||
# ifdef _PEDANTIC
|
||||
" _PEDANTIC"
|
||||
# endif // _PEDANTIC
|
||||
|
||||
# ifdef INCLUDE_BETAS
|
||||
" INCLUDE_BETAS"
|
||||
# endif // INCLUDE_BETAS
|
||||
|
||||
# if __minix__ || defined(NO_TIMEOUT)
|
||||
" NO_TIMEOUT=1"
|
||||
# endif // __minix__ || defined(NO_TIMEOUT)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void printClientFlags()
|
||||
{
|
||||
printf
|
||||
(
|
||||
"vlmcs flags:%s\n",""
|
||||
|
||||
# ifdef NO_DNS
|
||||
" NO_DNS=1"
|
||||
# endif
|
||||
|
||||
# if !defined(NO_DNS)
|
||||
# if defined(DNS_PARSER_INTERNAL) && !defined(_WIN32)
|
||||
" DNS_PARSER=internal"
|
||||
# else // !defined(DNS_PARSER_INTERNAL) || defined(_WIN32)
|
||||
" DNS_PARSER=OS"
|
||||
# endif // !defined(DNS_PARSER_INTERNAL) || defined(_WIN32)
|
||||
# endif // !defined(NO_DNS)
|
||||
|
||||
# if defined(DISPLAY_WIDTH)
|
||||
" TERMINAL_WIDTH=" DISPLAY_WIDTH
|
||||
# endif
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void printServerFlags()
|
||||
{
|
||||
printf
|
||||
(
|
||||
"vlmcsd flags:%s\n",""
|
||||
|
||||
# ifdef NO_LOG
|
||||
" NO_LOG"
|
||||
# endif // NO_LOG
|
||||
|
||||
# ifdef NO_RANDOM_EPID
|
||||
" NO_RANDOM_EPID"
|
||||
# endif // NO_RANDOM_EPID
|
||||
|
||||
# ifdef NO_INI_FILE
|
||||
" NO_INI_FILE"
|
||||
# endif // NO_INI_FILE
|
||||
|
||||
# if !defined(NO_INI_FILE) && defined(INI_FILE)
|
||||
" INI=" INI_FILE
|
||||
# endif // !defined(NO_INI_FILE)
|
||||
|
||||
# ifdef NO_PID_FILE
|
||||
" NO_PID_FILE"
|
||||
# endif // NO_PID_FILE
|
||||
|
||||
# ifdef NO_USER_SWITCH
|
||||
" NO_USER_SWITCH"
|
||||
# endif // NO_USER_SWITCH
|
||||
|
||||
# ifdef NO_HELP
|
||||
" NO_HELP"
|
||||
# endif // NO_HELP
|
||||
|
||||
# ifdef NO_CUSTOM_INTERVALS
|
||||
" NO_CUSTOM_INTERVALS"
|
||||
# endif // NO_CUSTOM_INTERVALS
|
||||
|
||||
# ifdef NO_SOCKETS
|
||||
" NO_SOCKETS"
|
||||
# endif // NO_SOCKETS
|
||||
|
||||
# ifdef NO_CL_PIDS
|
||||
" NO_CL_PIDS"
|
||||
# endif // NO_CL_PIDS
|
||||
|
||||
# ifdef NO_LIMIT
|
||||
" NO_LIMIT"
|
||||
# endif // NO_LIMIT
|
||||
|
||||
# ifdef NO_SIGHUP
|
||||
" NO_SIGHUP"
|
||||
# endif // NO_SIGHUP
|
||||
|
||||
# ifdef NO_PROCFS
|
||||
" NOPROCFS=1"
|
||||
# endif // NO_PROCFS
|
||||
|
||||
# ifdef USE_THREADS
|
||||
" THREADS=1"
|
||||
# endif // USE_THREADS
|
||||
|
||||
# ifdef USE_AUXV
|
||||
" AUXV=1"
|
||||
# endif // USE_AUXV
|
||||
|
||||
# if defined(CHILD_HANDLER) || __minix__
|
||||
" CHILD_HANDLER=1"
|
||||
# endif // defined(CHILD_HANDLER) || __minix__
|
||||
|
||||
# if !defined(NO_SOCKETS) && defined(SIMPLE_SOCKETS)
|
||||
" SIMPLE_SOCKETS"
|
||||
# endif // !defined(NO_SOCKETS) && defined(SIMPLE_SOCKETS)
|
||||
|
||||
# if (_WIN32 || __CYGWIN__) && (!defined(USE_MSRPC) || defined(SUPPORT_WINE))
|
||||
" SUPPORT_WINE"
|
||||
# endif // (_WIN32 || __CYGWIN__) && (!defined(USE_MSRPC) || defined(SUPPORT_WINE))
|
||||
|
||||
# if !HAVE_FREEBIND
|
||||
" NO_FREEBIND"
|
||||
# endif //!HAVE_FREEBIND
|
||||
|
||||
);
|
||||
}
|
||||
#endif // NO_VERSION_INFORMATION
|
||||
|
8
output.h
8
output.h
@ -6,6 +6,7 @@
|
||||
#endif // CONFIG
|
||||
#include CONFIG
|
||||
|
||||
#include <errno.h>
|
||||
#include "kms.h"
|
||||
|
||||
typedef int (*PRINTFUNC)(const char *const fmt, ...);
|
||||
@ -15,6 +16,13 @@ int errorout(const char* fmt, ...);
|
||||
void logRequestVerbose(const REQUEST *const Request, const PRINTFUNC p);
|
||||
void logResponseVerbose(const char *const ePID, const BYTE *const hwid, const RESPONSE *const response, const PRINTFUNC p);
|
||||
|
||||
#ifndef NO_VERSION_INFORMATION
|
||||
void printPlatform();
|
||||
void printCommonFlags();
|
||||
void printServerFlags();
|
||||
void printClientFlags();
|
||||
#endif // NO_VERSION_INFORMATION
|
||||
|
||||
#ifndef NO_LOG
|
||||
int logger(const char *const fmt, ...);
|
||||
#endif //NO_LOG
|
||||
|
@ -51,10 +51,14 @@ int_fast8_t logverbose = 0;
|
||||
#endif // NO_LOG
|
||||
|
||||
#ifndef NO_SOCKETS
|
||||
#ifndef _WIN32
|
||||
int_fast8_t nodaemon = 0;
|
||||
#endif // _WIN32
|
||||
int_fast8_t InetdMode = 0;
|
||||
#else
|
||||
#ifndef _WIN32
|
||||
int_fast8_t nodaemon = 1;
|
||||
#endif // _WIN32
|
||||
int_fast8_t InetdMode = 1;
|
||||
#endif
|
||||
|
||||
@ -64,8 +68,12 @@ uint16_t Lcid = 0;
|
||||
#endif
|
||||
|
||||
#ifndef NO_SOCKETS
|
||||
#ifdef SIMPLE_SOCKETS
|
||||
SOCKET s_server;
|
||||
#else
|
||||
SOCKET *SocketList;
|
||||
int numsockets = 0;
|
||||
#endif
|
||||
|
||||
#if !defined(NO_LIMIT) && !__minix__
|
||||
#ifndef _WIN32 // Posix
|
||||
@ -92,6 +100,10 @@ CRITICAL_SECTION logmutex;
|
||||
#endif // USE_THREADS
|
||||
#endif // NO_LOG
|
||||
|
||||
#if HAVE_FREEBIND
|
||||
int_fast8_t freebind = FALSE;
|
||||
#endif // HAVE_FREEBIND
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <limits.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <semaphore.h>
|
||||
//#include <semaphore.h>
|
||||
#include "types.h"
|
||||
|
||||
#define MAX_KMSAPPS 3
|
||||
@ -74,10 +74,16 @@ extern const char *const Version;
|
||||
#define UINT_MAX 4294967295
|
||||
#endif
|
||||
|
||||
#ifdef IS_LIBRARY
|
||||
#define MESSAGE_BUFFER_SIZE 256
|
||||
EXTERNC __declspec(EXTERNAL) extern char ErrorMessage[MESSAGE_BUFFER_SIZE];
|
||||
#endif // IS_LIBRARY
|
||||
|
||||
extern int global_argc, multi_argc;
|
||||
extern CARGV global_argv, multi_argv;
|
||||
#ifndef _WIN32
|
||||
extern int_fast8_t nodaemon;
|
||||
#endif // _WIN32
|
||||
extern DWORD VLActivationInterval;
|
||||
extern DWORD VLRenewalInterval;
|
||||
extern int_fast8_t DisconnectImmediately;
|
||||
@ -122,8 +128,12 @@ extern uint16_t Lcid;
|
||||
#endif
|
||||
|
||||
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||
#if defined(SIMPLE_SOCKETS)
|
||||
extern SOCKET s_server;
|
||||
#else // !defined(SIMPLE_SOCKETS)
|
||||
extern SOCKET *SocketList;
|
||||
extern int numsockets;
|
||||
#endif // !defined(SIMPLE_SOCKETS)
|
||||
|
||||
#if !defined(NO_LIMIT) && !__minix__
|
||||
|
||||
@ -152,5 +162,9 @@ extern CRITICAL_SECTION logmutex;
|
||||
#endif // USE_THREADS
|
||||
#endif // NO_LOG
|
||||
|
||||
#if HAVE_FREEBIND
|
||||
extern int_fast8_t freebind;
|
||||
#endif // HAVE_FREEBIND
|
||||
|
||||
|
||||
#endif // INCLUDED_SHARED_GLOBALS_H
|
||||
|
3
strip_binaries
Executable file
3
strip_binaries
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
find binaries -xdev -name 'vlmcs*' ! -name '*-NetBSD-*' ! -name '*-Windows-*' ! -name '*-cygwin-*' ! -name '*-MacOSX-*' ! -name '*-iOS-*' -exec sstrip -z {} \;
|
42
types.h
42
types.h
@ -6,13 +6,47 @@
|
||||
#endif // CONFIG
|
||||
#include CONFIG
|
||||
|
||||
#define ANDROID_API_LEVEL ANDROID_HELPER1(__ANDROID_API__)
|
||||
#define ANDROID_HELPER1(s) ANDROID_HELPER2(s)
|
||||
#define ANDROID_HELPER2(s) #s
|
||||
|
||||
#if !defined(_WIN32) && !__CYGWIN__
|
||||
#define __declspec(x) __attribute__((__visibility__("default")))
|
||||
#endif
|
||||
|
||||
#if !defined(EXTERNAL)
|
||||
#define EXTERNAL dllimport
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERNC extern "C"
|
||||
#else
|
||||
#define EXTERNC
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
|
||||
//#ifdef __sun__
|
||||
//#include <alloca.h>
|
||||
//#endif
|
||||
#ifdef __ANDROID__
|
||||
#include <android/api-level.h>
|
||||
#endif // __ANDROID__
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <netinet/in.h>
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
#if __linux__ // Some versions of uclibc do not define IP_FREEBIND in the correct header file
|
||||
#ifndef IP_FREEBIND
|
||||
#define IP_FREEBIND 15
|
||||
#endif // IP_FREEBIND
|
||||
#endif // __linux__
|
||||
|
||||
#if (IP_BINDANY || IP_FREEBIND || IPV6_BINDANY || IP_NONLOCALOK) && !defined(NO_FREEBIND) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||
#define HAVE_FREEBIND 1
|
||||
#endif
|
||||
|
||||
#ifndef alloca
|
||||
#ifdef __GNUC__
|
||||
#define alloca(x) __builtin_alloca(x)
|
||||
@ -156,6 +190,7 @@ typedef uint8_t ProdListIndex_t;
|
||||
#endif // USE_MSRPC
|
||||
|
||||
#include <windows.h>
|
||||
//#include <VersionHelpers.h>
|
||||
|
||||
|
||||
typedef char* sockopt_t;
|
||||
@ -184,6 +219,7 @@ typedef char* sockopt_t;
|
||||
#elif defined(__CYGWIN__)
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
// Resolve conflicts between OpenSSL and MS Crypto API
|
||||
#ifdef _CRYPTO_OPENSSL
|
||||
#undef OCSP_RESPONSE
|
||||
|
7
vlmcs.1
7
vlmcs.1
@ -1,5 +1,5 @@
|
||||
.mso www.tmac
|
||||
.TH VLMCS 1 "February 2015" "Hotbird64" "KMS Activation Manual"
|
||||
.TH VLMCS 1 "May 2016" "Hotbird64" "KMS Activation Manual"
|
||||
.LO 1
|
||||
|
||||
.SH NAME
|
||||
@ -11,7 +11,7 @@ vlmcs \- a client for testing and/or charging KMS servers
|
||||
\fItarget\fR can be one of the following:
|
||||
.RS
|
||||
.PP
|
||||
\fIhostname\fR|\fIipaddress\fR[:\fItcp-port\fR] or to query a specific KMS server (example: vlmcs kms.example.com:1688).
|
||||
\fIhostname\fR|\fIipaddress\fR[:\fItcp-port\fR] to query a specific KMS server (example: vlmcs kms.example.com:1688).
|
||||
.br
|
||||
\fR.\fIdomain\fR to automatically detect KMS servers via DNS for \fIdomain\fR (example: vlmcs .example.com). Please note the dot before \fIdomain\fR.
|
||||
.br
|
||||
@ -44,6 +44,9 @@ can also be used to "charge" a KMS server. A Microsoft KMS server sends correct
|
||||
.IP "\fB-h\fR or \fB-?"
|
||||
Show help.
|
||||
|
||||
.IP "\fB-V\fR"
|
||||
Displays extended version information. This includes the compiler used to build vlmcs, the intended platform and flags (compile time options) to build vlmcs. If you have the source code of vlmcsd, you can type \fBmake help\fR (or \fBgmake help\fR on systems that do not use the GNU version of \fBmake\fR(1) by default) to see the meaning of those flags.
|
||||
|
||||
.IP \fB-x
|
||||
Show valid
|
||||
.IR application s
|
||||
|
@ -11,7 +11,7 @@ SYNOPSIS
|
||||
|
||||
target can be one of the following:
|
||||
|
||||
hostname|ipaddress[:tcp-port] or to query a specific KMS server
|
||||
hostname|ipaddress[:tcp-port] to query a specific KMS server
|
||||
(example: vlmcs kms.example.com:1688).
|
||||
.domain to automatically detect KMS servers via DNS for domain
|
||||
(example: vlmcs .example.com). Please note the dot before
|
||||
@ -52,6 +52,14 @@ OPTIONS
|
||||
Show help.
|
||||
|
||||
|
||||
-V Displays extended version information. This includes the com‐
|
||||
piler used to build vlmcs, the intended platform and flags (com‐
|
||||
pile time options) to build vlmcs. If you have the source code
|
||||
of vlmcsd, you can type make help (or gmake help on systems that
|
||||
do not use the GNU version of make(1) by default) to see the
|
||||
meaning of those flags.
|
||||
|
||||
|
||||
-x Show valid applications that can be used with -l.
|
||||
|
||||
|
||||
@ -302,4 +310,4 @@ SEE ALSO
|
||||
|
||||
|
||||
|
||||
Hotbird64 February 2015 VLMCS(1)
|
||||
Hotbird64 May 2016 VLMCS(1)
|
||||
|
21
vlmcs.1.html
21
vlmcs.1.html
@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Tue Mar 8 00:06:21 2016 -->
|
||||
<!-- CreationDate: Fri Jun 17 14:16:33 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@ -55,7 +55,7 @@ can be one of the following:</p>
|
||||
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em"><i>hostname</i>|<i>ipaddress</i>[:<i>tcp-port</i>]
|
||||
or to query a specific KMS server (example: vlmcs
|
||||
to query a specific KMS server (example: vlmcs
|
||||
kms.example.com:1688). <br>
|
||||
.<i>domain</i> to automatically detect KMS servers via DNS
|
||||
for <i>domain</i> (example: vlmcs .example.com). Please note
|
||||
@ -121,6 +121,23 @@ server in a home environment.</p>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-V</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>Displays extended version information. This includes the
|
||||
compiler used to build vlmcs, the intended platform and
|
||||
flags (compile time options) to build vlmcs. If you have the
|
||||
source code of vlmcsd, you can type <b>make help</b> (or
|
||||
<b>gmake help</b> on systems that do not use the GNU version
|
||||
of <b>make</b>(1) by default) to see the meaning of those
|
||||
flags.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-x</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="78%">
|
||||
|
BIN
vlmcs.1.pdf
BIN
vlmcs.1.pdf
Binary file not shown.
@ -11,7 +11,7 @@ SYNOPSIS
|
||||
|
||||
target can be one of the following:
|
||||
|
||||
hostname|ipaddress[:tcp-port] or to query a specific KMS server
|
||||
hostname|ipaddress[:tcp-port] to query a specific KMS server
|
||||
(example: vlmcs kms.example.com:1688).
|
||||
.domain to automatically detect KMS servers via DNS for domain
|
||||
(example: vlmcs .example.com). Please note the dot before
|
||||
@ -52,6 +52,14 @@ OPTIONS
|
||||
Show help.
|
||||
|
||||
|
||||
-V Displays extended version information. This includes the com‐
|
||||
piler used to build vlmcs, the intended platform and flags (com‐
|
||||
pile time options) to build vlmcs. If you have the source code
|
||||
of vlmcsd, you can type make help (or gmake help on systems that
|
||||
do not use the GNU version of make(1) by default) to see the
|
||||
meaning of those flags.
|
||||
|
||||
|
||||
-x Show valid applications that can be used with -l.
|
||||
|
||||
|
||||
@ -302,4 +310,4 @@ SEE ALSO
|
||||
|
||||
|
||||
|
||||
Hotbird64 February 2015 VLMCS(1)
|
||||
Hotbird64 May 2016 VLMCS(1)
|
||||
|
49
vlmcs.c
49
vlmcs.c
@ -46,7 +46,10 @@ static void CreateRequestBase(REQUEST *Request);
|
||||
|
||||
|
||||
// KMS Parameters
|
||||
#ifndef NO_VERBOSE_LOG
|
||||
static int_fast8_t verbose = FALSE;
|
||||
#endif
|
||||
|
||||
static int_fast8_t VMInfo = FALSE;
|
||||
static int_fast8_t dnsnames = TRUE;
|
||||
static int FixedRequests = 0;
|
||||
@ -160,7 +163,9 @@ __noreturn static void clientUsage(const char* const programName)
|
||||
|
||||
"Options:\n\n"
|
||||
|
||||
# ifndef NO_VERBOSE_LOG
|
||||
" -v Be verbose\n"
|
||||
# endif
|
||||
" -l <app>\n"
|
||||
" -4 Force V4 protocol\n"
|
||||
" -5 Force V5 protocol\n"
|
||||
@ -170,7 +175,8 @@ __noreturn static void clientUsage(const char* const programName)
|
||||
# endif // USE_MSRPC
|
||||
" -e Show some valid examples\n"
|
||||
" -x Show valid Apps\n"
|
||||
" -d no DNS names, use Netbios names (no effect if -w is used)\n\n"
|
||||
" -d no DNS names, use Netbios names (no effect if -w is used)\n"
|
||||
" -V show version information and exit\n\n"
|
||||
|
||||
"Advanced options:\n\n"
|
||||
|
||||
@ -420,7 +426,7 @@ static BOOL findLicensePackByName(const char* const name, LicensePack* const lp)
|
||||
#endif // Both Lists are available
|
||||
}
|
||||
|
||||
static const char* const client_optstring = "+N:B:i:l:a:s:k:c:w:r:n:t:g:G:o:pPTv456mexd";
|
||||
static const char* const client_optstring = "+N:B:i:l:a:s:k:c:w:r:n:t:g:G:o:pPTv456mexdV";
|
||||
|
||||
|
||||
//First pass. We handle only "-l". Since -a -k -s -4 -5 and -6 are exceptions to -l, we process -l first
|
||||
@ -584,11 +590,15 @@ static void parseCommandLinePass2(const char *const programName, const int argc,
|
||||
dnsnames = FALSE;
|
||||
break;
|
||||
|
||||
# ifndef NO_VERBOSE_LOG
|
||||
|
||||
case 'v': // Be verbose
|
||||
|
||||
verbose = TRUE;
|
||||
break;
|
||||
|
||||
# endif // NO_VERBOSE_LOG
|
||||
|
||||
case 'm': // Pretend to be a virtual machine
|
||||
|
||||
VMInfo = TRUE;
|
||||
@ -623,6 +633,21 @@ static void parseCommandLinePass2(const char *const programName, const int argc,
|
||||
incompatibleOptions |= VLMCS_OPTION_NO_GRAB_INI;
|
||||
break;
|
||||
|
||||
# ifndef NO_VERSION_INFORMATION
|
||||
|
||||
case 'V':
|
||||
# if defined(__s390__) && !defined(__zarch__) && !defined(__s390x__)
|
||||
printf("vlmcs %s %i-bit\n", Version, sizeof(void*) == 4 ? 31 : (int)sizeof(void*) << 3);
|
||||
# else
|
||||
printf("vlmcs %s %i-bit\n", Version, (int)sizeof(void*) << 3);
|
||||
# endif // defined(__s390__) && !defined(__zarch__) && !defined(__s390x__)
|
||||
printPlatform();
|
||||
printCommonFlags();
|
||||
printClientFlags();
|
||||
exit(0);
|
||||
|
||||
# endif // NO_VERSION_INFORMATION
|
||||
|
||||
default:
|
||||
clientUsage(programName);
|
||||
}
|
||||
@ -651,8 +676,10 @@ static void checkRpcLevel(const REQUEST* request, RESPONSE* response)
|
||||
if (UseRpcBTFN && UseRpcNDR64 && RpcFlags.HasNDR64 && !RpcFlags.HasBTFN)
|
||||
errorout("\nWARNING: Server's RPC protocol has NDR64 but no BTFN.\n");
|
||||
|
||||
# ifndef NO_BASIC_PRODUCT_LIST
|
||||
if (!IsEqualGuidLEHE(&request->KMSID, &ProductList[15].guid) && UseRpcBTFN && !RpcFlags.HasBTFN)
|
||||
errorout("\nWARNING: A server with pre-Vista RPC activated a product other than Office 2010.\n");
|
||||
# endif // NO_BASIC_PRODUCT_LIST
|
||||
}
|
||||
#endif // USE_MSRPC
|
||||
|
||||
@ -690,7 +717,9 @@ static void displayResponse(const RESPONSE_RESULT result, const REQUEST* request
|
||||
}
|
||||
|
||||
// Read KMSPID from Response
|
||||
# ifndef NO_VERBOSE_LOG
|
||||
if (!verbose)
|
||||
# endif // NO_VERBOSE_LOG
|
||||
{
|
||||
printf(" -> %s", ePID);
|
||||
|
||||
@ -705,6 +734,7 @@ static void displayResponse(const RESPONSE_RESULT result, const REQUEST* request
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
# ifndef NO_VERBOSE_LOG
|
||||
else
|
||||
{
|
||||
printf(
|
||||
@ -715,6 +745,7 @@ static void displayResponse(const RESPONSE_RESULT result, const REQUEST* request
|
||||
logResponseVerbose(ePID, hwid, response, &printf);
|
||||
printf("\n");
|
||||
}
|
||||
# endif // NO_VERBOSE_LOG
|
||||
}
|
||||
|
||||
|
||||
@ -760,6 +791,7 @@ static void connectRpc(RpcCtx *s)
|
||||
|
||||
if (!NoSrvRecordPriority) sortSrvRecords(serverlist, numServers);
|
||||
|
||||
# ifndef NO_VERBOSE_LOG
|
||||
if (verbose /*&& !ServerListAlreadyPrinted*/)
|
||||
{
|
||||
for (i = 0; i < numServers; i++)
|
||||
@ -775,6 +807,7 @@ static void connectRpc(RpcCtx *s)
|
||||
printf("\n");
|
||||
//ServerListAlreadyPrinted = TRUE;
|
||||
}
|
||||
# endif // NO_VERBOSE_LOG
|
||||
}
|
||||
else // Just use the server supplied on the command line
|
||||
{
|
||||
@ -794,16 +827,21 @@ static void connectRpc(RpcCtx *s)
|
||||
|
||||
if (*s == INVALID_RPCCTX) continue;
|
||||
|
||||
if (verbose)
|
||||
printf("\nPerforming RPC bind ...\n");
|
||||
# ifndef NO_VERBOSE_LOG
|
||||
if (verbose) printf("\nPerforming RPC bind ...\n");
|
||||
|
||||
if (rpcBindClient(*s, verbose))
|
||||
# else
|
||||
if (rpcBindClient(*s, FALSE))
|
||||
# endif
|
||||
{
|
||||
errorout("Warning: Could not bind RPC\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
# ifndef NO_VERBOSE_LOG
|
||||
if (verbose) printf("... successful\n");
|
||||
# endif
|
||||
|
||||
return;
|
||||
}
|
||||
@ -1298,13 +1336,14 @@ static void CreateRequestBase(REQUEST *Request)
|
||||
Request->WorkstationName[size] = 0;
|
||||
}
|
||||
|
||||
//Show Details
|
||||
# ifndef NO_VERBOSE_LOG
|
||||
if (verbose)
|
||||
{
|
||||
printf("\nRequest Parameters\n==================\n\n");
|
||||
logRequestVerbose(Request, &printf);
|
||||
printf("\n");
|
||||
}
|
||||
# endif // NO_VERBOSE_LOG
|
||||
}
|
||||
|
||||
|
||||
|
6525
vlmcs_all.c
6525
vlmcs_all.c
File diff suppressed because it is too large
Load Diff
292
vlmcsd-floppy.7
Normal file
292
vlmcsd-floppy.7
Normal file
@ -0,0 +1,292 @@
|
||||
.mso www.tmac
|
||||
.TH "VLMCSD-FLOPPY" 7 "June 2016" "Hotbird64" "KMS Activation Manual"
|
||||
.LO 8
|
||||
|
||||
.SH NAME
|
||||
floppy144.vfd \- a bootable floppy disk with Linux and \fBvlmcsd\fR(8)
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBfloppy144.vfd\fR is an image of a bootable floppy that contains a minimal version of Linux and \fBvlmcsd\fR(8). It requires only 16 MB of RAM. Its primary purpose is to run \fBvlmcsd\fR(8) in a small virtual machine which makes it easy to use \fBvlmcsd\fR(8) to activate the virtual machine's host computer which is not possible in Windows 8.1 and up. The floppy image is a standard 3,5" floppy with 1.44 MB storage. It is formatted with a FAT12 filesystem. The floppy can be mounted to apply several customizations.
|
||||
|
||||
.SH SUPPORTED HYPERVISORS
|
||||
The floppy image has been tested with the following hypervisors:
|
||||
.IP
|
||||
VMWare, VirtualBox, Hyper-V and QEMU
|
||||
|
||||
.RE
|
||||
Others are likely to work.
|
||||
|
||||
.SH SETUP
|
||||
Create a new virtual machine. Assign 16 MB of RAM. Add a floppy drive and attach \fBfloppy144.vfd\fR to this drive. Do not create a virtual hard disk. Setup the virtual machine to boot from a floppy drive (VirtualBox has floppy boot disabled by default). If possible, setup a virtual machine with plain old BIOS (not UEFI). If you created an UEFI virtual machine, enable the compatibility support mode (CSM) to allow a BIOS compatible boot. Set number of CPUs to 1. The Linux kernel is not capable of SMP. Remove IDE, SATA, SCSI and USB support if possible. The Linux kernel can't handle this and ignores any devices connected to these buses.
|
||||
|
||||
Setup an ethernet card. The following models are supported:
|
||||
.IP
|
||||
Intel PRO/1000
|
||||
.br
|
||||
AMD PCNET III
|
||||
.br
|
||||
AMD PCNET32
|
||||
.br
|
||||
VMWare vmxnet3 (paravirtualized driver used by VMWare)
|
||||
.br
|
||||
virtio (paravirtualized driver used by VirtualBox, QEMU, KVM and lguest)
|
||||
|
||||
.RE
|
||||
Most hypervisors emulate an Intel PRO/1000 or AMD PCNET32 by default. Selecting a paravirtualized driver slightly improves performance. In VirtualBox you can simply select virtio in the network configuration dialog. VMWare requires that you add or change the VMX file. Use 'ethernet0.virtualDev\ =\ "vmxnet3"' in your VMWare config file.
|
||||
|
||||
If you are using QEMU, you must also setup a TAP adapter. Port redirection does not work to activate your own computer.
|
||||
|
||||
.SH CONFIGURATION
|
||||
\fBfloppy144.vfd\fR can be customized to fit your needs. This is done by editing the file syslinux.cfg on the floppy image. The floppy image must be mounted. Under Linux you can simply attach \fBfloppy144.vfd\fR to a loop device which is mountable like any other block device. For Windows you must use some software that allows mounting a floppy image, e.g.
|
||||
.URL http://www.osforensics.com/tools/mount-disk-images.html OSFMount ""
|
||||
|
||||
OSFMount works under all Windows versions beginning with Windows XP up to Windows 10 (32- and 64-bit).
|
||||
|
||||
The default syslinux.cfg file looks like this:
|
||||
.IP
|
||||
.br
|
||||
.SM
|
||||
prompt 0
|
||||
.br
|
||||
.SM
|
||||
TIMEOUT 50
|
||||
.br
|
||||
.SM
|
||||
default dhcp
|
||||
.br
|
||||
|
||||
.SM
|
||||
LABEL dhcp
|
||||
.br
|
||||
.SM
|
||||
\0\0KERNEL bzImage
|
||||
.br
|
||||
.SM
|
||||
\0\0APPEND vga=773 quiet initrd=initrd KBD=us LISTEN=[::]:1688,0.0.0.0:1688 TZ=UTC0 IPV4_CONFIG=DHCP NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd INETD=Y WINDOWS=06401-00206-271-395032-03-1033-9600.0000-1652016 OFFICE2010=06401-00096-199-204970-03-1033-9600.0000-1652016 OFFICE2013=06401-00206-234-921934-03-1033-9600.0000-1652016 HWID=36:4F:46:3A:88:63:D3:5F
|
||||
|
||||
.SM
|
||||
LABEL static
|
||||
.br
|
||||
.SM
|
||||
\0\0KERNEL bzImage
|
||||
.br
|
||||
.SM
|
||||
\0\0APPEND vga=773 quiet initrd=initrd KBD=fr LISTEN=[::]:1688,0.0.0.0:1688 TZ=CET-1CEST,M3.5.0,M10.5.0/3 IPV4_CONFIG=STATIC IPV4_ADDRESS=192.168.20.123/24 IPV4_GATEWAY=192.168.20.2 IPV4_DNS1=192.168.20.2 IPV4_DNS2=NONE NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd INETD=Y
|
||||
|
||||
.PP
|
||||
There are two configurations in this files: \fIdhcp\fR (for configuring the IPv4 network via DHCP) and \fIstatic\fR (for a static IPv4 configuration). The kernel always boots the \fIdhcp\fR configuration without asking (lines 'prompt 0' and 'default dhcp'). You can simply change the default configuration to \fIstatic\fR and then customize the APPEND line in the \fIstatic\fR configuration. For more details how to customize the syslinux.cfg file see \fBsyslinux\fR(1).
|
||||
|
||||
Each APPPEND line contains one or more items seperated by spaces. \fBAll items are case-sensitive\fR. The following parameters can be customized:
|
||||
|
||||
.IP \fBvga=\fIvesa-video-mode\fR
|
||||
Sets the VESA display mode for the virtual machine. The parameter is not optional. If you ommit it, you will not see anything on the screen. 773 means 1024x768 with 256 colors. See
|
||||
.URL https://en.wikipedia.org/wiki/VESA_BIOS_Extensions#Linux_video_mode_numbers Wikipedia ""
|
||||
for more video modes. Note that all 16 color (4-bit) modes will not work. Use 8-bit (256 colors), 16-bit (65536 colors), 24-bit and 32-bit (> 16 Million colors) only. All modes above 1280x1024 are non-VESA-standard and vary for all (virtual) graphic cards.
|
||||
|
||||
.IP \fBquiet\fR
|
||||
This causes the kernel not display the its log during boot. You may omit \fBquiet\fR but it doesn't make much sense. The boot log is actually very verbose and scrolls away from screen quickly. If any errors occur during boot, they will be displayed even if \fBquiet\fR is present in the APPEND line. You may evaluate the complete boot log later by using the dmesg command or the menu on /dev/tty8.
|
||||
|
||||
.IP "\fBinitrd=\fIinitial-ram-disk-file\fR"
|
||||
This defines the initial ram disk that the kernel will read. There is only one initial ram disk on the floppy thus leave \fIinitrd=initrd\fR as it is.
|
||||
|
||||
.IP "\fBKBD=\fIkeyboard-layout-name\fR"
|
||||
This allows you to select the keyboard layout. \fIkeyboard-layout-name\fR is usually the ISO 3166-1 (top level domain) code for a country. A list of valid \fIkeyboard-layout-name\fRs can be accessed via the menu system on /dev/tty8 (press ALT-F8). Note, that this is a keyboard driver only. There is no Unicode font support in \fBfloppy144.vfd\fR (due to the fact that the kernel uses a generic VESA framebuffer device only). Characters beyond ASCII work for Western European languages only but not Eastern European, Greek, Cyrillic, Arabic, Hebrew, CJK and other languages. There is no need in \fBfloppy144.vfd\fR to enter any characters outside ASCII. The purpose of the keyboard maps are that you will find characters like dash, backslash, brackets, braces, etc. at the usual place on your keyboard.
|
||||
|
||||
.IP "\fBLISTEN=\fRPRIVATE[:\fItcp-port\fR] | \fIip-address\fR[:\fItcp-port\fR][,\fIip-address\fR[:\fItcp-port\fR]][,...]"
|
||||
One or more combinations of IP addresses and optional TCP port seperated by commas that \fBvlmcsd\fR(8) should listen on or PRIVATE to listen on all private IP addresses only. The default port is 1688. If you use an explicit port number, append it to the IP address seperated by a colon. If you use a port number and the IP address contains colons, you must enclose the IP address in brackets. For example \fI192.168.0.2,[fd00::dead:beef]:5678\fR causes \fBvlmcsd\fR(8) to listen on 192.168.0.2 port 1688 and fd00::dead:beef port 5678.
|
||||
|
||||
.IP "\fBWINDOWS=\fIepid\fR"
|
||||
Defines the ePID that is used for Windows activations. If you ommit this parameter, vlmcsd generates a random ePID when it is started.
|
||||
|
||||
.IP "\fBOFFICE2010=\fIepid\fR"
|
||||
Defines the ePID that is used for Office 2010 activations. If you ommit this parameter, \fBvlmcsd\fR(8) generates a random ePID when it is started.
|
||||
|
||||
.IP "\fBOFFICE2013=\fIepid\fR"
|
||||
Defines the ePID that is used for Office (versions 2013 and greater) activations. If you ommit this parameter, \fBvlmcsd\fR(8) generates a random ePID when it is started.
|
||||
|
||||
.IP "\fBHWID=\fIhwid\fR"
|
||||
Defines the HwId that is sent to clients. \fIhwid\fR must be specified as 16 hex digits that are interpreted as a series of 8 bytes (big endian). Any character that is not a hex digit will be ignored. This is for better readability.
|
||||
|
||||
.IP "\fBTZ=\fIposix-time-zone-string\fR"
|
||||
Set the time zone to \fIposix-time-zone-string\fR. It must conform to the
|
||||
.URL http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html POSIX
|
||||
specification. Simplified time zone strings like "Europe/London" or "America/Detroit" are not allowed. This has the very simple reason that there is no space on the floppy to store the time zone database.
|
||||
|
||||
The string \fICET-1CEST,M3.5.0,M10.5.0/3\fR (most countries in Europe) reads as follows:
|
||||
.RS 7
|
||||
.IP \fICET\fR 10
|
||||
The standard (winter) time zone has the name CET.
|
||||
.IP \fI-1\fR 10
|
||||
The standard time zone is one hour east of UTC. Negative numbers are east of UTC. Positive numbers are west of UTC.
|
||||
.IP \fICEST\fR 10
|
||||
The daylight saving (summer) time zone has the name CEST.
|
||||
.IP \fIM3.5.0\fR 10
|
||||
Daylight saving time starts in the 3rd month (March) on the 5th (=last) occurence of weekday 0 (Sunday) at 2 o'clock (2 o'clock is a default value).
|
||||
.IP \fIM10.5.0/3\fR 10
|
||||
Daylight saving time ends in the 10th month (October) on the 5th (=last) occurence of weekday 0 (Sunday) at 3 o'clock.
|
||||
.RE
|
||||
.IP
|
||||
If you don't have daylight saving time, things are easier. For Chinese Standard Time for example, just use \fICST-8\fR as the time zone string.
|
||||
|
||||
On a Linux desktop system, you can use a command like \fBstrings\ /usr/share/zoneinfo/America/New_York\ |\ tail\ -n1\fR. This should return \fIEST5EDT,M3.2.0,M11.1.0\fR. You can use the returned string for the \fBTZ=\fIposix-time-zone-string\fR parameter.
|
||||
|
||||
.IP "\fBIPV4_CONFIG=\fRDHCP | STATIC\fR"
|
||||
This determines how you want to configure IPv4 networking. If you use \fBIPV4_CONFIG=\fRSTATIC, you must supply additional paramaters to the APPEND command line.
|
||||
|
||||
.IP "\fBIPV4_ADDRESS=\fIipv4-address\fR/\fICIDR-mask\fR"
|
||||
Use \fIipv4-address\fR with netmask \fICIDR-mask\fR for static IPv4 configuration. The netmask must not be ommitted. For IPv4 address 192.168.12.17 with a netmask of 255.255.255.0 use \fI192.168.12.17/24\fR. For IPv4 address 10.4.0.8 with a netmask of 255.255.0.0 use 10.4.0.8/16. This paramater is ignored, if you used \fBIPV4_CONFIG=\fRDHCP.
|
||||
|
||||
.IP "\fBIPV4_GATEWAY=\fIipv4-address\fR | NONE"
|
||||
Use \fIipv4-address\fR as the default gateway. This is usually the IPv4 address of your router. You may specify NONE explicitly for no gateway. In this case your virtual machine is only visible on its local LAN. This paramater is ignored, if you used \fBIPV4_CONFIG=\fRDHCP.
|
||||
|
||||
.IP "\fBIPV4_DNS1=\fIipv4-address\fR | NONE"
|
||||
Use \fIipv4-address\fR as the primary name server. In home networks this is often the IPv4 address of your router. You may specify NONE explicitly. If you specified NONE for both \fBIPV4_DNS1=\fR and \fBIPV4_DNS2=\fR, your virtual machine cannot resolve host names to IP addresses. While \fBvlmcsd\fR(8) works perfectly without DNS servers, you must use IP addresses when referring to a host, e.g. for specifying an NTP server. This paramater is ignored, if you used \fBIPV4_CONFIG=\fRDHCP.
|
||||
|
||||
.IP "\fBIPV4_DNS2=\fIipv4-address\fR | NONE"
|
||||
Use \fIipv4-address\fR as the secondary name server. It serves as a backup if the primary name server is not available. Home networks often don't have a secondary name server. In this case set this to NONE. This paramater is ignored, if you used \fBIPV4_CONFIG=\fRDHCP.
|
||||
|
||||
.IP "\fBNTP_SERVER=\fIhost-name\fR | \fIipv4-address\fR | NONE"
|
||||
This sets the name of a time server using the NTP protocol. If your virtualization environment reliably provides time, you can set this to NONE. Don't use a public time service like pool.ntp.org or time.nist.gov if you have a (at least somewhat reliable) NTP server in your LAN.
|
||||
|
||||
.IP "\fBHOST_NAME=\fIhost-name\fR"
|
||||
Sets the local host name for your virtual machine. It can be a single name or a fully-qualified domain name FQDN. If you used \fBIPV4_CONFIG=\fRDHCP and your DHCP server returns a domain name, the domain part of an FQDN will be replaced by that name. This host name or host part of an FQDN will not replaced by a host name returned via DHCP. The host name is not important for the operation of \fBfloppy144.vfd\fR.
|
||||
|
||||
.IP "\fBROOT_PASSWORD=\fIpassword\fR"
|
||||
Sets the password of the root user.
|
||||
|
||||
.IP "\fBUSER_NAME=\fIusername\fR"
|
||||
Sets the name of for a general user with no special privileges. This user can login but can't do much.
|
||||
|
||||
.IP "\fBUSER_PASSWORD=\fIpassword\fR"
|
||||
Sets the password for the user defined by \fBUSER_NAME=\fIusername\fR.
|
||||
|
||||
.IP "\fBGUEST_PASSWORD=\fIpassword\fR"
|
||||
Sets the password for the pre-defined guest user. This user has the same priviliges (none) as the user defined by \fBUSER_NAME=\fIusername\fR.
|
||||
|
||||
.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.
|
||||
|
||||
.SH OPERATION
|
||||
|
||||
.SS Diskless System
|
||||
The \fBfloppy144.vfd\fR virtual machine is a diskless system that works entirely from RAM. The file system is actually a RAM disk that is created from the \fBinitrd\fR(4) file on the floppy image.
|
||||
|
||||
Anything you'll do from inside the virtual machine, for instance editing a config file, will be lost when you reboot the machine. So, if you ever asked yourself if \fBrm -fr /\fR (root privileges required) really deletes all files from all mounted partitions, the \fBfloppy144.vfd\fR VM is the right place to test it (Yes, it does).
|
||||
|
||||
The VM uses a RAM disk, because the Linux kernel had to be stripped down to essential features to fit on a 1.44 MB floppy. It has no floppy driver, no disk file system drivers and no block layer (cannot use disks of any type).
|
||||
|
||||
.SS System startup
|
||||
The kernel boots up very quickly and the init script (/sbin/init) waits 5 seconds. In these 5 seconds you can:
|
||||
.IP
|
||||
Press 'm' to manually enter the time zone and the IPv4 parameters. These will be queried interactively.
|
||||
.br
|
||||
Press 't' to manually enter the time zone only.
|
||||
.br
|
||||
Press 's' to escape to a shell.
|
||||
.RE
|
||||
|
||||
If you don't want to 5 seconds for continuing the init process, you can press any other key to speed things up. At the end of the init script you should see that\fBvlmcsd\fR(8) has started. You should also see the IP addresses and all user names and passwords.
|
||||
|
||||
.SS Logging into the system
|
||||
There are 5 local logins provided on /dev/tty2 to /dev/tty6. To switch to these logins, simply press ALT\-F2 to ALT\-F6. To return to the console on /dev/tty1, press ALT\-F1. If \fBinetd\fR(8) is running you can also use \fBtelnet\fR(1). This allows you use a terminal program (e.g. putty) that can utilize your keyboard layout, can be resized and has full UTF-8 support. The local terminals support US keyboard layout only. Please be aware that \fBtelnet\fR(1) is unencrypted and everything including passwords is transmitted in clear text. There is not enough space for an ssh server like \fBsshd\fR(8) or \fBdropbear\fR(8).
|
||||
|
||||
The floppy image only provides basic Unix commands. Type \fIbusybox\fR or \fIll /bin\fR to get a list. The only editor available is \fBvi\fR(1). If you don't like vi, you may transfer config files via \fBftp\fR(1) edit them with the editor of your choice and transfer them back to the \fBfloppy144.vfd\fR VM.
|
||||
|
||||
.SS The menu system
|
||||
You'll find a menu system on /dev/tty8 (press ALT\-F8 to see it). It allows you performing some administrative tasks and to view various system information. It is mainly for users that do not have much experience with Unix commands.
|
||||
|
||||
.IP "\fB1) (Re)start vlmcsd\fR"
|
||||
Starts or restarts \fBvlmcsd\fR(8). This is useful if you changed \fB/etc/vlmcsd.ini\fR(5).
|
||||
|
||||
.IP "\fB2) Stop vlmcsd\fR"
|
||||
Stops \fBvlmcsd\fR(8).
|
||||
|
||||
.IP "\fB3) (Re)start inetd\fR"
|
||||
Starts or restarts \fBinetd\fR(8). If \fBinetd\fR(8) is restarted, current clients connected via \fBtelnet\fR(1) or \fBftp\fR(1) will \fBnot\fR be dropped. They can continue their sessions. This is useful if you changed \fB/etc/inetd.conf\fR(5).
|
||||
|
||||
.IP "\fB4) Stop inet\fR"
|
||||
Stops \fBinetd\fR(8). All clients connected via \fBtelnet\fR(1) or \fBftp\fR(1) will be dropped immediately.
|
||||
|
||||
.IP "\fB5) Change the time zone\fR"
|
||||
Just in case you missed pressing 't' during system startup. This also restarts \fBvlmcsd\fR(8) if it was running to notify it that the time zone has changed. Restarting \fBvlmcsd\fR(8) allows currently connected clients to finish their activation.
|
||||
|
||||
.IP "\fBk) Change keyboard layout\fR"
|
||||
This allows you to select a different keyboard layout.
|
||||
|
||||
.IP "\fB6) Show all kernel boot parameters\fR"
|
||||
Shows all parameters passed to the kernel via syslinux.cfg. If you experience any unexpected behavior, you can use this to check if your APPEND line in syslinux.cfg is correct. The output is piped through \fBless(1)\fR. So press 'q' to return to the menu.
|
||||
|
||||
.IP "\fB7) Show boot log (dmesg)\fR"
|
||||
Shows the boot log of the kernel. The output is piped through \fBless(1)\fR. So press 'q' to return to the menu.
|
||||
|
||||
.IP "\fB8) Show TCP/IP configuration\fR"
|
||||
Shows the TCP/IP configuration, listening sockets and current TCP and UDP connections. Useful, if you problems with net connectivity. The output is piped through \fBless(1)\fR. So press 'q' to return to the menu.
|
||||
|
||||
.IP "\fB9) Show running processes\fR"
|
||||
Shows all processes including memory and CPU usage. Display will updated every second. Press 'q' or CTRL-C to return to the menu.
|
||||
|
||||
.IP "\fBs) Shutdown\fR"
|
||||
Shuts down the \fBfloppy144.vfd\fR virtual machine. Proper shutdown is not required. It is ok to use a hard power off in your virtualization program.
|
||||
|
||||
.IP "\fBr) Reboot\fR"
|
||||
Reboots the \fBfloppy144.vfd\fR virtual machine. Proper reboot is not required. It is ok to use a hard reset in your virtualization program.
|
||||
|
||||
.SH PERMANENT CHANGES OF INITRD
|
||||
If you want to change any file or script of the file system (e.g. the init script /sbin/init or /etc/vlmcsd.ini), you'll need to mount the floppy image, unpack the \fBinitrd\fR(4) file, make any modfications you like, create a new \fBinitrd\fR(4) file and copy it to the mounted floppy.
|
||||
|
||||
To unpack the \fBinitrd\fR(4) file you'll need \fBxz\fR(1) (or \fBlzma\fR(1) on older unix-like OSses) and \fBcpio\fR(1). These can be installed using your package manager on all major distros. It is ok to use the BSD version of \fBcpio\fR(1). No need to get the GNU version for BSD users.
|
||||
Provided the floppy is mounted in /mnt/floppy do the following:
|
||||
.IP "Create an empty directory"
|
||||
mkdir ~/vlmcsd-floppy-initrd
|
||||
.IP "cd into that directory"
|
||||
cd ~/vlmcsd-floppy-initrd
|
||||
.IP "Unpack initrd"
|
||||
cat /mnt/floppy/initrd | unlzma | cpio -i
|
||||
|
||||
.RE
|
||||
After applying your changes build a new \fBinitrd\fR(4) file:
|
||||
|
||||
.IP "cd into your directory"
|
||||
cd ~/vlmcsd-floppy-initrd
|
||||
.IP "Create the packed file"
|
||||
find . | cpio -o -H newc | lzma > /mnt/floppy/initrd
|
||||
|
||||
.RE
|
||||
Do not try to use 'lzma -9' to achive better compression. The kernel can't read the resulting file. While customizing the \fBinitrd\fR(4) file works on almost any unix-like OS, it does not work on Windows even not with Cygwin. The reason is that the NTFS file system can't handle uids and gids. These cannot be preserved when unpacking the \fBcpio\fR(1) archive to NTFS. If you use the WSL subsystem of Windows 10 Redstone (Anniversary Update) and later, you must make sure to unpack the \fBinitrd\fR(4) file to a directory on VolFs (normally everything that is \fBnot\fR mounted under /mnt). The \fBinitrd\fR(4) file can be on a VolFs or DriveFs.
|
||||
|
||||
.SH FAQ
|
||||
.SS On what distro is the floppy image based?
|
||||
None. Besides the boot loader \fBldlinux.sys\fR, there are only three binaries: The Linux kernel \fBbzImage\fR, \fBbusybox\fR(1) and \fBvlmcsdmulti-x86-musl-static\fR. \fBbzImage\fR and \fBbusybox\fR(1) have been compiled with carefully selected configuration parameters not found in any distro. This was neccesary to fit everything on a 1.44 MB floppy.
|
||||
|
||||
.SS Why is a rather old Linux kernel (3.12) used?
|
||||
Linux 3.12 is the last kernel that can be booted with 16 MB of RAM. Beginning with Linux 3.13 it requires much more memory (about 80 MB) to boot. The floppy image is regularly tested with newer kernels. Everything works except that you need to assign much more main memory to the virtual machine.
|
||||
|
||||
.SS Can the floppy be booted on bare metal?
|
||||
Basically yes. However, only Intel Pro/1000 and AMD PCNET32 ethernet cards are supported by the kernel. In addition there is no USB support compiled into the kernel. That means you can only use an IBM AT or IBM PS/2 keyboard which are not available on newer hardware.
|
||||
|
||||
.SH FILES
|
||||
\fBsyslinux.cfg\fR, \fBvlmcsd.ini\fR(5)
|
||||
|
||||
.SH BUGS
|
||||
IPv6 cannot be configured with static or manual parameters.
|
||||
.br
|
||||
DHCPv6 is not supported.
|
||||
.br
|
||||
\'ip route add ...' does not work. Use 'route add ...' instead.
|
||||
|
||||
.SH AUTHOR
|
||||
\fBfloppy144.vfd\fR has been created by Hotbird64
|
||||
|
||||
.SH CREDITS
|
||||
Linus Torvalds et al. for the Linux kernel
|
||||
.br
|
||||
Erik Andersen et al. for the original uClibc
|
||||
.br
|
||||
Waldemar Brodkorb et al. for uClibc-ng
|
||||
.br
|
||||
Denys Vlasenko et al. for BusyBox
|
||||
.br
|
||||
H. Peter Anvin et al. for SYSLINUX
|
||||
|
||||
.SH SEE ALSO
|
||||
\fBvlmcsd\fR(8), \fBvlmcsd.ini\fR(5), \fBinitrd\fR(4), \fBbusybox\fR(1), \fBsyslinux(1)\fR
|
530
vlmcsd-floppy.7.dos.txt
Normal file
530
vlmcsd-floppy.7.dos.txt
Normal file
@ -0,0 +1,530 @@
|
||||
VLMCSD-FLOPPY(7) KMS Activation Manual VLMCSD-FLOPPY(7)
|
||||
|
||||
|
||||
|
||||
NAME
|
||||
floppy144.vfd - a bootable floppy disk with Linux and vlmcsd(8)
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
floppy144.vfd is an image of a bootable floppy that contains a minimal
|
||||
version of Linux and vlmcsd(8). It requires only 16 MB of RAM. Its pri‐
|
||||
mary purpose is to run vlmcsd(8) in a small virtual machine which makes
|
||||
it easy to use vlmcsd(8) to activate the virtual machine's host com‐
|
||||
puter which is not possible in Windows 8.1 and up. The floppy image is
|
||||
a standard 3,5" floppy with 1.44 MB storage. It is formatted with a
|
||||
FAT12 filesystem. The floppy can be mounted to apply several customiza‐
|
||||
tions.
|
||||
|
||||
|
||||
SUPPORTED HYPERVISORS
|
||||
The floppy image has been tested with the following hypervisors:
|
||||
|
||||
VMWare, VirtualBox, Hyper-V and QEMU
|
||||
|
||||
Others are likely to work.
|
||||
|
||||
|
||||
SETUP
|
||||
Create a new virtual machine. Assign 16 MB of RAM. Add a floppy drive
|
||||
and attach floppy144.vfd to this drive. Do not create a virtual hard
|
||||
disk. Setup the virtual machine to boot from a floppy drive (VirtualBox
|
||||
has floppy boot disabled by default). If possible, setup a virtual
|
||||
machine with plain old BIOS (not UEFI). If you created an UEFI virtual
|
||||
machine, enable the compatibility support mode (CSM) to allow a BIOS
|
||||
compatible boot. Set number of CPUs to 1. The Linux kernel is not capa‐
|
||||
ble of SMP. Remove IDE, SATA, SCSI and USB support if possible. The
|
||||
Linux kernel can't handle this and ignores any devices connected to
|
||||
these buses.
|
||||
|
||||
Setup an ethernet card. The following models are supported:
|
||||
|
||||
Intel PRO/1000
|
||||
AMD PCNET III
|
||||
AMD PCNET32
|
||||
VMWare vmxnet3 (paravirtualized driver used by VMWare)
|
||||
virtio (paravirtualized driver used by VirtualBox, QEMU, KVM and
|
||||
lguest)
|
||||
|
||||
Most hypervisors emulate an Intel PRO/1000 or AMD PCNET32 by default.
|
||||
Selecting a paravirtualized driver slightly improves performance. In
|
||||
VirtualBox you can simply select virtio in the network configuration
|
||||
dialog. VMWare requires that you add or change the VMX file. Use 'eth‐
|
||||
ernet0.virtualDev = "vmxnet3"' in your VMWare config file.
|
||||
|
||||
If you are using QEMU, you must also setup a TAP adapter. Port redi‐
|
||||
rection does not work to activate your own computer.
|
||||
|
||||
|
||||
CONFIGURATION
|
||||
floppy144.vfd can be customized to fit your needs. This is done by
|
||||
editing the file syslinux.cfg on the floppy image. The floppy image
|
||||
must be mounted. Under Linux you can simply attach floppy144.vfd to a
|
||||
loop device which is mountable like any other block device. For Windows
|
||||
you must use some software that allows mounting a floppy image, e.g.
|
||||
OSFMount ⟨http://www.osforensics.com/tools/mount-disk-images.html⟩
|
||||
|
||||
OSFMount works under all Windows versions beginning with Windows XP up
|
||||
to Windows 10 (32- and 64-bit).
|
||||
|
||||
The default syslinux.cfg file looks like this:
|
||||
|
||||
prompt 0
|
||||
TIMEOUT 50
|
||||
default dhcp
|
||||
|
||||
LABEL dhcp
|
||||
KERNEL bzImage
|
||||
APPEND vga=773 quiet initrd=initrd KBD=us LIS‐
|
||||
TEN=[::]:1688,0.0.0.0:1688 TZ=UTC0 IPV4_CONFIG=DHCP
|
||||
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
||||
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
||||
INETD=Y WINDOWS=06401-00206-271-395032-03-1033-9600.0000-1652016
|
||||
OFFICE2010=06401-00096-199-204970-03-1033-9600.0000-1652016
|
||||
OFFICE2013=06401-00206-234-921934-03-1033-9600.0000-1652016
|
||||
HWID=36:4F:46:3A:88:63:D3:5F
|
||||
|
||||
LABEL static
|
||||
KERNEL bzImage
|
||||
APPEND vga=773 quiet initrd=initrd KBD=fr LIS‐
|
||||
TEN=[::]:1688,0.0.0.0:1688 TZ=CET-1CEST,M3.5.0,M10.5.0/3
|
||||
IPV4_CONFIG=STATIC IPV4_ADDRESS=192.168.20.123/24 IPV4_GATE‐
|
||||
WAY=192.168.20.2 IPV4_DNS1=192.168.20.2 IPV4_DNS2=NONE
|
||||
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
||||
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
||||
INETD=Y
|
||||
|
||||
|
||||
There are two configurations in this files: dhcp (for configuring the
|
||||
IPv4 network via DHCP) and static (for a static IPv4 configuration).
|
||||
The kernel always boots the dhcp configuration without asking (lines
|
||||
'prompt 0' and 'default dhcp'). You can simply change the default con‐
|
||||
figuration to static and then customize the APPEND line in the static
|
||||
configuration. For more details how to customize the syslinux.cfg file
|
||||
see syslinux(1).
|
||||
|
||||
Each APPPEND line contains one or more items seperated by spaces. All
|
||||
items are case-sensitive. The following parameters can be customized:
|
||||
|
||||
|
||||
vga=vesa-video-mode
|
||||
Sets the VESA display mode for the virtual machine. The parame‐
|
||||
ter is not optional. If you ommit it, you will not see anything
|
||||
on the screen. 773 means 1024x768 with 256 colors. See Wikipedia
|
||||
⟨https://en.wikipedia.org/wiki/
|
||||
VESA_BIOS_Extensions#Linux_video_mode_numbers⟩ for more video
|
||||
modes. Note that all 16 color (4-bit) modes will not work. Use
|
||||
8-bit (256 colors), 16-bit (65536 colors), 24-bit and 32-bit (>
|
||||
16 Million colors) only. All modes above 1280x1024 are non-VESA-
|
||||
standard and vary for all (virtual) graphic cards.
|
||||
|
||||
|
||||
quiet This causes the kernel not display the its log during boot. You
|
||||
may omit quiet but it doesn't make much sense. The boot log is
|
||||
actually very verbose and scrolls away from screen quickly. If
|
||||
any errors occur during boot, they will be displayed even if
|
||||
quiet is present in the APPEND line. You may evaluate the com‐
|
||||
plete boot log later by using the dmesg command or the menu on
|
||||
/dev/tty8.
|
||||
|
||||
|
||||
initrd=initial-ram-disk-file
|
||||
This defines the initial ram disk that the kernel will read.
|
||||
There is only one initial ram disk on the floppy thus leave ini‐
|
||||
trd=initrd as it is.
|
||||
|
||||
|
||||
KBD=keyboard-layout-name
|
||||
This allows you to select the keyboard layout. keyboard-layout-
|
||||
name is usually the ISO 3166-1 (top level domain) code for a
|
||||
country. A list of valid keyboard-layout-names can be accessed
|
||||
via the menu system on /dev/tty8 (press ALT-F8). Note, that this
|
||||
is a keyboard driver only. There is no Unicode font support in
|
||||
floppy144.vfd (due to the fact that the kernel uses a generic
|
||||
VESA framebuffer device only). Characters beyond ASCII work for
|
||||
Western European languages only but not Eastern European, Greek,
|
||||
Cyrillic, Arabic, Hebrew, CJK and other languages. There is no
|
||||
need in floppy144.vfd to enter any characters outside ASCII. The
|
||||
purpose of the keyboard maps are that you will find characters
|
||||
like dash, backslash, brackets, braces, etc. at the usual place
|
||||
on your keyboard.
|
||||
|
||||
|
||||
LISTEN=PRIVATE[:tcp-port] | ip-address[:tcp-port][,ip-address[:tcp-
|
||||
port]][,...]
|
||||
One or more combinations of IP addresses and optional TCP port
|
||||
seperated by commas that vlmcsd(8) should listen on or PRIVATE
|
||||
to listen on all private IP addresses only. The default port is
|
||||
1688. If you use an explicit port number, append it to the IP
|
||||
address seperated by a colon. If you use a port number and the
|
||||
IP address contains colons, you must enclose the IP address in
|
||||
brackets. For example 192.168.0.2,[fd00::dead:beef]:5678 causes
|
||||
vlmcsd(8) to listen on 192.168.0.2 port 1688 and fd00::dead:beef
|
||||
port 5678.
|
||||
|
||||
|
||||
WINDOWS=epid
|
||||
Defines the ePID that is used for Windows activations. If you
|
||||
ommit this parameter, vlmcsd generates a random ePID when it is
|
||||
started.
|
||||
|
||||
|
||||
OFFICE2010=epid
|
||||
Defines the ePID that is used for Office 2010 activations. If
|
||||
you ommit this parameter, vlmcsd(8) generates a random ePID when
|
||||
it is started.
|
||||
|
||||
|
||||
OFFICE2013=epid
|
||||
Defines the ePID that is used for Office (versions 2013 and
|
||||
greater) activations. If you ommit this parameter, vlmcsd(8)
|
||||
generates a random ePID when it is started.
|
||||
|
||||
|
||||
HWID=hwid
|
||||
Defines the HwId that is sent to clients. hwid must be specified
|
||||
as 16 hex digits that are interpreted as a series of 8 bytes
|
||||
(big endian). Any character that is not a hex digit will be
|
||||
ignored. This is for better readability.
|
||||
|
||||
|
||||
TZ=posix-time-zone-string
|
||||
Set the time zone to posix-time-zone-string. It must conform to
|
||||
the POSIX ⟨http://pubs.opengroup.org/onlinepubs/009695399/
|
||||
basedefs/xbd_chap08.html⟩ specification. Simplified time zone
|
||||
strings like "Europe/London" or "America/Detroit" are not
|
||||
allowed. This has the very simple reason that there is no space
|
||||
on the floppy to store the time zone database.
|
||||
|
||||
The string CET-1CEST,M3.5.0,M10.5.0/3 (most countries in Europe)
|
||||
reads as follows:
|
||||
|
||||
CET The standard (winter) time zone has the name CET.
|
||||
|
||||
-1 The standard time zone is one hour east of UTC. Nega‐
|
||||
tive numbers are east of UTC. Positive numbers are
|
||||
west of UTC.
|
||||
|
||||
CEST The daylight saving (summer) time zone has the name
|
||||
CEST.
|
||||
|
||||
M3.5.0 Daylight saving time starts in the 3rd month (March)
|
||||
on the 5th (=last) occurence of weekday 0 (Sunday) at
|
||||
2 o'clock (2 o'clock is a default value).
|
||||
|
||||
M10.5.0/3 Daylight saving time ends in the 10th month (October)
|
||||
on the 5th (=last) occurence of weekday 0 (Sunday) at
|
||||
3 o'clock.
|
||||
|
||||
If you don't have daylight saving time, things are easier. For
|
||||
Chinese Standard Time for example, just use CST-8 as the time
|
||||
zone string.
|
||||
|
||||
On a Linux desktop system, you can use a command like
|
||||
strings /usr/share/zoneinfo/America/New_York | tail -n1. This
|
||||
should return EST5EDT,M3.2.0,M11.1.0. You can use the returned
|
||||
string for the TZ=posix-time-zone-string parameter.
|
||||
|
||||
|
||||
IPV4_CONFIG=DHCP | STATIC
|
||||
This determines how you want to configure IPv4 networking. If
|
||||
you use IPV4_CONFIG=STATIC, you must supply additional para‐
|
||||
maters to the APPEND command line.
|
||||
|
||||
|
||||
IPV4_ADDRESS=ipv4-address/CIDR-mask
|
||||
Use ipv4-address with netmask CIDR-mask for static IPv4 configu‐
|
||||
ration. The netmask must not be ommitted. For IPv4 address
|
||||
192.168.12.17 with a netmask of 255.255.255.0 use
|
||||
192.168.12.17/24. For IPv4 address 10.4.0.8 with a netmask of
|
||||
255.255.0.0 use 10.4.0.8/16. This paramater is ignored, if you
|
||||
used IPV4_CONFIG=DHCP.
|
||||
|
||||
|
||||
IPV4_GATEWAY=ipv4-address | NONE
|
||||
Use ipv4-address as the default gateway. This is usually the
|
||||
IPv4 address of your router. You may specify NONE explicitly for
|
||||
no gateway. In this case your virtual machine is only visible on
|
||||
its local LAN. This paramater is ignored, if you used IPV4_CON‐
|
||||
FIG=DHCP.
|
||||
|
||||
|
||||
IPV4_DNS1=ipv4-address | NONE
|
||||
Use ipv4-address as the primary name server. In home networks
|
||||
this is often the IPv4 address of your router. You may specify
|
||||
NONE explicitly. If you specified NONE for both IPV4_DNS1= and
|
||||
IPV4_DNS2=, your virtual machine cannot resolve host names to IP
|
||||
addresses. While vlmcsd(8) works perfectly without DNS servers,
|
||||
you must use IP addresses when referring to a host, e.g. for
|
||||
specifying an NTP server. This paramater is ignored, if you used
|
||||
IPV4_CONFIG=DHCP.
|
||||
|
||||
|
||||
IPV4_DNS2=ipv4-address | NONE
|
||||
Use ipv4-address as the secondary name server. It serves as a
|
||||
backup if the primary name server is not available. Home net‐
|
||||
works often don't have a secondary name server. In this case set
|
||||
this to NONE. This paramater is ignored, if you used IPV4_CON‐
|
||||
FIG=DHCP.
|
||||
|
||||
|
||||
NTP_SERVER=host-name | ipv4-address | NONE
|
||||
This sets the name of a time server using the NTP protocol. If
|
||||
your virtualization environment reliably provides time, you can
|
||||
set this to NONE. Don't use a public time service like
|
||||
pool.ntp.org or time.nist.gov if you have a (at least somewhat
|
||||
reliable) NTP server in your LAN.
|
||||
|
||||
|
||||
HOST_NAME=host-name
|
||||
Sets the local host name for your virtual machine. It can be a
|
||||
single name or a fully-qualified domain name FQDN. If you used
|
||||
IPV4_CONFIG=DHCP and your DHCP server returns a domain name, the
|
||||
domain part of an FQDN will be replaced by that name. This host
|
||||
name or host part of an FQDN will not replaced by a host name
|
||||
returned via DHCP. The host name is not important for the opera‐
|
||||
tion of floppy144.vfd.
|
||||
|
||||
|
||||
ROOT_PASSWORD=password
|
||||
Sets the password of the root user.
|
||||
|
||||
|
||||
USER_NAME=username
|
||||
Sets the name of for a general user with no special privileges.
|
||||
This user can login but can't do much.
|
||||
|
||||
|
||||
USER_PASSWORD=password
|
||||
Sets the password for the user defined by USER_NAME=username.
|
||||
|
||||
|
||||
GUEST_PASSWORD=password
|
||||
Sets the password for the pre-defined guest user. This user has
|
||||
the same priviliges (none) as the user defined by
|
||||
USER_NAME=username.
|
||||
|
||||
|
||||
INETD=Y | N
|
||||
INETD=Y specifies that inetd(8) should automatically be started.
|
||||
That means you can telnet and ftp to your virtual machine.
|
||||
|
||||
|
||||
OPERATION
|
||||
Diskless System
|
||||
The floppy144.vfd virtual machine is a diskless system that works
|
||||
entirely from RAM. The file system is actually a RAM disk that is cre‐
|
||||
ated from the initrd(4) file on the floppy image.
|
||||
|
||||
Anything you'll do from inside the virtual machine, for instance edit‐
|
||||
ing a config file, will be lost when you reboot the machine. So, if you
|
||||
ever asked yourself if rm -fr / (root privileges required) really
|
||||
deletes all files from all mounted partitions, the floppy144.vfd VM is
|
||||
the right place to test it (Yes, it does).
|
||||
|
||||
The VM uses a RAM disk, because the Linux kernel had to be stripped
|
||||
down to essential features to fit on a 1.44 MB floppy. It has no floppy
|
||||
driver, no disk file system drivers and no block layer (cannot use
|
||||
disks of any type).
|
||||
|
||||
|
||||
System startup
|
||||
The kernel boots up very quickly and the init script (/sbin/init) waits
|
||||
5 seconds. In these 5 seconds you can:
|
||||
|
||||
Press 'm' to manually enter the time zone and the IPv4 parame‐
|
||||
ters. These will be queried interactively.
|
||||
Press 't' to manually enter the time zone only.
|
||||
Press 's' to escape to a shell.
|
||||
|
||||
If you don't want to 5 seconds for continuing the init process, you can
|
||||
press any other key to speed things up. At the end of the init script
|
||||
you should see thatvlmcsd(8) has started. You should also see the IP
|
||||
addresses and all user names and passwords.
|
||||
|
||||
|
||||
Logging into the system
|
||||
There are 5 local logins provided on /dev/tty2 to /dev/tty6. To switch
|
||||
to these logins, simply press ALT-F2 to ALT-F6. To return to the con‐
|
||||
sole on /dev/tty1, press ALT-F1. If inetd(8) is running you can also
|
||||
use telnet(1). This allows you use a terminal program (e.g. putty) that
|
||||
can utilize your keyboard layout, can be resized and has full UTF-8
|
||||
support. The local terminals support US keyboard layout only. Please be
|
||||
aware that telnet(1) is unencrypted and everything including passwords
|
||||
is transmitted in clear text. There is not enough space for an ssh
|
||||
server like sshd(8) or dropbear(8).
|
||||
|
||||
The floppy image only provides basic Unix commands. Type busybox or ll
|
||||
/bin to get a list. The only editor available is vi(1). If you don't
|
||||
like vi, you may transfer config files via ftp(1) edit them with the
|
||||
editor of your choice and transfer them back to the floppy144.vfd VM.
|
||||
|
||||
|
||||
The menu system
|
||||
You'll find a menu system on /dev/tty8 (press ALT-F8 to see it). It
|
||||
allows you performing some administrative tasks and to view various
|
||||
system information. It is mainly for users that do not have much expe‐
|
||||
rience with Unix commands.
|
||||
|
||||
|
||||
1) (Re)start vlmcsd
|
||||
Starts or restarts vlmcsd(8). This is useful if you changed
|
||||
/etc/vlmcsd.ini(5).
|
||||
|
||||
|
||||
2) Stop vlmcsd
|
||||
Stops vlmcsd(8).
|
||||
|
||||
|
||||
3) (Re)start inetd
|
||||
Starts or restarts inetd(8). If inetd(8) is restarted, current
|
||||
clients connected via telnet(1) or ftp(1) will not be dropped.
|
||||
They can continue their sessions. This is useful if you changed
|
||||
/etc/inetd.conf(5).
|
||||
|
||||
|
||||
4) Stop inet
|
||||
Stops inetd(8). All clients connected via telnet(1) or ftp(1)
|
||||
will be dropped immediately.
|
||||
|
||||
|
||||
5) Change the time zone
|
||||
Just in case you missed pressing 't' during system startup. This
|
||||
also restarts vlmcsd(8) if it was running to notify it that the
|
||||
time zone has changed. Restarting vlmcsd(8) allows currently
|
||||
connected clients to finish their activation.
|
||||
|
||||
|
||||
k) Change keyboard layout
|
||||
This allows you to select a different keyboard layout.
|
||||
|
||||
|
||||
6) Show all kernel boot parameters
|
||||
Shows all parameters passed to the kernel via syslinux.cfg. If
|
||||
you experience any unexpected behavior, you can use this to
|
||||
check if your APPEND line in syslinux.cfg is correct. The output
|
||||
is piped through less(1). So press 'q' to return to the menu.
|
||||
|
||||
|
||||
7) Show boot log (dmesg)
|
||||
Shows the boot log of the kernel. The output is piped through
|
||||
less(1). So press 'q' to return to the menu.
|
||||
|
||||
|
||||
8) Show TCP/IP configuration
|
||||
Shows the TCP/IP configuration, listening sockets and current
|
||||
TCP and UDP connections. Useful, if you problems with net con‐
|
||||
nectivity. The output is piped through less(1). So press 'q' to
|
||||
return to the menu.
|
||||
|
||||
|
||||
9) Show running processes
|
||||
Shows all processes including memory and CPU usage. Display will
|
||||
updated every second. Press 'q' or CTRL-C to return to the menu.
|
||||
|
||||
|
||||
s) Shutdown
|
||||
Shuts down the floppy144.vfd virtual machine. Proper shutdown is
|
||||
not required. It is ok to use a hard power off in your virtual‐
|
||||
ization program.
|
||||
|
||||
|
||||
r) Reboot
|
||||
Reboots the floppy144.vfd virtual machine. Proper reboot is not
|
||||
required. It is ok to use a hard reset in your virtualization
|
||||
program.
|
||||
|
||||
|
||||
PERMANENT CHANGES OF INITRD
|
||||
If you want to change any file or script of the file system (e.g. the
|
||||
init script /sbin/init or /etc/vlmcsd.ini), you'll need to mount the
|
||||
floppy image, unpack the initrd(4) file, make any modfications you
|
||||
like, create a new initrd(4) file and copy it to the mounted floppy.
|
||||
|
||||
To unpack the initrd(4) file you'll need xz(1) (or lzma(1) on older
|
||||
unix-like OSses) and cpio(1). These can be installed using your package
|
||||
manager on all major distros. It is ok to use the BSD version of
|
||||
cpio(1). No need to get the GNU version for BSD users. Provided the
|
||||
floppy is mounted in /mnt/floppy do the following:
|
||||
|
||||
Create an empty directory
|
||||
mkdir ~/vlmcsd-floppy-initrd
|
||||
|
||||
cd into that directory
|
||||
cd ~/vlmcsd-floppy-initrd
|
||||
|
||||
Unpack initrd
|
||||
cat /mnt/floppy/initrd | unlzma | cpio -i
|
||||
|
||||
After applying your changes build a new initrd(4) file:
|
||||
|
||||
|
||||
cd into your directory
|
||||
cd ~/vlmcsd-floppy-initrd
|
||||
|
||||
Create the packed file
|
||||
find . | cpio -o -H newc | lzma > /mnt/floppy/initrd
|
||||
|
||||
Do not try to use 'lzma -9' to achive better compression. The kernel
|
||||
can't read the resulting file. While customizing the initrd(4) file
|
||||
works on almost any unix-like OS, it does not work on Windows even not
|
||||
with Cygwin. The reason is that the NTFS file system can't handle uids
|
||||
and gids. These cannot be preserved when unpacking the cpio(1) archive
|
||||
to NTFS. If you use the WSL subsystem of Windows 10 Redstone (Anniver‐
|
||||
sary Update) and later, you must make sure to unpack the initrd(4) file
|
||||
to a directory on VolFs (normally everything that is not mounted under
|
||||
/mnt). The initrd(4) file can be on a VolFs or DriveFs.
|
||||
|
||||
|
||||
FAQ
|
||||
On what distro is the floppy image based?
|
||||
None. Besides the boot loader ldlinux.sys, there are only three bina‐
|
||||
ries: The Linux kernel bzImage, busybox(1) and vlmcsdmulti-x86-musl-
|
||||
static. bzImage and busybox(1) have been compiled with carefully
|
||||
selected configuration parameters not found in any distro. This was
|
||||
neccesary to fit everything on a 1.44 MB floppy.
|
||||
|
||||
|
||||
Why is a rather old Linux kernel (3.12) used?
|
||||
Linux 3.12 is the last kernel that can be booted with 16 MB of RAM.
|
||||
Beginning with Linux 3.13 it requires much more memory (about 80 MB) to
|
||||
boot. The floppy image is regularly tested with newer kernels. Every‐
|
||||
thing works except that you need to assign much more main memory to the
|
||||
virtual machine.
|
||||
|
||||
|
||||
Can the floppy be booted on bare metal?
|
||||
Basically yes. However, only Intel Pro/1000 and AMD PCNET32 ethernet
|
||||
cards are supported by the kernel. In addition there is no USB support
|
||||
compiled into the kernel. That means you can only use an IBM AT or IBM
|
||||
PS/2 keyboard which are not available on newer hardware.
|
||||
|
||||
|
||||
FILES
|
||||
syslinux.cfg, vlmcsd.ini(5)
|
||||
|
||||
|
||||
BUGS
|
||||
IPv6 cannot be configured with static or manual parameters.
|
||||
DHCPv6 is not supported.
|
||||
´ip route add ...' does not work. Use 'route add ...' instead.
|
||||
|
||||
|
||||
AUTHOR
|
||||
floppy144.vfd has been created by Hotbird64
|
||||
|
||||
|
||||
CREDITS
|
||||
Linus Torvalds et al. for the Linux kernel
|
||||
Erik Andersen et al. for the original uClibc
|
||||
Waldemar Brodkorb et al. for uClibc-ng
|
||||
Denys Vlasenko et al. for BusyBox
|
||||
H. Peter Anvin et al. for SYSLINUX
|
||||
|
||||
|
||||
SEE ALSO
|
||||
vlmcsd(8), vlmcsd.ini(5), initrd(4), busybox(1), syslinux(1)
|
||||
|
||||
|
||||
|
||||
Hotbird64 June 2016 VLMCSD-FLOPPY(7)
|
809
vlmcsd-floppy.7.html
Normal file
809
vlmcsd-floppy.7.html
Normal file
@ -0,0 +1,809 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Fri Jun 17 16:39:15 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<meta name="Content-Style" content="text/css">
|
||||
<style type="text/css">
|
||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||
h1 { text-align: center }
|
||||
</style>
|
||||
<title>VLMCSD-FLOPPY</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">VLMCSD-FLOPPY</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||
<a href="#SUPPORTED HYPERVISORS">SUPPORTED HYPERVISORS</a><br>
|
||||
<a href="#SETUP">SETUP</a><br>
|
||||
<a href="#CONFIGURATION">CONFIGURATION</a><br>
|
||||
<a href="#OPERATION">OPERATION</a><br>
|
||||
<a href="#PERMANENT CHANGES OF INITRD">PERMANENT CHANGES OF INITRD</a><br>
|
||||
<a href="#FAQ">FAQ</a><br>
|
||||
<a href="#FILES">FILES</a><br>
|
||||
<a href="#BUGS">BUGS</a><br>
|
||||
<a href="#AUTHOR">AUTHOR</a><br>
|
||||
<a href="#CREDITS">CREDITS</a><br>
|
||||
<a href="#SEE ALSO">SEE ALSO</a><br>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<h2>NAME
|
||||
<a name="NAME"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">floppy144.vfd
|
||||
− a bootable floppy disk with Linux and
|
||||
<b>vlmcsd</b>(8)</p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>floppy144.vfd</b>
|
||||
is an image of a bootable floppy that contains a minimal
|
||||
version of Linux and <b>vlmcsd</b>(8). It requires only 16
|
||||
MB of RAM. Its primary purpose is to run <b>vlmcsd</b>(8) in
|
||||
a small virtual machine which makes it easy to use
|
||||
<b>vlmcsd</b>(8) to activate the virtual machine’s
|
||||
host computer which is not possible in Windows 8.1 and up.
|
||||
The floppy image is a standard 3,5" floppy with 1.44 MB
|
||||
storage. It is formatted with a FAT12 filesystem. The floppy
|
||||
can be mounted to apply several customizations.</p>
|
||||
|
||||
<h2>SUPPORTED HYPERVISORS
|
||||
<a name="SUPPORTED HYPERVISORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The floppy
|
||||
image has been tested with the following hypervisors:</p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em">VMWare,
|
||||
VirtualBox, Hyper-V and QEMU</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Others are
|
||||
likely to work.</p>
|
||||
|
||||
<h2>SETUP
|
||||
<a name="SETUP"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Create a new
|
||||
virtual machine. Assign 16 MB of RAM. Add a floppy drive and
|
||||
attach <b>floppy144.vfd</b> to this drive. Do not create a
|
||||
virtual hard disk. Setup the virtual machine to boot from a
|
||||
floppy drive (VirtualBox has floppy boot disabled by
|
||||
default). If possible, setup a virtual machine with plain
|
||||
old BIOS (not UEFI). If you created an UEFI virtual machine,
|
||||
enable the compatibility support mode (CSM) to allow a BIOS
|
||||
compatible boot. Set number of CPUs to 1. The Linux kernel
|
||||
is not capable of SMP. Remove IDE, SATA, SCSI and USB
|
||||
support if possible. The Linux kernel can’t handle
|
||||
this and ignores any devices connected to these buses.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Setup an
|
||||
ethernet card. The following models are supported:</p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em">Intel PRO/1000
|
||||
<br>
|
||||
AMD PCNET III <br>
|
||||
AMD PCNET32 <br>
|
||||
VMWare vmxnet3 (paravirtualized driver used by VMWare) <br>
|
||||
virtio (paravirtualized driver used by VirtualBox, QEMU, KVM
|
||||
and lguest)</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Most
|
||||
hypervisors emulate an Intel PRO/1000 or AMD PCNET32 by
|
||||
default. Selecting a paravirtualized driver slightly
|
||||
improves performance. In VirtualBox you can simply select
|
||||
virtio in the network configuration dialog. VMWare requires
|
||||
that you add or change the VMX file. Use
|
||||
’ethernet0.virtualDev = "vmxnet3"’
|
||||
in your VMWare config file.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">If you are
|
||||
using QEMU, you must also setup a TAP adapter. Port
|
||||
redirection does not work to activate your own computer.</p>
|
||||
|
||||
<h2>CONFIGURATION
|
||||
<a name="CONFIGURATION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>floppy144.vfd</b>
|
||||
can be customized to fit your needs. This is done by editing
|
||||
the file syslinux.cfg on the floppy image. The floppy image
|
||||
must be mounted. Under Linux you can simply attach
|
||||
<b>floppy144.vfd</b> to a loop device which is mountable
|
||||
like any other block device. For Windows you must use some
|
||||
software that allows mounting a floppy image, e.g.
|
||||
<a href="http://www.osforensics.com/tools/mount-disk-images.html">OSFMount</a></p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">OSFMount works
|
||||
under all Windows versions beginning with Windows XP up to
|
||||
Windows 10 (32- and 64-bit).</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The default
|
||||
syslinux.cfg file looks like this:</p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em"><small>prompt 0
|
||||
<br>
|
||||
TIMEOUT 50 <br>
|
||||
default dhcp</small></p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em"><small>LABEL
|
||||
dhcp <br>
|
||||
KERNEL bzImage <br>
|
||||
APPEND vga=773 quiet initrd=initrd KBD=us
|
||||
LISTEN=[::]:1688,0.0.0.0:1688 TZ=UTC0 IPV4_CONFIG=DHCP
|
||||
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd
|
||||
ROOT_PASSWORD=vlmcsd USER_NAME=user USER_PASSWORD=vlmcsd
|
||||
GUEST_PASSWORD=vlmcsd INETD=Y
|
||||
WINDOWS=06401-00206-271-395032-03-1033-9600.0000-1652016
|
||||
OFFICE2010=06401-00096-199-204970-03-1033-9600.0000-1652016
|
||||
OFFICE2013=06401-00206-234-921934-03-1033-9600.0000-1652016
|
||||
HWID=36:4F:46:3A:88:63:D3:5F</small></p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em"><small>LABEL
|
||||
static <br>
|
||||
KERNEL bzImage <br>
|
||||
APPEND vga=773 quiet initrd=initrd KBD=fr
|
||||
LISTEN=[::]:1688,0.0.0.0:1688 TZ=CET-1CEST,M3.5.0,M10.5.0/3
|
||||
IPV4_CONFIG=STATIC IPV4_ADDRESS=192.168.20.123/24
|
||||
IPV4_GATEWAY=192.168.20.2 IPV4_DNS1=192.168.20.2
|
||||
IPV4_DNS2=NONE NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd
|
||||
ROOT_PASSWORD=vlmcsd USER_NAME=user USER_PASSWORD=vlmcsd
|
||||
GUEST_PASSWORD=vlmcsd INETD=Y</small></p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">There are two
|
||||
configurations in this files: <i>dhcp</i> (for configuring
|
||||
the IPv4 network via DHCP) and <i>static</i> (for a static
|
||||
IPv4 configuration). The kernel always boots the <i>dhcp</i>
|
||||
configuration without asking (lines ’prompt 0’
|
||||
and ’default dhcp’). You can simply change the
|
||||
default configuration to <i>static</i> and then customize
|
||||
the APPEND line in the <i>static</i> configuration. For more
|
||||
details how to customize the syslinux.cfg file see
|
||||
<b>syslinux</b>(1).</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Each APPPEND
|
||||
line contains one or more items seperated by spaces. <b>All
|
||||
items are case-sensitive</b>. The following parameters can
|
||||
be customized: <b><br>
|
||||
vga=</b><i>vesa-video-mode</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Sets the VESA display mode for
|
||||
the virtual machine. The parameter is not optional. If you
|
||||
ommit it, you will not see anything on the screen. 773 means
|
||||
1024x768 with 256 colors. See
|
||||
<a href="https://en.wikipedia.org/wiki/VESA_BIOS_Extensions#Linux_video_mode_numbers">Wikipedia</a>
|
||||
for more video modes. Note that all 16 color (4-bit) modes
|
||||
will not work. Use 8-bit (256 colors), 16-bit (65536
|
||||
colors), 24-bit and 32-bit (> 16 Million colors) only.
|
||||
All modes above 1280x1024 are non-VESA-standard and vary for
|
||||
all (virtual) graphic cards.</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="7%">
|
||||
|
||||
|
||||
<p><b>quiet</b></p></td>
|
||||
<td width="4%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>This causes the kernel not display the its log during
|
||||
boot. You may omit <b>quiet</b> but it doesn’t make
|
||||
much sense. The boot log is actually very verbose and
|
||||
scrolls away from screen quickly. If any errors occur during
|
||||
boot, they will be displayed even if <b>quiet</b> is present
|
||||
in the APPEND line. You may evaluate the complete boot log
|
||||
later by using the dmesg command or the menu on
|
||||
/dev/tty8.</p> </td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>initrd=</b><i>initial-ram-disk-file</i></p>
|
||||
|
||||
<p style="margin-left:22%;">This defines the initial ram
|
||||
disk that the kernel will read. There is only one initial
|
||||
ram disk on the floppy thus leave <i>initrd=initrd</i> as it
|
||||
is.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>KBD=</b><i>keyboard-layout-name</i></p>
|
||||
|
||||
<p style="margin-left:22%;">This allows you to select the
|
||||
keyboard layout. <i>keyboard-layout-name</i> is usually the
|
||||
ISO 3166-1 (top level domain) code for a country. A list of
|
||||
valid <i>keyboard-layout-name</i>s can be accessed via the
|
||||
menu system on /dev/tty8 (press ALT-F8). Note, that this is
|
||||
a keyboard driver only. There is no Unicode font support in
|
||||
<b>floppy144.vfd</b> (due to the fact that the kernel uses a
|
||||
generic VESA framebuffer device only). Characters beyond
|
||||
ASCII work for Western European languages only but not
|
||||
Eastern European, Greek, Cyrillic, Arabic, Hebrew, CJK and
|
||||
other languages. There is no need in <b>floppy144.vfd</b> to
|
||||
enter any characters outside ASCII. The purpose of the
|
||||
keyboard maps are that you will find characters like dash,
|
||||
backslash, brackets, braces, etc. at the usual place on your
|
||||
keyboard.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>LISTEN=</b>PRIVATE[:<i>tcp-port</i>]
|
||||
| <i><br>
|
||||
|
||||
ip-address</i>[:<i>tcp-port</i>][,<i>ip-address</i>[:<i>tcp-port</i>]][,...]</p>
|
||||
|
||||
<p style="margin-left:22%;">One or more combinations of IP
|
||||
addresses and optional TCP port seperated by commas that
|
||||
<b>vlmcsd</b>(8) should listen on or PRIVATE to listen on
|
||||
all private IP addresses only. The default port is 1688. If
|
||||
you use an explicit port number, append it to the IP address
|
||||
seperated by a colon. If you use a port number and the IP
|
||||
address contains colons, you must enclose the IP address in
|
||||
brackets. For example
|
||||
<i>192.168.0.2,[fd00::dead:beef]:5678</i> causes
|
||||
<b>vlmcsd</b>(8) to listen on 192.168.0.2 port 1688 and
|
||||
fd00::dead:beef port 5678.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>WINDOWS=</b><i>epid</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Defines the ePID that is used
|
||||
for Windows activations. If you ommit this parameter, vlmcsd
|
||||
generates a random ePID when it is started.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>OFFICE2010=</b><i>epid</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Defines the ePID that is used
|
||||
for Office 2010 activations. If you ommit this parameter,
|
||||
<b>vlmcsd</b>(8) generates a random ePID when it is
|
||||
started.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>OFFICE2013=</b><i>epid</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Defines the ePID that is used
|
||||
for Office (versions 2013 and greater) activations. If you
|
||||
ommit this parameter, <b>vlmcsd</b>(8) generates a random
|
||||
ePID when it is started.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>HWID=</b><i>hwid</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Defines the HwId that is sent
|
||||
to clients. <i>hwid</i> must be specified as 16 hex digits
|
||||
that are interpreted as a series of 8 bytes (big endian).
|
||||
Any character that is not a hex digit will be ignored. This
|
||||
is for better readability.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>TZ=</b><i>posix-time-zone-string</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Set the time zone to
|
||||
<i>posix-time-zone-string</i>. It must conform to the
|
||||
<a href="http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html">POSIX</a>
|
||||
specification. Simplified time zone strings like
|
||||
"Europe/London" or "America/Detroit" are
|
||||
not allowed. This has the very simple reason that there is
|
||||
no space on the floppy to store the time zone database.</p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em">The string
|
||||
<i>CET-1CEST,M3.5.0,M10.5.0/3</i> (most countries in Europe)
|
||||
reads as follows:</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="22%"></td>
|
||||
<td width="13%">
|
||||
|
||||
|
||||
<p><i>CET</i></p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="63%">
|
||||
|
||||
|
||||
<p>The standard (winter) time zone has the name CET.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="22%"></td>
|
||||
<td width="13%">
|
||||
|
||||
|
||||
<p><i>-1</i></p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="63%">
|
||||
|
||||
|
||||
<p>The standard time zone is one hour east of UTC. Negative
|
||||
numbers are east of UTC. Positive numbers are west of
|
||||
UTC.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="22%"></td>
|
||||
<td width="13%">
|
||||
|
||||
|
||||
<p><i>CEST</i></p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="63%">
|
||||
|
||||
|
||||
<p>The daylight saving (summer) time zone has the name
|
||||
CEST.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="22%"></td>
|
||||
<td width="13%">
|
||||
|
||||
|
||||
<p><i>M3.5.0</i></p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="63%">
|
||||
|
||||
|
||||
<p>Daylight saving time starts in the 3rd month (March) on
|
||||
the 5th (=last) occurence of weekday 0 (Sunday) at 2
|
||||
o’clock (2 o’clock is a default value).</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="22%"></td>
|
||||
<td width="13%">
|
||||
|
||||
|
||||
<p><i>M10.5.0/3</i></p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="63%">
|
||||
|
||||
|
||||
<p>Daylight saving time ends in the 10th month (October) on
|
||||
the 5th (=last) occurence of weekday 0 (Sunday) at 3
|
||||
o’clock.</p> </td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em">If you
|
||||
don’t have daylight saving time, things are easier.
|
||||
For Chinese Standard Time for example, just use <i>CST-8</i>
|
||||
as the time zone string.</p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em">On a Linux
|
||||
desktop system, you can use a command like
|
||||
<b>strings /usr/share/zoneinfo/America/New_York | tail -n1</b>.
|
||||
This should return <i>EST5EDT,M3.2.0,M11.1.0</i>. You can
|
||||
use the returned string for the
|
||||
<b>TZ=</b><i>posix-time-zone-string</i> parameter.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>IPV4_CONFIG=</b>DHCP |
|
||||
STATIC</p>
|
||||
|
||||
<p style="margin-left:22%;">This determines how you want to
|
||||
configure IPv4 networking. If you use
|
||||
<b>IPV4_CONFIG=</b>STATIC, you must supply additional
|
||||
paramaters to the APPEND command line.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>IPV4_ADDRESS=</b><i>ipv4-address</i>/<i>CIDR-mask</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Use <i>ipv4-address</i> with
|
||||
netmask <i>CIDR-mask</i> for static IPv4 configuration. The
|
||||
netmask must not be ommitted. For IPv4 address 192.168.12.17
|
||||
with a netmask of 255.255.255.0 use <i>192.168.12.17/24</i>.
|
||||
For IPv4 address 10.4.0.8 with a netmask of 255.255.0.0 use
|
||||
10.4.0.8/16. This paramater is ignored, if you used
|
||||
<b>IPV4_CONFIG=</b>DHCP.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>IPV4_GATEWAY=</b><i>ipv4-address</i>
|
||||
| NONE</p>
|
||||
|
||||
<p style="margin-left:22%;">Use <i>ipv4-address</i> as the
|
||||
default gateway. This is usually the IPv4 address of your
|
||||
router. You may specify NONE explicitly for no gateway. In
|
||||
this case your virtual machine is only visible on its local
|
||||
LAN. This paramater is ignored, if you used
|
||||
<b>IPV4_CONFIG=</b>DHCP.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>IPV4_DNS1=</b><i>ipv4-address</i>
|
||||
| NONE</p>
|
||||
|
||||
<p style="margin-left:22%;">Use <i>ipv4-address</i> as the
|
||||
primary name server. In home networks this is often the IPv4
|
||||
address of your router. You may specify NONE explicitly. If
|
||||
you specified NONE for both <b>IPV4_DNS1=</b> and
|
||||
<b>IPV4_DNS2=</b>, your virtual machine cannot resolve host
|
||||
names to IP addresses. While <b>vlmcsd</b>(8) works
|
||||
perfectly without DNS servers, you must use IP addresses
|
||||
when referring to a host, e.g. for specifying an NTP server.
|
||||
This paramater is ignored, if you used
|
||||
<b>IPV4_CONFIG=</b>DHCP.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>IPV4_DNS2=</b><i>ipv4-address</i>
|
||||
| NONE</p>
|
||||
|
||||
<p style="margin-left:22%;">Use <i>ipv4-address</i> as the
|
||||
secondary name server. It serves as a backup if the primary
|
||||
name server is not available. Home networks often
|
||||
don’t have a secondary name server. In this case set
|
||||
this to NONE. This paramater is ignored, if you used
|
||||
<b>IPV4_CONFIG=</b>DHCP.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>NTP_SERVER=</b><i>host-name</i>
|
||||
| <i>ipv4-address</i> | NONE</p>
|
||||
|
||||
<p style="margin-left:22%;">This sets the name of a time
|
||||
server using the NTP protocol. If your virtualization
|
||||
environment reliably provides time, you can set this to
|
||||
NONE. Don’t use a public time service like
|
||||
pool.ntp.org or time.nist.gov if you have a (at least
|
||||
somewhat reliable) NTP server in your LAN.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>HOST_NAME=</b><i>host-name</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Sets the local host name for
|
||||
your virtual machine. It can be a single name or a
|
||||
fully-qualified domain name FQDN. If you used
|
||||
<b>IPV4_CONFIG=</b>DHCP and your DHCP server returns a
|
||||
domain name, the domain part of an FQDN will be replaced by
|
||||
that name. This host name or host part of an FQDN will not
|
||||
replaced by a host name returned via DHCP. The host name is
|
||||
not important for the operation of <b>floppy144.vfd</b>.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>ROOT_PASSWORD=</b><i>password</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Sets the password of the root
|
||||
user.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>USER_NAME=</b><i>username</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Sets the name of for a general
|
||||
user with no special privileges. This user can login but
|
||||
can’t do much.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>USER_PASSWORD=</b><i>password</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Sets the password for the user
|
||||
defined by <b>USER_NAME=</b><i>username</i>.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>GUEST_PASSWORD=</b><i>password</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Sets the password for the
|
||||
pre-defined guest user. This user has the same priviliges
|
||||
(none) as the user defined by
|
||||
<b>USER_NAME=</b><i>username</i>.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>INETD=</b>Y | N</p>
|
||||
|
||||
<p style="margin-left:22%;"><b>INETD=</b>Y specifies that
|
||||
<b>inetd</b>(8) should automatically be started. That means
|
||||
you can telnet and ftp to your virtual machine.</p>
|
||||
|
||||
<h2>OPERATION
|
||||
<a name="OPERATION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Diskless
|
||||
System</b> <br>
|
||||
The <b>floppy144.vfd</b> virtual machine is a diskless
|
||||
system that works entirely from RAM. The file system is
|
||||
actually a RAM disk that is created from the
|
||||
<b>initrd</b>(4) file on the floppy image.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Anything
|
||||
you’ll do from inside the virtual machine, for
|
||||
instance editing a config file, will be lost when you reboot
|
||||
the machine. So, if you ever asked yourself if <b>rm -fr
|
||||
/</b> (root privileges required) really deletes all files
|
||||
from all mounted partitions, the <b>floppy144.vfd</b> VM is
|
||||
the right place to test it (Yes, it does).</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The VM uses a
|
||||
RAM disk, because the Linux kernel had to be stripped down
|
||||
to essential features to fit on a 1.44 MB floppy. It has no
|
||||
floppy driver, no disk file system drivers and no block
|
||||
layer (cannot use disks of any type).</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>System
|
||||
startup</b> <br>
|
||||
The kernel boots up very quickly and the init script
|
||||
(/sbin/init) waits 5 seconds. In these 5 seconds you
|
||||
can:</p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em">Press
|
||||
’m’ to manually enter the time zone and the IPv4
|
||||
parameters. These will be queried interactively. <br>
|
||||
Press ’t’ to manually enter the time zone only.
|
||||
<br>
|
||||
Press ’s’ to escape to a shell.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">If you
|
||||
don’t want to 5 seconds for continuing the init
|
||||
process, you can press any other key to speed things up. At
|
||||
the end of the init script you should see
|
||||
that<b>vlmcsd</b>(8) has started. You should also see the IP
|
||||
addresses and all user names and passwords.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Logging into
|
||||
the system</b> <br>
|
||||
There are 5 local logins provided on /dev/tty2 to /dev/tty6.
|
||||
To switch to these logins, simply press ALT−F2 to
|
||||
ALT−F6. To return to the console on /dev/tty1, press
|
||||
ALT−F1. If <b>inetd</b>(8) is running you can also use
|
||||
<b>telnet</b>(1). This allows you use a terminal program
|
||||
(e.g. putty) that can utilize your keyboard layout, can be
|
||||
resized and has full UTF-8 support. The local terminals
|
||||
support US keyboard layout only. Please be aware that
|
||||
<b>telnet</b>(1) is unencrypted and everything including
|
||||
passwords is transmitted in clear text. There is not enough
|
||||
space for an ssh server like <b>sshd</b>(8) or
|
||||
<b>dropbear</b>(8).</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The floppy
|
||||
image only provides basic Unix commands. Type <i>busybox</i>
|
||||
or <i>ll /bin</i> to get a list. The only editor available
|
||||
is <b>vi</b>(1). If you don’t like vi, you may
|
||||
transfer config files via <b>ftp</b>(1) edit them with the
|
||||
editor of your choice and transfer them back to the
|
||||
<b>floppy144.vfd</b> VM.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>The menu
|
||||
system</b> <br>
|
||||
You’ll find a menu system on /dev/tty8 (press
|
||||
ALT−F8 to see it). It allows you performing some
|
||||
administrative tasks and to view various system information.
|
||||
It is mainly for users that do not have much experience with
|
||||
Unix commands. <b><br>
|
||||
1) (Re)start vlmcsd</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Starts or restarts
|
||||
<b>vlmcsd</b>(8). This is useful if you changed
|
||||
<b>/etc/vlmcsd.ini</b>(5).</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>2) Stop vlmcsd</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Stops <b>vlmcsd</b>(8).</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>3) (Re)start inetd</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Starts or restarts
|
||||
<b>inetd</b>(8). If <b>inetd</b>(8) is restarted, current
|
||||
clients connected via <b>telnet</b>(1) or <b>ftp</b>(1) will
|
||||
<b>not</b> be dropped. They can continue their sessions.
|
||||
This is useful if you changed <b>/etc/inetd.conf</b>(5).</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>4) Stop inet</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Stops <b>inetd</b>(8). All
|
||||
clients connected via <b>telnet</b>(1) or <b>ftp</b>(1) will
|
||||
be dropped immediately.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>5) Change the time
|
||||
zone</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Just in case you missed
|
||||
pressing ’t’ during system startup. This also
|
||||
restarts <b>vlmcsd</b>(8) if it was running to notify it
|
||||
that the time zone has changed. Restarting <b>vlmcsd</b>(8)
|
||||
allows currently connected clients to finish their
|
||||
activation.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>k) Change keyboard
|
||||
layout</b></p>
|
||||
|
||||
<p style="margin-left:22%;">This allows you to select a
|
||||
different keyboard layout.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>6) Show all kernel boot
|
||||
parameters</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Shows all parameters passed to
|
||||
the kernel via syslinux.cfg. If you experience any
|
||||
unexpected behavior, you can use this to check if your
|
||||
APPEND line in syslinux.cfg is correct. The output is piped
|
||||
through <b>less(1)</b>. So press ’q’ to return
|
||||
to the menu.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>7) Show boot log
|
||||
(dmesg)</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Shows the boot log of the
|
||||
kernel. The output is piped through <b>less(1)</b>. So press
|
||||
’q’ to return to the menu.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>8) Show TCP/IP
|
||||
configuration</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Shows the TCP/IP configuration,
|
||||
listening sockets and current TCP and UDP connections.
|
||||
Useful, if you problems with net connectivity. The output is
|
||||
piped through <b>less(1)</b>. So press ’q’ to
|
||||
return to the menu.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>9) Show running
|
||||
processes</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Shows all processes including
|
||||
memory and CPU usage. Display will updated every second.
|
||||
Press ’q’ or CTRL-C to return to the menu.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>s) Shutdown</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Shuts down the
|
||||
<b>floppy144.vfd</b> virtual machine. Proper shutdown is not
|
||||
required. It is ok to use a hard power off in your
|
||||
virtualization program.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>r) Reboot</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Reboots the
|
||||
<b>floppy144.vfd</b> virtual machine. Proper reboot is not
|
||||
required. It is ok to use a hard reset in your
|
||||
virtualization program.</p>
|
||||
|
||||
<h2>PERMANENT CHANGES OF INITRD
|
||||
<a name="PERMANENT CHANGES OF INITRD"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">If you want to
|
||||
change any file or script of the file system (e.g. the init
|
||||
script /sbin/init or /etc/vlmcsd.ini), you’ll need to
|
||||
mount the floppy image, unpack the <b>initrd</b>(4) file,
|
||||
make any modfications you like, create a new
|
||||
<b>initrd</b>(4) file and copy it to the mounted floppy.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">To unpack the
|
||||
<b>initrd</b>(4) file you’ll need <b>xz</b>(1) (or
|
||||
<b>lzma</b>(1) on older unix-like OSses) and <b>cpio</b>(1).
|
||||
These can be installed using your package manager on all
|
||||
major distros. It is ok to use the BSD version of
|
||||
<b>cpio</b>(1). No need to get the GNU version for BSD
|
||||
users. Provided the floppy is mounted in /mnt/floppy do the
|
||||
following: <br>
|
||||
Create an empty directory</p>
|
||||
|
||||
<p style="margin-left:22%;">mkdir
|
||||
~/vlmcsd-floppy-initrd</p>
|
||||
|
||||
<p style="margin-left:11%;">cd into that directory</p>
|
||||
|
||||
<p style="margin-left:22%;">cd ~/vlmcsd-floppy-initrd</p>
|
||||
|
||||
<p style="margin-left:11%;">Unpack initrd</p>
|
||||
|
||||
<p style="margin-left:22%;">cat /mnt/floppy/initrd | unlzma
|
||||
| cpio -i</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">After applying
|
||||
your changes build a new <b>initrd</b>(4) file: <br>
|
||||
cd into your directory</p>
|
||||
|
||||
<p style="margin-left:22%;">cd ~/vlmcsd-floppy-initrd</p>
|
||||
|
||||
<p style="margin-left:11%;">Create the packed file</p>
|
||||
|
||||
<p style="margin-left:22%;">find . | cpio -o -H newc | lzma
|
||||
> /mnt/floppy/initrd</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Do not try to
|
||||
use ’lzma -9’ to achive better compression. The
|
||||
kernel can’t read the resulting file. While
|
||||
customizing the <b>initrd</b>(4) file works on almost any
|
||||
unix-like OS, it does not work on Windows even not with
|
||||
Cygwin. The reason is that the NTFS file system can’t
|
||||
handle uids and gids. These cannot be preserved when
|
||||
unpacking the <b>cpio</b>(1) archive to NTFS. If you use the
|
||||
WSL subsystem of Windows 10 Redstone (Anniversary Update)
|
||||
and later, you must make sure to unpack the <b>initrd</b>(4)
|
||||
file to a directory on VolFs (normally everything that is
|
||||
<b>not</b> mounted under /mnt). The <b>initrd</b>(4) file
|
||||
can be on a VolFs or DriveFs.</p>
|
||||
|
||||
<h2>FAQ
|
||||
<a name="FAQ"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>On what
|
||||
distro is the floppy image based?</b> <br>
|
||||
None. Besides the boot loader <b>ldlinux.sys</b>, there are
|
||||
only three binaries: The Linux kernel <b>bzImage</b>,
|
||||
<b>busybox</b>(1) and <b>vlmcsdmulti-x86-musl-static</b>.
|
||||
<b>bzImage</b> and <b>busybox</b>(1) have been compiled with
|
||||
carefully selected configuration parameters not found in any
|
||||
distro. This was neccesary to fit everything on a 1.44 MB
|
||||
floppy.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Why is a
|
||||
rather old Linux kernel (3.12) used?</b> <br>
|
||||
Linux 3.12 is the last kernel that can be booted with 16 MB
|
||||
of RAM. Beginning with Linux 3.13 it requires much more
|
||||
memory (about 80 MB) to boot. The floppy image is regularly
|
||||
tested with newer kernels. Everything works except that you
|
||||
need to assign much more main memory to the virtual
|
||||
machine.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Can the
|
||||
floppy be booted on bare metal?</b> <br>
|
||||
Basically yes. However, only Intel Pro/1000 and AMD PCNET32
|
||||
ethernet cards are supported by the kernel. In addition
|
||||
there is no USB support compiled into the kernel. That means
|
||||
you can only use an IBM AT or IBM PS/2 keyboard which are
|
||||
not available on newer hardware.</p>
|
||||
|
||||
<h2>FILES
|
||||
<a name="FILES"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>syslinux.cfg</b>,
|
||||
<b>vlmcsd.ini</b>(5)</p>
|
||||
|
||||
<h2>BUGS
|
||||
<a name="BUGS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">IPv6 cannot be
|
||||
configured with static or manual parameters. <br>
|
||||
DHCPv6 is not supported. <br>
|
||||
´ip route add ...’ does not work. Use
|
||||
’route add ...’ instead.</p>
|
||||
|
||||
<h2>AUTHOR
|
||||
<a name="AUTHOR"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>floppy144.vfd</b>
|
||||
has been created by Hotbird64</p>
|
||||
|
||||
<h2>CREDITS
|
||||
<a name="CREDITS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Linus Torvalds
|
||||
et al. for the Linux kernel <br>
|
||||
Erik Andersen et al. for the original uClibc <br>
|
||||
Waldemar Brodkorb et al. for uClibc-ng <br>
|
||||
Denys Vlasenko et al. for BusyBox <br>
|
||||
H. Peter Anvin et al. for SYSLINUX</p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>vlmcsd</b>(8),
|
||||
<b>vlmcsd.ini</b>(5), <b>initrd</b>(4), <b>busybox</b>(1),
|
||||
<b>syslinux(1)</b></p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
BIN
vlmcsd-floppy.7.pdf
Normal file
BIN
vlmcsd-floppy.7.pdf
Normal file
Binary file not shown.
530
vlmcsd-floppy.7.unix.txt
Normal file
530
vlmcsd-floppy.7.unix.txt
Normal file
@ -0,0 +1,530 @@
|
||||
VLMCSD-FLOPPY(7) KMS Activation Manual VLMCSD-FLOPPY(7)
|
||||
|
||||
|
||||
|
||||
NAME
|
||||
floppy144.vfd - a bootable floppy disk with Linux and vlmcsd(8)
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
floppy144.vfd is an image of a bootable floppy that contains a minimal
|
||||
version of Linux and vlmcsd(8). It requires only 16 MB of RAM. Its pri‐
|
||||
mary purpose is to run vlmcsd(8) in a small virtual machine which makes
|
||||
it easy to use vlmcsd(8) to activate the virtual machine's host com‐
|
||||
puter which is not possible in Windows 8.1 and up. The floppy image is
|
||||
a standard 3,5" floppy with 1.44 MB storage. It is formatted with a
|
||||
FAT12 filesystem. The floppy can be mounted to apply several customiza‐
|
||||
tions.
|
||||
|
||||
|
||||
SUPPORTED HYPERVISORS
|
||||
The floppy image has been tested with the following hypervisors:
|
||||
|
||||
VMWare, VirtualBox, Hyper-V and QEMU
|
||||
|
||||
Others are likely to work.
|
||||
|
||||
|
||||
SETUP
|
||||
Create a new virtual machine. Assign 16 MB of RAM. Add a floppy drive
|
||||
and attach floppy144.vfd to this drive. Do not create a virtual hard
|
||||
disk. Setup the virtual machine to boot from a floppy drive (VirtualBox
|
||||
has floppy boot disabled by default). If possible, setup a virtual
|
||||
machine with plain old BIOS (not UEFI). If you created an UEFI virtual
|
||||
machine, enable the compatibility support mode (CSM) to allow a BIOS
|
||||
compatible boot. Set number of CPUs to 1. The Linux kernel is not capa‐
|
||||
ble of SMP. Remove IDE, SATA, SCSI and USB support if possible. The
|
||||
Linux kernel can't handle this and ignores any devices connected to
|
||||
these buses.
|
||||
|
||||
Setup an ethernet card. The following models are supported:
|
||||
|
||||
Intel PRO/1000
|
||||
AMD PCNET III
|
||||
AMD PCNET32
|
||||
VMWare vmxnet3 (paravirtualized driver used by VMWare)
|
||||
virtio (paravirtualized driver used by VirtualBox, QEMU, KVM and
|
||||
lguest)
|
||||
|
||||
Most hypervisors emulate an Intel PRO/1000 or AMD PCNET32 by default.
|
||||
Selecting a paravirtualized driver slightly improves performance. In
|
||||
VirtualBox you can simply select virtio in the network configuration
|
||||
dialog. VMWare requires that you add or change the VMX file. Use 'eth‐
|
||||
ernet0.virtualDev = "vmxnet3"' in your VMWare config file.
|
||||
|
||||
If you are using QEMU, you must also setup a TAP adapter. Port redi‐
|
||||
rection does not work to activate your own computer.
|
||||
|
||||
|
||||
CONFIGURATION
|
||||
floppy144.vfd can be customized to fit your needs. This is done by
|
||||
editing the file syslinux.cfg on the floppy image. The floppy image
|
||||
must be mounted. Under Linux you can simply attach floppy144.vfd to a
|
||||
loop device which is mountable like any other block device. For Windows
|
||||
you must use some software that allows mounting a floppy image, e.g.
|
||||
OSFMount ⟨http://www.osforensics.com/tools/mount-disk-images.html⟩
|
||||
|
||||
OSFMount works under all Windows versions beginning with Windows XP up
|
||||
to Windows 10 (32- and 64-bit).
|
||||
|
||||
The default syslinux.cfg file looks like this:
|
||||
|
||||
prompt 0
|
||||
TIMEOUT 50
|
||||
default dhcp
|
||||
|
||||
LABEL dhcp
|
||||
KERNEL bzImage
|
||||
APPEND vga=773 quiet initrd=initrd KBD=us LIS‐
|
||||
TEN=[::]:1688,0.0.0.0:1688 TZ=UTC0 IPV4_CONFIG=DHCP
|
||||
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
||||
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
||||
INETD=Y WINDOWS=06401-00206-271-395032-03-1033-9600.0000-1652016
|
||||
OFFICE2010=06401-00096-199-204970-03-1033-9600.0000-1652016
|
||||
OFFICE2013=06401-00206-234-921934-03-1033-9600.0000-1652016
|
||||
HWID=36:4F:46:3A:88:63:D3:5F
|
||||
|
||||
LABEL static
|
||||
KERNEL bzImage
|
||||
APPEND vga=773 quiet initrd=initrd KBD=fr LIS‐
|
||||
TEN=[::]:1688,0.0.0.0:1688 TZ=CET-1CEST,M3.5.0,M10.5.0/3
|
||||
IPV4_CONFIG=STATIC IPV4_ADDRESS=192.168.20.123/24 IPV4_GATE‐
|
||||
WAY=192.168.20.2 IPV4_DNS1=192.168.20.2 IPV4_DNS2=NONE
|
||||
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
||||
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
||||
INETD=Y
|
||||
|
||||
|
||||
There are two configurations in this files: dhcp (for configuring the
|
||||
IPv4 network via DHCP) and static (for a static IPv4 configuration).
|
||||
The kernel always boots the dhcp configuration without asking (lines
|
||||
'prompt 0' and 'default dhcp'). You can simply change the default con‐
|
||||
figuration to static and then customize the APPEND line in the static
|
||||
configuration. For more details how to customize the syslinux.cfg file
|
||||
see syslinux(1).
|
||||
|
||||
Each APPPEND line contains one or more items seperated by spaces. All
|
||||
items are case-sensitive. The following parameters can be customized:
|
||||
|
||||
|
||||
vga=vesa-video-mode
|
||||
Sets the VESA display mode for the virtual machine. The parame‐
|
||||
ter is not optional. If you ommit it, you will not see anything
|
||||
on the screen. 773 means 1024x768 with 256 colors. See Wikipedia
|
||||
⟨https://en.wikipedia.org/wiki/
|
||||
VESA_BIOS_Extensions#Linux_video_mode_numbers⟩ for more video
|
||||
modes. Note that all 16 color (4-bit) modes will not work. Use
|
||||
8-bit (256 colors), 16-bit (65536 colors), 24-bit and 32-bit (>
|
||||
16 Million colors) only. All modes above 1280x1024 are non-VESA-
|
||||
standard and vary for all (virtual) graphic cards.
|
||||
|
||||
|
||||
quiet This causes the kernel not display the its log during boot. You
|
||||
may omit quiet but it doesn't make much sense. The boot log is
|
||||
actually very verbose and scrolls away from screen quickly. If
|
||||
any errors occur during boot, they will be displayed even if
|
||||
quiet is present in the APPEND line. You may evaluate the com‐
|
||||
plete boot log later by using the dmesg command or the menu on
|
||||
/dev/tty8.
|
||||
|
||||
|
||||
initrd=initial-ram-disk-file
|
||||
This defines the initial ram disk that the kernel will read.
|
||||
There is only one initial ram disk on the floppy thus leave ini‐
|
||||
trd=initrd as it is.
|
||||
|
||||
|
||||
KBD=keyboard-layout-name
|
||||
This allows you to select the keyboard layout. keyboard-layout-
|
||||
name is usually the ISO 3166-1 (top level domain) code for a
|
||||
country. A list of valid keyboard-layout-names can be accessed
|
||||
via the menu system on /dev/tty8 (press ALT-F8). Note, that this
|
||||
is a keyboard driver only. There is no Unicode font support in
|
||||
floppy144.vfd (due to the fact that the kernel uses a generic
|
||||
VESA framebuffer device only). Characters beyond ASCII work for
|
||||
Western European languages only but not Eastern European, Greek,
|
||||
Cyrillic, Arabic, Hebrew, CJK and other languages. There is no
|
||||
need in floppy144.vfd to enter any characters outside ASCII. The
|
||||
purpose of the keyboard maps are that you will find characters
|
||||
like dash, backslash, brackets, braces, etc. at the usual place
|
||||
on your keyboard.
|
||||
|
||||
|
||||
LISTEN=PRIVATE[:tcp-port] | ip-address[:tcp-port][,ip-address[:tcp-
|
||||
port]][,...]
|
||||
One or more combinations of IP addresses and optional TCP port
|
||||
seperated by commas that vlmcsd(8) should listen on or PRIVATE
|
||||
to listen on all private IP addresses only. The default port is
|
||||
1688. If you use an explicit port number, append it to the IP
|
||||
address seperated by a colon. If you use a port number and the
|
||||
IP address contains colons, you must enclose the IP address in
|
||||
brackets. For example 192.168.0.2,[fd00::dead:beef]:5678 causes
|
||||
vlmcsd(8) to listen on 192.168.0.2 port 1688 and fd00::dead:beef
|
||||
port 5678.
|
||||
|
||||
|
||||
WINDOWS=epid
|
||||
Defines the ePID that is used for Windows activations. If you
|
||||
ommit this parameter, vlmcsd generates a random ePID when it is
|
||||
started.
|
||||
|
||||
|
||||
OFFICE2010=epid
|
||||
Defines the ePID that is used for Office 2010 activations. If
|
||||
you ommit this parameter, vlmcsd(8) generates a random ePID when
|
||||
it is started.
|
||||
|
||||
|
||||
OFFICE2013=epid
|
||||
Defines the ePID that is used for Office (versions 2013 and
|
||||
greater) activations. If you ommit this parameter, vlmcsd(8)
|
||||
generates a random ePID when it is started.
|
||||
|
||||
|
||||
HWID=hwid
|
||||
Defines the HwId that is sent to clients. hwid must be specified
|
||||
as 16 hex digits that are interpreted as a series of 8 bytes
|
||||
(big endian). Any character that is not a hex digit will be
|
||||
ignored. This is for better readability.
|
||||
|
||||
|
||||
TZ=posix-time-zone-string
|
||||
Set the time zone to posix-time-zone-string. It must conform to
|
||||
the POSIX ⟨http://pubs.opengroup.org/onlinepubs/009695399/
|
||||
basedefs/xbd_chap08.html⟩ specification. Simplified time zone
|
||||
strings like "Europe/London" or "America/Detroit" are not
|
||||
allowed. This has the very simple reason that there is no space
|
||||
on the floppy to store the time zone database.
|
||||
|
||||
The string CET-1CEST,M3.5.0,M10.5.0/3 (most countries in Europe)
|
||||
reads as follows:
|
||||
|
||||
CET The standard (winter) time zone has the name CET.
|
||||
|
||||
-1 The standard time zone is one hour east of UTC. Nega‐
|
||||
tive numbers are east of UTC. Positive numbers are
|
||||
west of UTC.
|
||||
|
||||
CEST The daylight saving (summer) time zone has the name
|
||||
CEST.
|
||||
|
||||
M3.5.0 Daylight saving time starts in the 3rd month (March)
|
||||
on the 5th (=last) occurence of weekday 0 (Sunday) at
|
||||
2 o'clock (2 o'clock is a default value).
|
||||
|
||||
M10.5.0/3 Daylight saving time ends in the 10th month (October)
|
||||
on the 5th (=last) occurence of weekday 0 (Sunday) at
|
||||
3 o'clock.
|
||||
|
||||
If you don't have daylight saving time, things are easier. For
|
||||
Chinese Standard Time for example, just use CST-8 as the time
|
||||
zone string.
|
||||
|
||||
On a Linux desktop system, you can use a command like
|
||||
strings /usr/share/zoneinfo/America/New_York | tail -n1. This
|
||||
should return EST5EDT,M3.2.0,M11.1.0. You can use the returned
|
||||
string for the TZ=posix-time-zone-string parameter.
|
||||
|
||||
|
||||
IPV4_CONFIG=DHCP | STATIC
|
||||
This determines how you want to configure IPv4 networking. If
|
||||
you use IPV4_CONFIG=STATIC, you must supply additional para‐
|
||||
maters to the APPEND command line.
|
||||
|
||||
|
||||
IPV4_ADDRESS=ipv4-address/CIDR-mask
|
||||
Use ipv4-address with netmask CIDR-mask for static IPv4 configu‐
|
||||
ration. The netmask must not be ommitted. For IPv4 address
|
||||
192.168.12.17 with a netmask of 255.255.255.0 use
|
||||
192.168.12.17/24. For IPv4 address 10.4.0.8 with a netmask of
|
||||
255.255.0.0 use 10.4.0.8/16. This paramater is ignored, if you
|
||||
used IPV4_CONFIG=DHCP.
|
||||
|
||||
|
||||
IPV4_GATEWAY=ipv4-address | NONE
|
||||
Use ipv4-address as the default gateway. This is usually the
|
||||
IPv4 address of your router. You may specify NONE explicitly for
|
||||
no gateway. In this case your virtual machine is only visible on
|
||||
its local LAN. This paramater is ignored, if you used IPV4_CON‐
|
||||
FIG=DHCP.
|
||||
|
||||
|
||||
IPV4_DNS1=ipv4-address | NONE
|
||||
Use ipv4-address as the primary name server. In home networks
|
||||
this is often the IPv4 address of your router. You may specify
|
||||
NONE explicitly. If you specified NONE for both IPV4_DNS1= and
|
||||
IPV4_DNS2=, your virtual machine cannot resolve host names to IP
|
||||
addresses. While vlmcsd(8) works perfectly without DNS servers,
|
||||
you must use IP addresses when referring to a host, e.g. for
|
||||
specifying an NTP server. This paramater is ignored, if you used
|
||||
IPV4_CONFIG=DHCP.
|
||||
|
||||
|
||||
IPV4_DNS2=ipv4-address | NONE
|
||||
Use ipv4-address as the secondary name server. It serves as a
|
||||
backup if the primary name server is not available. Home net‐
|
||||
works often don't have a secondary name server. In this case set
|
||||
this to NONE. This paramater is ignored, if you used IPV4_CON‐
|
||||
FIG=DHCP.
|
||||
|
||||
|
||||
NTP_SERVER=host-name | ipv4-address | NONE
|
||||
This sets the name of a time server using the NTP protocol. If
|
||||
your virtualization environment reliably provides time, you can
|
||||
set this to NONE. Don't use a public time service like
|
||||
pool.ntp.org or time.nist.gov if you have a (at least somewhat
|
||||
reliable) NTP server in your LAN.
|
||||
|
||||
|
||||
HOST_NAME=host-name
|
||||
Sets the local host name for your virtual machine. It can be a
|
||||
single name or a fully-qualified domain name FQDN. If you used
|
||||
IPV4_CONFIG=DHCP and your DHCP server returns a domain name, the
|
||||
domain part of an FQDN will be replaced by that name. This host
|
||||
name or host part of an FQDN will not replaced by a host name
|
||||
returned via DHCP. The host name is not important for the opera‐
|
||||
tion of floppy144.vfd.
|
||||
|
||||
|
||||
ROOT_PASSWORD=password
|
||||
Sets the password of the root user.
|
||||
|
||||
|
||||
USER_NAME=username
|
||||
Sets the name of for a general user with no special privileges.
|
||||
This user can login but can't do much.
|
||||
|
||||
|
||||
USER_PASSWORD=password
|
||||
Sets the password for the user defined by USER_NAME=username.
|
||||
|
||||
|
||||
GUEST_PASSWORD=password
|
||||
Sets the password for the pre-defined guest user. This user has
|
||||
the same priviliges (none) as the user defined by
|
||||
USER_NAME=username.
|
||||
|
||||
|
||||
INETD=Y | N
|
||||
INETD=Y specifies that inetd(8) should automatically be started.
|
||||
That means you can telnet and ftp to your virtual machine.
|
||||
|
||||
|
||||
OPERATION
|
||||
Diskless System
|
||||
The floppy144.vfd virtual machine is a diskless system that works
|
||||
entirely from RAM. The file system is actually a RAM disk that is cre‐
|
||||
ated from the initrd(4) file on the floppy image.
|
||||
|
||||
Anything you'll do from inside the virtual machine, for instance edit‐
|
||||
ing a config file, will be lost when you reboot the machine. So, if you
|
||||
ever asked yourself if rm -fr / (root privileges required) really
|
||||
deletes all files from all mounted partitions, the floppy144.vfd VM is
|
||||
the right place to test it (Yes, it does).
|
||||
|
||||
The VM uses a RAM disk, because the Linux kernel had to be stripped
|
||||
down to essential features to fit on a 1.44 MB floppy. It has no floppy
|
||||
driver, no disk file system drivers and no block layer (cannot use
|
||||
disks of any type).
|
||||
|
||||
|
||||
System startup
|
||||
The kernel boots up very quickly and the init script (/sbin/init) waits
|
||||
5 seconds. In these 5 seconds you can:
|
||||
|
||||
Press 'm' to manually enter the time zone and the IPv4 parame‐
|
||||
ters. These will be queried interactively.
|
||||
Press 't' to manually enter the time zone only.
|
||||
Press 's' to escape to a shell.
|
||||
|
||||
If you don't want to 5 seconds for continuing the init process, you can
|
||||
press any other key to speed things up. At the end of the init script
|
||||
you should see thatvlmcsd(8) has started. You should also see the IP
|
||||
addresses and all user names and passwords.
|
||||
|
||||
|
||||
Logging into the system
|
||||
There are 5 local logins provided on /dev/tty2 to /dev/tty6. To switch
|
||||
to these logins, simply press ALT-F2 to ALT-F6. To return to the con‐
|
||||
sole on /dev/tty1, press ALT-F1. If inetd(8) is running you can also
|
||||
use telnet(1). This allows you use a terminal program (e.g. putty) that
|
||||
can utilize your keyboard layout, can be resized and has full UTF-8
|
||||
support. The local terminals support US keyboard layout only. Please be
|
||||
aware that telnet(1) is unencrypted and everything including passwords
|
||||
is transmitted in clear text. There is not enough space for an ssh
|
||||
server like sshd(8) or dropbear(8).
|
||||
|
||||
The floppy image only provides basic Unix commands. Type busybox or ll
|
||||
/bin to get a list. The only editor available is vi(1). If you don't
|
||||
like vi, you may transfer config files via ftp(1) edit them with the
|
||||
editor of your choice and transfer them back to the floppy144.vfd VM.
|
||||
|
||||
|
||||
The menu system
|
||||
You'll find a menu system on /dev/tty8 (press ALT-F8 to see it). It
|
||||
allows you performing some administrative tasks and to view various
|
||||
system information. It is mainly for users that do not have much expe‐
|
||||
rience with Unix commands.
|
||||
|
||||
|
||||
1) (Re)start vlmcsd
|
||||
Starts or restarts vlmcsd(8). This is useful if you changed
|
||||
/etc/vlmcsd.ini(5).
|
||||
|
||||
|
||||
2) Stop vlmcsd
|
||||
Stops vlmcsd(8).
|
||||
|
||||
|
||||
3) (Re)start inetd
|
||||
Starts or restarts inetd(8). If inetd(8) is restarted, current
|
||||
clients connected via telnet(1) or ftp(1) will not be dropped.
|
||||
They can continue their sessions. This is useful if you changed
|
||||
/etc/inetd.conf(5).
|
||||
|
||||
|
||||
4) Stop inet
|
||||
Stops inetd(8). All clients connected via telnet(1) or ftp(1)
|
||||
will be dropped immediately.
|
||||
|
||||
|
||||
5) Change the time zone
|
||||
Just in case you missed pressing 't' during system startup. This
|
||||
also restarts vlmcsd(8) if it was running to notify it that the
|
||||
time zone has changed. Restarting vlmcsd(8) allows currently
|
||||
connected clients to finish their activation.
|
||||
|
||||
|
||||
k) Change keyboard layout
|
||||
This allows you to select a different keyboard layout.
|
||||
|
||||
|
||||
6) Show all kernel boot parameters
|
||||
Shows all parameters passed to the kernel via syslinux.cfg. If
|
||||
you experience any unexpected behavior, you can use this to
|
||||
check if your APPEND line in syslinux.cfg is correct. The output
|
||||
is piped through less(1). So press 'q' to return to the menu.
|
||||
|
||||
|
||||
7) Show boot log (dmesg)
|
||||
Shows the boot log of the kernel. The output is piped through
|
||||
less(1). So press 'q' to return to the menu.
|
||||
|
||||
|
||||
8) Show TCP/IP configuration
|
||||
Shows the TCP/IP configuration, listening sockets and current
|
||||
TCP and UDP connections. Useful, if you problems with net con‐
|
||||
nectivity. The output is piped through less(1). So press 'q' to
|
||||
return to the menu.
|
||||
|
||||
|
||||
9) Show running processes
|
||||
Shows all processes including memory and CPU usage. Display will
|
||||
updated every second. Press 'q' or CTRL-C to return to the menu.
|
||||
|
||||
|
||||
s) Shutdown
|
||||
Shuts down the floppy144.vfd virtual machine. Proper shutdown is
|
||||
not required. It is ok to use a hard power off in your virtual‐
|
||||
ization program.
|
||||
|
||||
|
||||
r) Reboot
|
||||
Reboots the floppy144.vfd virtual machine. Proper reboot is not
|
||||
required. It is ok to use a hard reset in your virtualization
|
||||
program.
|
||||
|
||||
|
||||
PERMANENT CHANGES OF INITRD
|
||||
If you want to change any file or script of the file system (e.g. the
|
||||
init script /sbin/init or /etc/vlmcsd.ini), you'll need to mount the
|
||||
floppy image, unpack the initrd(4) file, make any modfications you
|
||||
like, create a new initrd(4) file and copy it to the mounted floppy.
|
||||
|
||||
To unpack the initrd(4) file you'll need xz(1) (or lzma(1) on older
|
||||
unix-like OSses) and cpio(1). These can be installed using your package
|
||||
manager on all major distros. It is ok to use the BSD version of
|
||||
cpio(1). No need to get the GNU version for BSD users. Provided the
|
||||
floppy is mounted in /mnt/floppy do the following:
|
||||
|
||||
Create an empty directory
|
||||
mkdir ~/vlmcsd-floppy-initrd
|
||||
|
||||
cd into that directory
|
||||
cd ~/vlmcsd-floppy-initrd
|
||||
|
||||
Unpack initrd
|
||||
cat /mnt/floppy/initrd | unlzma | cpio -i
|
||||
|
||||
After applying your changes build a new initrd(4) file:
|
||||
|
||||
|
||||
cd into your directory
|
||||
cd ~/vlmcsd-floppy-initrd
|
||||
|
||||
Create the packed file
|
||||
find . | cpio -o -H newc | lzma > /mnt/floppy/initrd
|
||||
|
||||
Do not try to use 'lzma -9' to achive better compression. The kernel
|
||||
can't read the resulting file. While customizing the initrd(4) file
|
||||
works on almost any unix-like OS, it does not work on Windows even not
|
||||
with Cygwin. The reason is that the NTFS file system can't handle uids
|
||||
and gids. These cannot be preserved when unpacking the cpio(1) archive
|
||||
to NTFS. If you use the WSL subsystem of Windows 10 Redstone (Anniver‐
|
||||
sary Update) and later, you must make sure to unpack the initrd(4) file
|
||||
to a directory on VolFs (normally everything that is not mounted under
|
||||
/mnt). The initrd(4) file can be on a VolFs or DriveFs.
|
||||
|
||||
|
||||
FAQ
|
||||
On what distro is the floppy image based?
|
||||
None. Besides the boot loader ldlinux.sys, there are only three bina‐
|
||||
ries: The Linux kernel bzImage, busybox(1) and vlmcsdmulti-x86-musl-
|
||||
static. bzImage and busybox(1) have been compiled with carefully
|
||||
selected configuration parameters not found in any distro. This was
|
||||
neccesary to fit everything on a 1.44 MB floppy.
|
||||
|
||||
|
||||
Why is a rather old Linux kernel (3.12) used?
|
||||
Linux 3.12 is the last kernel that can be booted with 16 MB of RAM.
|
||||
Beginning with Linux 3.13 it requires much more memory (about 80 MB) to
|
||||
boot. The floppy image is regularly tested with newer kernels. Every‐
|
||||
thing works except that you need to assign much more main memory to the
|
||||
virtual machine.
|
||||
|
||||
|
||||
Can the floppy be booted on bare metal?
|
||||
Basically yes. However, only Intel Pro/1000 and AMD PCNET32 ethernet
|
||||
cards are supported by the kernel. In addition there is no USB support
|
||||
compiled into the kernel. That means you can only use an IBM AT or IBM
|
||||
PS/2 keyboard which are not available on newer hardware.
|
||||
|
||||
|
||||
FILES
|
||||
syslinux.cfg, vlmcsd.ini(5)
|
||||
|
||||
|
||||
BUGS
|
||||
IPv6 cannot be configured with static or manual parameters.
|
||||
DHCPv6 is not supported.
|
||||
´ip route add ...' does not work. Use 'route add ...' instead.
|
||||
|
||||
|
||||
AUTHOR
|
||||
floppy144.vfd has been created by Hotbird64
|
||||
|
||||
|
||||
CREDITS
|
||||
Linus Torvalds et al. for the Linux kernel
|
||||
Erik Andersen et al. for the original uClibc
|
||||
Waldemar Brodkorb et al. for uClibc-ng
|
||||
Denys Vlasenko et al. for BusyBox
|
||||
H. Peter Anvin et al. for SYSLINUX
|
||||
|
||||
|
||||
SEE ALSO
|
||||
vlmcsd(8), vlmcsd.ini(5), initrd(4), busybox(1), syslinux(1)
|
||||
|
||||
|
||||
|
||||
Hotbird64 June 2016 VLMCSD-FLOPPY(7)
|
10
vlmcsd.7
10
vlmcsd.7
@ -1,4 +1,4 @@
|
||||
.TH VLMCSD 7 "June 2014" "Hotbird64" "KMS Activation Manual"
|
||||
.TH VLMCSD 7 "March 2016" "Hotbird64" "KMS Activation Manual"
|
||||
|
||||
.SH NAME
|
||||
vlmcsd\ \-\ a guide to KMS activation using vlmcsd
|
||||
@ -41,6 +41,14 @@ Office 2013: http://technet.microsoft.com/en-us/library/dn385360.aspx
|
||||
.PP
|
||||
These lists only include products that Microsoft sells to corporations via volume license contracts. For Windows there are inofficial GVLKs that work with consumer-only versions of Windows. Here is a list:
|
||||
.PP
|
||||
TX9XD\-98N7V\-6WMQ6\-BX7FG\-H8Q99 - Windows 10 Home
|
||||
.br
|
||||
3KHY7\-WNT83\-DGQKR\-F7HPR\-844BM - Windows 10 Home N
|
||||
.br
|
||||
7HNRX\-D7KGG\-3K4RQ\-4WPJ4\-YTDFH - Windows 10 Home Single Language
|
||||
.br
|
||||
PVMJN\-6DFY6\-9CCP6\-7BKTT\-D3WVR - Windows 10 Home Country Specific
|
||||
.br
|
||||
789NJ\-TQK6T\-6XTH8\-J39CJ\-J8D3P - Windows 8.1 Professional with Media Center
|
||||
.br
|
||||
M9Q9P\-WNJJT\-6PXPY\-DWX8H\-6XWKK - Windows 8.1 Core
|
||||
|
@ -76,6 +76,10 @@ DESCRIPTION
|
||||
via volume license contracts. For Windows there are inofficial GVLKs
|
||||
that work with consumer-only versions of Windows. Here is a list:
|
||||
|
||||
TX9XD-98N7V-6WMQ6-BX7FG-H8Q99 - Windows 10 Home
|
||||
3KHY7-WNT83-DGQKR-F7HPR-844BM - Windows 10 Home N
|
||||
7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH - Windows 10 Home Single Language
|
||||
PVMJN-6DFY6-9CCP6-7BKTT-D3WVR - Windows 10 Home Country Specific
|
||||
789NJ-TQK6T-6XTH8-J39CJ-J8D3P - Windows 8.1 Professional with Media
|
||||
Center
|
||||
M9Q9P-WNJJT-6PXPY-DWX8H-6XWKK - Windows 8.1 Core
|
||||
@ -219,4 +223,4 @@ SEE ALSO
|
||||
|
||||
|
||||
|
||||
Hotbird64 June 2014 VLMCSD(7)
|
||||
Hotbird64 March 2016 VLMCSD(7)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Tue Mar 8 00:06:21 2016 -->
|
||||
<!-- CreationDate: Fri Jun 17 14:16:33 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@ -169,8 +169,16 @@ inofficial GVLKs that work with consumer-only versions of
|
||||
Windows. Here is a list:</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">789NJ−TQK6T−6XTH8−J39CJ−J8D3P
|
||||
- Windows 8.1 Professional with Media Center <br>
|
||||
<p style="margin-left:11%; margin-top: 1em">TX9XD−98N7V−6WMQ6−BX7FG−H8Q99
|
||||
- Windows 10 Home <br>
|
||||
3KHY7−WNT83−DGQKR−F7HPR−844BM -
|
||||
Windows 10 Home N <br>
|
||||
7HNRX−D7KGG−3K4RQ−4WPJ4−YTDFH -
|
||||
Windows 10 Home Single Language <br>
|
||||
PVMJN−6DFY6−9CCP6−7BKTT−D3WVR -
|
||||
Windows 10 Home Country Specific <br>
|
||||
789NJ−TQK6T−6XTH8−J39CJ−J8D3P -
|
||||
Windows 8.1 Professional with Media Center <br>
|
||||
M9Q9P−WNJJT−6PXPY−DWX8H−6XWKK -
|
||||
Windows 8.1 Core <br>
|
||||
7B9N3−D94CG−YTVHR−QBPX3−RJP64 -
|
||||
|
BIN
vlmcsd.7.pdf
BIN
vlmcsd.7.pdf
Binary file not shown.
@ -76,6 +76,10 @@ DESCRIPTION
|
||||
via volume license contracts. For Windows there are inofficial GVLKs
|
||||
that work with consumer-only versions of Windows. Here is a list:
|
||||
|
||||
TX9XD-98N7V-6WMQ6-BX7FG-H8Q99 - Windows 10 Home
|
||||
3KHY7-WNT83-DGQKR-F7HPR-844BM - Windows 10 Home N
|
||||
7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH - Windows 10 Home Single Language
|
||||
PVMJN-6DFY6-9CCP6-7BKTT-D3WVR - Windows 10 Home Country Specific
|
||||
789NJ-TQK6T-6XTH8-J39CJ-J8D3P - Windows 8.1 Professional with Media
|
||||
Center
|
||||
M9Q9P-WNJJT-6PXPY-DWX8H-6XWKK - Windows 8.1 Core
|
||||
@ -219,4 +223,4 @@ SEE ALSO
|
||||
|
||||
|
||||
|
||||
Hotbird64 June 2014 VLMCSD(7)
|
||||
Hotbird64 March 2016 VLMCSD(7)
|
||||
|
15
vlmcsd.8
15
vlmcsd.8
@ -1,5 +1,5 @@
|
||||
.mso www.tmac
|
||||
.TH VLMCSD 8 "September 2015" "Hotbird64" "KMS Activation Manual"
|
||||
.TH VLMCSD 8 "June 2016" "Hotbird64" "KMS Activation Manual"
|
||||
.LO 8
|
||||
|
||||
.SH NAME
|
||||
@ -27,6 +27,9 @@ All options that do no require an argument may be combined with a single dash, f
|
||||
.IP "\fB-h\fR or \fB-?\fR"
|
||||
Displays help.
|
||||
|
||||
.IP "\fB-V\fR"
|
||||
Displays extended version information. This includes the compiler used to build vlmcsd, the intended platform and flags (compile time options) to build vlmcsd. If you have the source code of vlmcsd, you can type \fBmake help\fR (or \fBgmake help\fR on systems that do not use the GNU version of \fBmake\fR(1) by default) to see the meaning of those flags.
|
||||
|
||||
.IP "\fB-L\fR \fIipaddress\fR[:\fIport\fR]"
|
||||
Instructs vlmcsd to listen on \fIipaddress\fR with optional \fIport\fR (default 1688). You can use this option more than once. If you do not specify \fB-L\fR at least once, IP addresses 0.0.0.0 (IPv4) and :: (IPv6) are used. If the IP address contains colons (IPv6) you must enclose the IP address in brackets if you specify the optional port, e.g. [2001:db8::dead:beef]:1688.
|
||||
.PP
|
||||
@ -39,11 +42,8 @@ If you specify a link local IPv6 address (fe80::/10, usually starting with fe80:
|
||||
.IP "\fB-P\fR \fIport"
|
||||
Use TCP \fIport\fR for all subsequent \fB-L\fR statements that do not include an optional port. If you use \fB-P\fR and \fB-L\fR, \fB-P\fR must be specified before \fB-L\fR.
|
||||
|
||||
.IP "\fB-4\fR and \fB-6\fR"
|
||||
Used to control the use of IPv4 and IPv4 if you did not use -L. If you specify both \fB-4\fR and \fB-6\fR or none, vlmcsd uses both protocols. If you specify only one, that protocol will be used only. \fBThese options are deprecated and will be removed.\fR
|
||||
|
||||
.IP "\fB-I\fR"
|
||||
This option is deprecated and does nothing. It is provided for compatibility with svn681 and earlier versions only. It will be removed in a future release.
|
||||
.IP "\fB-F0\fR and \fB-F1\fR
|
||||
Allow (\fB-F1\fR) or disallow (\fB-F0\fR) binding to IP addresses that are currently not configured on your system. The default is \fB-F0\fR. \fB-F1\fR allows you to bind to an IP address that may be configured after you started \fBvlmcsd\fR. \fBvlmcsd\fR will listen on that address as soon as it becomes available. This feature is only available under Linux (IPv4 and IPv6) and FreeBSD (IPv4 only). FreeBSD allows this feature only for the root user (more correctly: processes that have the PRIV_NETINET_BINDANY privilege). Linux does not require a capability for this.
|
||||
|
||||
.IP "\fB-t\fR \fIseconds\fR"
|
||||
Timeout the TCP connection with the client after \fIseconds\fR seconds. After sending an activation request. RPC keeps the TCP connection for a while. The default is 30 seconds. You may specify a shorter period to free ressources on your device faster. This is useful for devices with limited main memory or if you used \fB-m\fR to limit the concurrent clients that may request activation. Microsoft RPC clients disconnect after 30 seconds by default. Setting \fIseconds\fR to a greater value does not make much sense.
|
||||
@ -79,9 +79,6 @@ The native Windows version never daemonizes and always behaves as if \fB-D\fR ha
|
||||
.IP "\fB-e\fR"
|
||||
If specified, vlmcsd ignores \fB-l\fR and writes all logging output to \fBstdout\fR(3). This is mainly useful for testing and debugging and often combined with \fB-D\fR.
|
||||
|
||||
.IP "\fB-f\fR"
|
||||
This flag combines \fB-D\fR and \fB-e\fR. So typing "vlmcsd -f" is identical to "vlmcsd -De". The purpose of \fB-f\fR is to provide compatibility with previous versions of vlmcsd. \fBThis option is deprecated and will be removed.\fR
|
||||
|
||||
.IP "\fB-v\fR"
|
||||
Use verbose logging. Logs every parameter of the base request and the base response. It also logs the HWID of the KMS server if KMS protocol version 6 is used. This option is mainly for debugging purposes. It only has an effect if some form of logging is used. Thus \fB-v\fR does not make sense if not used with \fB-l\fR, \fB-e\fR or \fB-f\fR.
|
||||
|
||||
|
@ -52,6 +52,14 @@ OPTIONS
|
||||
Displays help.
|
||||
|
||||
|
||||
-V Displays extended version information. This includes the com‐
|
||||
piler used to build vlmcsd, the intended platform and flags
|
||||
(compile time options) to build vlmcsd. If you have the source
|
||||
code of vlmcsd, you can type make help (or gmake help on systems
|
||||
that do not use the GNU version of make(1) by default) to see
|
||||
the meaning of those flags.
|
||||
|
||||
|
||||
-L ipaddress[:port]
|
||||
Instructs vlmcsd to listen on ipaddress with optional port
|
||||
(default 1688). You can use this option more than once. If you
|
||||
@ -82,16 +90,16 @@ OPTIONS
|
||||
ified before -L.
|
||||
|
||||
|
||||
-4 and -6
|
||||
Used to control the use of IPv4 and IPv4 if you did not use -L.
|
||||
If you specify both -4 and -6 or none, vlmcsd uses both proto‐
|
||||
cols. If you specify only one, that protocol will be used only.
|
||||
These options are deprecated and will be removed.
|
||||
|
||||
|
||||
-I This option is deprecated and does nothing. It is provided for
|
||||
compatibility with svn681 and earlier versions only. It will be
|
||||
removed in a future release.
|
||||
-F0 and -F1
|
||||
Allow (-F1) or disallow (-F0) binding to IP addresses that are
|
||||
currently not configured on your system. The default is -F0. -F1
|
||||
allows you to bind to an IP address that may be configured after
|
||||
you started vlmcsd. vlmcsd will listen on that address as soon
|
||||
as it becomes available. This feature is only available under
|
||||
Linux (IPv4 and IPv6) and FreeBSD (IPv4 only). FreeBSD allows
|
||||
this feature only for the root user (more correctly: processes
|
||||
that have the PRIV_NETINET_BINDANY privilege). Linux does not
|
||||
require a capability for this.
|
||||
|
||||
|
||||
-t seconds
|
||||
@ -181,12 +189,6 @@ OPTIONS
|
||||
often combined with -D.
|
||||
|
||||
|
||||
-f This flag combines -D and -e. So typing "vlmcsd -f" is identical
|
||||
to "vlmcsd -De". The purpose of -f is to provide compatibility
|
||||
with previous versions of vlmcsd. This option is deprecated and
|
||||
will be removed.
|
||||
|
||||
|
||||
-v Use verbose logging. Logs every parameter of the base request
|
||||
and the base response. It also logs the HWID of the KMS server
|
||||
if KMS protocol version 6 is used. This option is mainly for
|
||||
@ -521,4 +523,4 @@ SEE ALSO
|
||||
|
||||
|
||||
|
||||
Hotbird64 September 2015 VLMCSD(8)
|
||||
Hotbird64 June 2016 VLMCSD(8)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Tue Mar 8 00:06:22 2016 -->
|
||||
<!-- CreationDate: Fri Jun 17 14:16:33 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@ -112,6 +112,27 @@ is optional. Thus "vlmcsd -r 2" and "vlmcsd
|
||||
|
||||
<p style="margin-left:22%;">Displays help.</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-V</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>Displays extended version information. This includes the
|
||||
compiler used to build vlmcsd, the intended platform and
|
||||
flags (compile time options) to build vlmcsd. If you have
|
||||
the source code of vlmcsd, you can type <b>make help</b> (or
|
||||
<b>gmake help</b> on systems that do not use the GNU version
|
||||
of <b>make</b>(1) by default) to see the meaning of those
|
||||
flags.</p> </td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:11%;"><b>-L</b>
|
||||
<i>ipaddress</i>[:<i>port</i>]</p>
|
||||
|
||||
@ -149,30 +170,19 @@ subsequent <b>-L</b> statements that do not include an
|
||||
optional port. If you use <b>-P</b> and <b>-L</b>, <b>-P</b>
|
||||
must be specified before <b>-L</b>.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>-4</b> and <b>-6</b></p>
|
||||
<p style="margin-left:11%;"><b>-F0</b> and <b>-F1</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Used to control the use of IPv4
|
||||
and IPv4 if you did not use -L. If you specify both
|
||||
<b>-4</b> and <b>-6</b> or none, vlmcsd uses both protocols.
|
||||
If you specify only one, that protocol will be used only.
|
||||
<b>These options are deprecated and will be removed.</b></p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-I</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>This option is deprecated and does nothing. It is
|
||||
provided for compatibility with svn681 and earlier versions
|
||||
only. It will be removed in a future release.</p></td></tr>
|
||||
</table>
|
||||
<p style="margin-left:22%;">Allow (<b>-F1</b>) or disallow
|
||||
(<b>-F0</b>) binding to IP addresses that are currently not
|
||||
configured on your system. The default is <b>-F0</b>.
|
||||
<b>-F1</b> allows you to bind to an IP address that may be
|
||||
configured after you started <b>vlmcsd</b>. <b>vlmcsd</b>
|
||||
will listen on that address as soon as it becomes available.
|
||||
This feature is only available under Linux (IPv4 and IPv6)
|
||||
and FreeBSD (IPv4 only). FreeBSD allows this feature only
|
||||
for the root user (more correctly: processes that have the
|
||||
PRIV_NETINET_BINDANY privilege). Linux does not require a
|
||||
capability for this.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>-t</b> <i>seconds</i></p>
|
||||
|
||||
@ -321,21 +331,6 @@ combined with <b>-D</b>.</p></td></tr>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-f</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>This flag combines <b>-D</b> and <b>-e</b>. So typing
|
||||
"vlmcsd -f" is identical to "vlmcsd
|
||||
-De". The purpose of <b>-f</b> is to provide
|
||||
compatibility with previous versions of vlmcsd. <b>This
|
||||
option is deprecated and will be removed.</b></p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-v</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="78%">
|
||||
|
BIN
vlmcsd.8.pdf
BIN
vlmcsd.8.pdf
Binary file not shown.
@ -52,6 +52,14 @@ OPTIONS
|
||||
Displays help.
|
||||
|
||||
|
||||
-V Displays extended version information. This includes the com‐
|
||||
piler used to build vlmcsd, the intended platform and flags
|
||||
(compile time options) to build vlmcsd. If you have the source
|
||||
code of vlmcsd, you can type make help (or gmake help on systems
|
||||
that do not use the GNU version of make(1) by default) to see
|
||||
the meaning of those flags.
|
||||
|
||||
|
||||
-L ipaddress[:port]
|
||||
Instructs vlmcsd to listen on ipaddress with optional port
|
||||
(default 1688). You can use this option more than once. If you
|
||||
@ -82,16 +90,16 @@ OPTIONS
|
||||
ified before -L.
|
||||
|
||||
|
||||
-4 and -6
|
||||
Used to control the use of IPv4 and IPv4 if you did not use -L.
|
||||
If you specify both -4 and -6 or none, vlmcsd uses both proto‐
|
||||
cols. If you specify only one, that protocol will be used only.
|
||||
These options are deprecated and will be removed.
|
||||
|
||||
|
||||
-I This option is deprecated and does nothing. It is provided for
|
||||
compatibility with svn681 and earlier versions only. It will be
|
||||
removed in a future release.
|
||||
-F0 and -F1
|
||||
Allow (-F1) or disallow (-F0) binding to IP addresses that are
|
||||
currently not configured on your system. The default is -F0. -F1
|
||||
allows you to bind to an IP address that may be configured after
|
||||
you started vlmcsd. vlmcsd will listen on that address as soon
|
||||
as it becomes available. This feature is only available under
|
||||
Linux (IPv4 and IPv6) and FreeBSD (IPv4 only). FreeBSD allows
|
||||
this feature only for the root user (more correctly: processes
|
||||
that have the PRIV_NETINET_BINDANY privilege). Linux does not
|
||||
require a capability for this.
|
||||
|
||||
|
||||
-t seconds
|
||||
@ -181,12 +189,6 @@ OPTIONS
|
||||
often combined with -D.
|
||||
|
||||
|
||||
-f This flag combines -D and -e. So typing "vlmcsd -f" is identical
|
||||
to "vlmcsd -De". The purpose of -f is to provide compatibility
|
||||
with previous versions of vlmcsd. This option is deprecated and
|
||||
will be removed.
|
||||
|
||||
|
||||
-v Use verbose logging. Logs every parameter of the base request
|
||||
and the base response. It also logs the HWID of the KMS server
|
||||
if KMS protocol version 6 is used. This option is mainly for
|
||||
@ -521,4 +523,4 @@ SEE ALSO
|
||||
|
||||
|
||||
|
||||
Hotbird64 September 2015 VLMCSD(8)
|
||||
Hotbird64 June 2016 VLMCSD(8)
|
||||
|
213
vlmcsd.c
213
vlmcsd.c
@ -7,6 +7,10 @@
|
||||
#error Microsoft RPC is only available on Windows and Cygwin
|
||||
#endif
|
||||
|
||||
#if defined(USE_MSRPC) && defined(SIMPLE_SOCKETS)
|
||||
#error You can only define either USE_MSRPC or SIMPLE_SOCKETS but not both
|
||||
#endif
|
||||
|
||||
#if defined(NO_SOCKETS) && defined(USE_MSRPC)
|
||||
#error Cannot use inetd mode with Microsoft RPC
|
||||
#endif
|
||||
@ -39,7 +43,9 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#ifndef NO_LIMIT
|
||||
#include <semaphore.h>
|
||||
#endif // NO_LIMIT
|
||||
#endif // !_WIN32
|
||||
|
||||
#if __APPLE__
|
||||
@ -66,18 +72,20 @@
|
||||
#include "ntservice.h"
|
||||
#include "helpers.h"
|
||||
|
||||
#ifdef ENABLE_DEPRECATED_OPTIONS
|
||||
static const char* const optstring = "N:B:m:t:w:0:3:H:A:R:u:g:L:p:i:P:l:r:U:W:C:F:SsfeDd46VvIqkZ";
|
||||
#else // !ENABLE_DEPRECATED_OPTIONS
|
||||
static const char* const optstring = "N:B:m:t:w:0:3:H:A:R:u:g:L:p:i:P:l:r:U:W:C:F:SseDdVvqkZ";
|
||||
#endif // !ENABLE_DEPRECATED_OPTIONS
|
||||
|
||||
static const char* const optstring = "N:B:m:t:w:0:3:H:A:R:u:g:L:p:i:P:l:r:U:W:C:SsfeDd46VvIdqkZ";
|
||||
|
||||
#if !defined(NO_SOCKETS)
|
||||
#if !defined(USE_MSRPC)
|
||||
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||
static uint_fast8_t maxsockets = 0;
|
||||
static int_fast8_t haveIPv6Stack = 0;
|
||||
static int_fast8_t haveIPv4Stack = 0;
|
||||
|
||||
#ifdef ENABLE_DEPRECATED_OPTIONS
|
||||
static int_fast8_t v6required = 0;
|
||||
static int_fast8_t v4required = 0;
|
||||
#endif // !defined(USE_MSRPC)
|
||||
#endif // !defined(NO_SOCKETS)
|
||||
#endif // ENABLE_DEPRECATED_OPTIONS
|
||||
#endif // !defined(NO_SOCKETS) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||
|
||||
#ifdef _NTSERVICE
|
||||
static int_fast8_t installService = 0;
|
||||
@ -107,11 +115,16 @@ static IniFileParameter_t IniFileParameterList[] =
|
||||
{ "RandomizationLevel", INI_PARAM_RANDOMIZATION_LEVEL },
|
||||
{ "LCID", INI_PARAM_LCID },
|
||||
# endif // NO_RANDOM_EPID
|
||||
# ifdef USE_MSRPC
|
||||
# if !defined(NO_SOCKETS) && (defined(USE_MSRPC) || defined(SIMPLE_SOCKETS))
|
||||
{ "Port", INI_PARAM_PORT },
|
||||
# endif // USE_MSRPC
|
||||
# endif // defined(USE_MSRPC) || defined(SIMPLE_SOCKETS)
|
||||
# if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||
# ifndef SIMPLE_SOCKETS
|
||||
{ "Listen", INI_PARAM_LISTEN },
|
||||
# endif // SIMPLE_SOCKETS
|
||||
# if HAVE_FREEBIND
|
||||
{ "FreeBind", INI_PARAM_FREEBIND },
|
||||
# endif // HAVE_FREEBIND
|
||||
# if !defined(NO_LIMIT) && !__minix__
|
||||
{ "MaxWorkers", INI_PARAM_MAX_WORKERS },
|
||||
# endif // !defined(NO_LIMIT) && !__minix__
|
||||
@ -200,10 +213,10 @@ static char GetNumericId(gid_t *restrict id, const char *const c)
|
||||
gid_t temp;
|
||||
|
||||
temp = (gid_t)strtoll(c, &endptr, 10);
|
||||
|
||||
if (!*endptr) *id = temp;
|
||||
if (*endptr || temp == (gid_t)-1) errno = EINVAL;
|
||||
|
||||
return *endptr;
|
||||
return *endptr || *id == (gid_t)-1;
|
||||
}
|
||||
|
||||
|
||||
@ -267,14 +280,15 @@ static __noreturn void usage()
|
||||
" -C <LCID>\t\tuse fixed <LCID> in random ePIDs\n"
|
||||
#endif // NO_RANDOM_EPID
|
||||
#ifndef NO_SOCKETS
|
||||
#ifndef USE_MSRPC
|
||||
" -4\t\t\tuse IPv4\n"
|
||||
" -6\t\t\tuse IPv6\n"
|
||||
#if !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||
" -L <address>[:<port>]\tlisten on IP address <address> with optional <port>\n"
|
||||
" -P <port>\t\tset TCP port <port> for subsequent -L statements (default 1688)\n"
|
||||
#else // USE_MSRPC
|
||||
#if HAVE_FREEBIND
|
||||
" -F0, -F1\t\tdisable/enable binding to foreign IP addresses\n"
|
||||
#endif // HAVE_FREEBIND
|
||||
#else // defined(USE_MSRPC) || defined(SIMPLE_SOCKETS)
|
||||
" -P <port>\t\tuse TCP port <port> (default 1688)\n"
|
||||
#endif // USE_MSRPC
|
||||
#endif // defined(USE_MSRPC) || defined(SIMPLE_SOCKETS)
|
||||
#if !defined(NO_LIMIT) && !__minix__
|
||||
" -m <clients>\t\tHandle max. <clients> simultaneously (default no limit)\n"
|
||||
#endif // !defined(NO_LIMIT) && !__minix__
|
||||
@ -293,11 +307,8 @@ static __noreturn void usage()
|
||||
#endif // NO_LOG
|
||||
#ifndef _WIN32 //
|
||||
" -D run in foreground\n"
|
||||
" -f run in foreground"
|
||||
#ifndef NO_LOG
|
||||
" and log to stdout"
|
||||
#endif // NO_LOG
|
||||
"\n"
|
||||
#else // _WIN32
|
||||
" -D does nothing. Provided for compatibility with POSIX versions only\n"
|
||||
#endif // _WIN32
|
||||
#endif // NO_SOCKETS
|
||||
#ifndef USE_MSRPC
|
||||
@ -329,8 +340,10 @@ static __noreturn void usage()
|
||||
" -q\t\t\tdon't log verbose (default)\n"
|
||||
#endif // NO_VERBOSE_LOG
|
||||
#endif // NO_LOG
|
||||
" -V display version information and exit"
|
||||
"\n",
|
||||
#ifndef NO_VERSION_INFORMATION
|
||||
" -V display version information and exit\n"
|
||||
#endif // NO_VERSION_INFORMATION
|
||||
,
|
||||
Version, global_argv[0]);
|
||||
|
||||
exit(!0);
|
||||
@ -507,21 +520,22 @@ static BOOL setIniFileParameter(uint_fast8_t id, const char *const iniarg)
|
||||
|
||||
# endif // NO_RANDOM_EPID
|
||||
|
||||
# ifdef USE_MSRPC
|
||||
# if (defined(USE_MSRPC) || defined(SIMPLE_SOCKETS)) && !defined(NO_SOCKETS)
|
||||
|
||||
case INI_PARAM_PORT:
|
||||
defaultport = allocateStringArgument(iniarg);
|
||||
break;
|
||||
|
||||
# endif // USE_MSRPC
|
||||
# endif // (defined(USE_MSRPC) || defined(SIMPLE_SOCKETS)) && !defined(NO_SOCKETS
|
||||
|
||||
# if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||
# if !defined(NO_SOCKETS) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||
|
||||
case INI_PARAM_LISTEN:
|
||||
maxsockets++;
|
||||
return TRUE;
|
||||
|
||||
# if !defined(NO_LIMIT) && !__minix__
|
||||
# endif // !defined(NO_SOCKETS) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||
# if !defined(NO_LIMIT) && !defined(NO_SOCKETS) && !__minix__
|
||||
|
||||
case INI_PARAM_MAX_WORKERS:
|
||||
# ifdef USE_MSRPC
|
||||
@ -531,8 +545,7 @@ static BOOL setIniFileParameter(uint_fast8_t id, const char *const iniarg)
|
||||
# endif // !USE_MSRPC
|
||||
break;
|
||||
|
||||
# endif // !defined(NO_LIMIT) && !__minix__
|
||||
# endif // NO_SOCKETS
|
||||
# endif // !defined(NO_LIMIT) && !defined(NO_SOCKETS) && !__minix__
|
||||
|
||||
# ifndef NO_PID_FILE
|
||||
|
||||
@ -593,6 +606,14 @@ static BOOL setIniFileParameter(uint_fast8_t id, const char *const iniarg)
|
||||
|
||||
# endif // USE_MSRPC
|
||||
|
||||
# if HAVE_FREEBIND
|
||||
|
||||
case INI_PARAM_FREEBIND:
|
||||
success = getIniFileArgumentBool(&freebind, iniarg);
|
||||
break;
|
||||
|
||||
# endif // HAVE_FREEBIND
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
@ -729,7 +750,7 @@ static BOOL handleIniFileParameter(const char *s)
|
||||
}
|
||||
|
||||
|
||||
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||
#if !defined(NO_SOCKETS) && !defined(SIMPLE_SOCKETS) && !defined(USE_MSRPC)
|
||||
static BOOL setupListeningSocketsFromIniFile(const char *s)
|
||||
{
|
||||
if (!maxsockets) return TRUE;
|
||||
@ -740,7 +761,7 @@ static BOOL setupListeningSocketsFromIniFile(const char *s)
|
||||
IniFileErrorMessage = IniFileErrorBuffer;
|
||||
return addListeningSocket(s);
|
||||
}
|
||||
#endif // !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||
#endif // !defined(NO_SOCKETS) && !defined(SIMPLE_SOCKETS) && !defined(USE_MSRPC)
|
||||
|
||||
|
||||
static BOOL readIniFile(const uint_fast8_t pass)
|
||||
@ -775,7 +796,7 @@ static BOOL readIniFile(const uint_fast8_t pass)
|
||||
!setEpidFromIniFileLine(&s, appIndex) ||
|
||||
!setHwIdFromIniFileLine(&s, appIndex);
|
||||
}
|
||||
# if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||
# if !defined(NO_SOCKETS) && !defined(SIMPLE_SOCKETS) && !defined(USE_MSRPC)
|
||||
else if (pass == INI_FILE_PASS_2)
|
||||
{
|
||||
lineParseError = !setupListeningSocketsFromIniFile(s);
|
||||
@ -784,7 +805,7 @@ static BOOL readIniFile(const uint_fast8_t pass)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
# endif // NO_SOCKETS
|
||||
# endif // !defined(NO_SOCKETS) && && !defined(SIMPLE_SOCKETS) && !defined(USE_MSRPC)
|
||||
|
||||
if (lineParseError)
|
||||
{
|
||||
@ -1065,10 +1086,21 @@ static void parseGeneralArguments() {
|
||||
#ifndef NO_SOCKETS
|
||||
|
||||
#ifndef USE_MSRPC
|
||||
#ifdef ENABLE_DEPRECATED_OPTIONS
|
||||
#ifndef SIMPLE_SOCKETS
|
||||
case '4':
|
||||
case '6':
|
||||
printerrorf("Warning: Option -%c is deprecated. Use -L instead.\n", o);
|
||||
/* no break */
|
||||
#endif // SIMPLE_SOCKETS
|
||||
#endif // ENABLE_DEPRECATED_OPTIONS
|
||||
case 'P':
|
||||
if (o == 'P') defaultport = optarg;
|
||||
#ifdef SIMPLE_SOCKETS
|
||||
ignoreIniFileParameter(INI_PARAM_PORT);
|
||||
#else // !SIMPLE_SOCKETS
|
||||
ignoreIniFileParameter(INI_PARAM_LISTEN);
|
||||
#endif // !SIMPLE_SOCKETS
|
||||
break;
|
||||
#else // USE_MSRPC
|
||||
case 'P':
|
||||
@ -1129,19 +1161,44 @@ static void parseGeneralArguments() {
|
||||
#endif // NO_LOG
|
||||
|
||||
#ifndef NO_SOCKETS
|
||||
#ifndef USE_MSRPC
|
||||
#if !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||
case 'L':
|
||||
maxsockets++;
|
||||
ignoreIniFileParameter(INI_PARAM_LISTEN);
|
||||
break;
|
||||
#endif // USE_MSRPC
|
||||
#if HAVE_FREEBIND
|
||||
case 'F':
|
||||
if (!getArgumentBool(&freebind, optarg)) usage();
|
||||
ignoreIniFileParameter(INI_PARAM_FREEBIND);
|
||||
break;
|
||||
#endif // HAVE_FREEBIND
|
||||
#endif // !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||
|
||||
#if defined(ENABLE_DEPRECATED_OPTIONS)
|
||||
case 'f':
|
||||
#if !defined(_WIN32) || !defined(NO_LOG)
|
||||
printerrorf
|
||||
(
|
||||
"Warning: Option -f is deprecated. Use -"
|
||||
#ifdef _WIN32
|
||||
"e"
|
||||
#else // !_WIN32
|
||||
"de"
|
||||
#endif // !_WIN32
|
||||
" instead.\n"
|
||||
);
|
||||
#ifndef _WIN32
|
||||
nodaemon = 1;
|
||||
#endif // _WIN32
|
||||
#ifndef NO_LOG
|
||||
logstdout = 1;
|
||||
#endif
|
||||
#if defined(_PEDANTIC) && defined(_WIN32) && defined(NO_LOG)
|
||||
printerrorf("Warning: Option -f has no effect in a Windows version of vlmcsd that has been compiled with logging disabled.\n");
|
||||
#endif // defined(_PEDANTIC) && defined(_WIN32) && defined(NO_LOG)
|
||||
#endif // !defined(_WIN32) || !defined(NO_LOG)
|
||||
break;
|
||||
#endif // ENABLE_DEPRECATED_OPTIONS
|
||||
|
||||
#ifdef _NTSERVICE
|
||||
case 'U':
|
||||
@ -1165,7 +1222,13 @@ static void parseGeneralArguments() {
|
||||
#endif // _NTSERVICE
|
||||
|
||||
case 'D':
|
||||
#ifndef _WIN32
|
||||
nodaemon = 1;
|
||||
#else // _WIN32
|
||||
#ifdef _PEDANTIC
|
||||
printerrorf("Warning: Option -D has no effect in the Windows version of vlmcsd.\n");
|
||||
#endif // _PEDANTIC
|
||||
#endif // _WIN32
|
||||
break;
|
||||
|
||||
#ifndef NO_LOG
|
||||
@ -1175,10 +1238,10 @@ static void parseGeneralArguments() {
|
||||
#endif // NO_LOG
|
||||
#endif // NO_SOCKETS
|
||||
|
||||
#ifndef _WIN32
|
||||
#if !defined(_WIN32) && defined(ENABLE_DEPRECATED_OPTIONS)
|
||||
case 'I': // Backward compatibility with svn681 and earlier
|
||||
break;
|
||||
#endif // _WIN32
|
||||
#endif // !defined(_WIN32) && defined(ENABLE_DEPRECATED_OPTIONS)
|
||||
|
||||
#ifndef NO_RANDOM_EPID
|
||||
case 'r':
|
||||
@ -1210,8 +1273,8 @@ static void parseGeneralArguments() {
|
||||
#endif // NO_SIGHUP
|
||||
if (GetGid())
|
||||
{
|
||||
printerrorf("Fatal: setgid for %s failed.\n", optarg);
|
||||
exit(!0);
|
||||
printerrorf("Fatal: %s for %s failed: %s\n", "setgid", gname, strerror(errno));
|
||||
exit(errno);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1223,8 +1286,8 @@ static void parseGeneralArguments() {
|
||||
#endif // NO_SIGHUP
|
||||
if (GetUid())
|
||||
{
|
||||
printerrorf("Fatal: setuid for %s failed.\n", optarg);
|
||||
exit(!0);
|
||||
printerrorf("Fatal: %s for %s failed: %s\n", "setuid", uname, strerror(errno));
|
||||
exit(errno);
|
||||
}
|
||||
break;
|
||||
#endif // NO_USER_SWITCH && !_WIN32
|
||||
@ -1259,12 +1322,21 @@ static void parseGeneralArguments() {
|
||||
break;
|
||||
#endif // !USE_MSRPC
|
||||
|
||||
#ifndef NO_VERSION_INFORMATION
|
||||
case 'V':
|
||||
#ifdef _NTSERVICE
|
||||
if (IsNTService) break;
|
||||
#endif
|
||||
printf("vlmcsd %s\n", Version);
|
||||
#if defined(__s390__) && !defined(__zarch__) && !defined(__s390x__)
|
||||
printf("vlmcsd %s %i-bit\n", Version, sizeof(void*) == 4 ? 31 : (int)sizeof(void*) << 3);
|
||||
#else
|
||||
printf("vlmcsd %s %i-bit\n", Version, (int)sizeof(void*) << 3);
|
||||
#endif // defined(__s390__) && !defined(__zarch__) && !defined(__s390x__)
|
||||
printPlatform();
|
||||
printCommonFlags();
|
||||
printServerFlags();
|
||||
exit(0);
|
||||
#endif // NO_VERSION_INFORMATION
|
||||
|
||||
default:
|
||||
usage();
|
||||
@ -1429,7 +1501,7 @@ static void allocateSemaphore(void)
|
||||
#endif // !defined(NO_LIMIT) && !defined(NO_SOCKETS) && !__minix__
|
||||
|
||||
|
||||
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||
int setupListeningSockets()
|
||||
{
|
||||
int o;
|
||||
@ -1437,14 +1509,16 @@ int setupListeningSockets()
|
||||
|
||||
SocketList = (SOCKET*)vlmcsd_malloc((size_t)allocsockets * sizeof(SOCKET));
|
||||
|
||||
haveIPv4Stack = checkProtocolStack(AF_INET);
|
||||
haveIPv6Stack = checkProtocolStack(AF_INET6);
|
||||
int_fast8_t haveIPv4Stack = checkProtocolStack(AF_INET);
|
||||
int_fast8_t haveIPv6Stack = checkProtocolStack(AF_INET6);
|
||||
|
||||
// Reset getopt since we've alread used it
|
||||
optReset();
|
||||
|
||||
for (opterr = 0; ( o = getopt(global_argc, (char* const*)global_argv, optstring) ) > 0; ) switch (o)
|
||||
{
|
||||
# ifdef ENABLE_DEPRECATED_OPTIONS
|
||||
|
||||
case '4':
|
||||
|
||||
if (!haveIPv4Stack)
|
||||
@ -1465,18 +1539,19 @@ int setupListeningSockets()
|
||||
v6required = 1;
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
|
||||
addListeningSocket(optarg);
|
||||
break;
|
||||
# endif // ENABLE_DEPRECATED_OPTIONS
|
||||
|
||||
case 'P':
|
||||
|
||||
defaultport = optarg;
|
||||
break;
|
||||
|
||||
default:
|
||||
case 'L':
|
||||
|
||||
addListeningSocket(optarg);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1498,8 +1573,13 @@ int setupListeningSockets()
|
||||
// maxsocket results from first pass parsing the arguments
|
||||
if (!maxsockets)
|
||||
{
|
||||
# ifdef ENABLE_DEPRECATED_OPTIONS
|
||||
if (haveIPv6Stack && (v6required || !v4required)) addListeningSocket("::");
|
||||
if (haveIPv4Stack && (v4required || !v6required)) addListeningSocket("0.0.0.0");
|
||||
# else // !ENABLE_DEPRECATED_OPTIONS
|
||||
if (haveIPv6Stack) addListeningSocket("::");
|
||||
if (haveIPv4Stack) addListeningSocket("0.0.0.0");
|
||||
# endif // !ENABLE_DEPRECATED_OPTIONS
|
||||
}
|
||||
|
||||
if (!numsockets)
|
||||
@ -1510,7 +1590,7 @@ int setupListeningSockets()
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif // !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||
#endif // !defined(NO_SOCKETS) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||
|
||||
|
||||
int server_main(int argc, CARGV argv)
|
||||
@ -1566,7 +1646,7 @@ int newmain()
|
||||
#endif // USE_MSRPC
|
||||
|
||||
// Windows can never daemonize
|
||||
nodaemon = 1;
|
||||
//nodaemon = 1;
|
||||
|
||||
#else // __CYGWIN__
|
||||
|
||||
@ -1585,7 +1665,9 @@ int newmain()
|
||||
{
|
||||
InetdMode = 1;
|
||||
nodaemon = 1;
|
||||
#ifndef SIMPLE_SOCKETS
|
||||
maxsockets = 0;
|
||||
#endif // SIMPLE_SOCKETS
|
||||
#ifndef NO_LOG
|
||||
logstdout = 0;
|
||||
#endif // NO_LOG
|
||||
@ -1614,9 +1696,13 @@ int newmain()
|
||||
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||
if (!InetdMode)
|
||||
{
|
||||
#ifdef SIMPLE_SOCKETS
|
||||
if ((error = listenOnAllAddresses())) return error;
|
||||
#else // !SIMPLE_SOCKETS
|
||||
if ((error = setupListeningSockets())) return error;
|
||||
#endif // !SIMPLE_SOCKETS
|
||||
}
|
||||
#endif // NO_SOCKETS
|
||||
#endif // !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||
|
||||
// After sockets have been set up, we may switch to a lower privileged user
|
||||
#if !defined(_WIN32) && !defined(NO_USER_SWITCH)
|
||||
@ -1625,16 +1711,25 @@ int newmain()
|
||||
if (!IsRestarted)
|
||||
{
|
||||
#endif // NO_SIGHUP
|
||||
if (gid != INVALID_GID && setgid(gid))
|
||||
if (gid != INVALID_GID)
|
||||
{
|
||||
printerrorf("Fatal: setgid for %s failed.\n", gname);
|
||||
return !0;
|
||||
if (setgid(gid))
|
||||
{
|
||||
printerrorf("Fatal: %s for %s failed: %s\n", "setgid", gname, strerror(errno));
|
||||
return errno;
|
||||
}
|
||||
|
||||
if (setgroups(1, &gid))
|
||||
{
|
||||
printerrorf("Fatal: %s for %s failed: %s\n", "setgroups", gname, strerror(errno));
|
||||
return errno;
|
||||
}
|
||||
}
|
||||
|
||||
if (uid != INVALID_UID && setuid(uid))
|
||||
{
|
||||
printerrorf("Fatal: setuid for %s failed.\n", uname);
|
||||
return !0;
|
||||
printerrorf("Fatal: %s for %s failed: %s\n", "setuid", uname, strerror(errno));
|
||||
return errno;
|
||||
}
|
||||
#ifndef NO_SIGHUP
|
||||
}
|
||||
|
1
vlmcsd.h
1
vlmcsd.h
@ -47,6 +47,7 @@ int server_main(int argc, CARGV argv);
|
||||
#define INI_PARAM_PORT 14
|
||||
#define INI_PARAM_RPC_NDR64 15
|
||||
#define INI_PARAM_RPC_BTFN 16
|
||||
#define INI_PARAM_FREEBIND 17
|
||||
|
||||
#define INI_FILE_PASS_1 1
|
||||
#define INI_FILE_PASS_2 2
|
||||
|
18
vlmcsd.ini
18
vlmcsd.ini
@ -22,19 +22,23 @@
|
||||
|
||||
# Use custom TCP port
|
||||
# Command line: -P
|
||||
# ***The Port directive only works if vlmcsd was compiled to use MS RPC
|
||||
# ***The Port directive only works if vlmcsd was compiled to use MS RPC or simple sockets
|
||||
# ***Use Listen otherwise
|
||||
;Port = 1688
|
||||
;Port = 1234
|
||||
|
||||
# Listen on all IPv4 addresses (default port 1688)
|
||||
# Command line: -L (and compatibility options -4, -6, -P)
|
||||
# Does not work with MS RPC, use Port=
|
||||
# Command line: -L
|
||||
# Does not work with MS RPC or simple sockets, use Port=
|
||||
;Listen = 0.0.0.0:1688
|
||||
|
||||
# Listen on all IPv6 addresses (default port 1688)
|
||||
# Command line: -L (and compatibility options -4, -6, -P)
|
||||
# Command line: -L
|
||||
;Listen = [::]:1688
|
||||
|
||||
# Allow binding to foreign IP addresses
|
||||
# Command line: -F0 and -F1
|
||||
;FreeBind = true
|
||||
|
||||
# Randomize ePIDs at program start up (only those that are not explicitly specified)
|
||||
# Command line: -r
|
||||
;RandomizationLevel = 1
|
||||
@ -84,9 +88,9 @@
|
||||
;group = vlmcsdgroup
|
||||
|
||||
# Disable or enable the NDR64 transfer syntax in RPC (default enabled)
|
||||
# Command line: -n
|
||||
# Command line: -N0 and -B1
|
||||
;UseNDR64 = true
|
||||
|
||||
# Disable or enable bind time feature negotiation in RPC (default enabled)
|
||||
# Command line: -b
|
||||
# Command line: -B0 and -B1
|
||||
;UseBTFN = true
|
||||
|
11
vlmcsd.ini.5
11
vlmcsd.ini.5
@ -1,4 +1,4 @@
|
||||
.TH VLMCSD.INI 5 "September 2015" "Hotbird64" "KMS Activation Manual"
|
||||
.TH VLMCSD.INI 5 "June 2016" "Hotbird64" "KMS Activation Manual"
|
||||
.LO 8
|
||||
|
||||
.SH NAME
|
||||
@ -34,10 +34,10 @@ Lines, that start with '#' or ';' are treated as comments. Empty lines are ignor
|
||||
Some \fIargument\fRs are binary arguments that need to be either TRUE or FALSE. You can use "Yes", "On" or "1" as an alias for TRUE and "No", "Off" or "0" as an alias for FALSE. Binary arguments are case-insensitive.
|
||||
|
||||
.SH KEYWORDS
|
||||
The following \fIkeyword\fRs are defined:
|
||||
The following \fIkeyword\fRs are defined (not all keywords may be available depending on the operating system and the options used when \fBvlmcsd\fR(8) was compiled):
|
||||
|
||||
.IP "\fBListen\fR"
|
||||
This defines on what combinations of IP addresses and ports vlmcsd should listen. \fBListen\fR can be specified more than once. The \fIargument\fR has the form \fIipaddress\fR[:\fIport\fR]. If you omit the \fIport\fR, the default port of 1688 is used. If the \fIipaddress\fR contains colons and a \fIport\fR is used, you must enclose the \fIipaddress\fR in brackets. The default is to listen to 0.0.0.0:1688 and [::]:1688 which means listen to all IPv4 and all IPv6 addresses. See the \fB-L\fR option in \fBvlmcsd\fR(8) for more info about the syntax. If you use \fB-L\fR, \fB-P\fR, \fB-4\fR or \fB-6\fR on the command line, all \fBListen\fR keywords in the ini file will be ignored. The \fBListen\fR keyword cannot be used on Windows and Cygwin if vlmcsd has been compiled to use Microsoft RPC.
|
||||
This defines on what combinations of IP addresses and ports vlmcsd should listen. \fBListen\fR can be specified more than once. The \fIargument\fR has the form \fIipaddress\fR[:\fIport\fR]. If you omit the \fIport\fR, the default port of 1688 is used. If the \fIipaddress\fR contains colons and a \fIport\fR is used, you must enclose the \fIipaddress\fR in brackets. The default is to listen to 0.0.0.0:1688 and [::]:1688 which means listen to all IPv4 and all IPv6 addresses. See the \fB-L\fR option in \fBvlmcsd\fR(8) for more info about the syntax. If you use \fB-L\fR or \fB-P\fR on the command line, all \fBListen\fR keywords in the ini file will be ignored. The \fBListen\fR keyword cannot be used if vlmcsd has been compiled to use Microsoft RPC (Windows and Cygwin only) or simple sockets.
|
||||
|
||||
Examples:
|
||||
|
||||
@ -48,7 +48,10 @@ Listen = 0.0.0.0:1234
|
||||
Listen = [fe80::1721:12ff:fe81:d36b%eth0]:1688
|
||||
|
||||
.IP "\fBPort\fR"
|
||||
Can only be used on Windows and Cygwin if vlmcsd has been compiled to use Microsoft RPC. Causes vlmcsd to listen on that port instead of 1688. On all non-Windows operating systems or if vlmcsd has been compiled to use its own RPC implementation, you must use \fBListen\fR instead.
|
||||
Can only be used if vlmcsd has been compiled to use simple sockets or on Windows and Cygwin if \fBvlmcsd\fR(8) has been compiled to use Microsoft RPC. Otherwise you must use \fBListen\fR instead. Causes vlmcsd to listen on that port instead of 1688.
|
||||
|
||||
.IP "\fBFreeBind\fR"
|
||||
Can be TRUE or FALSE. If TRUE, you can use the \fBListen\fR keyword with IP addresses that are currently not defined on your system. \fBvlmcsd\fR(8) will start listening on these IP addresses as soon as they become available. This keyword is only available under Linux and FreeBSD because no other OS currently supports that feature. FreeBSD supports this only for IPv4 and requires the PRIV_NETINET_BINDANY privilege which is normally assigned to proccesses of the root user.
|
||||
|
||||
.IP "\fBUseNDR64\fR"
|
||||
Can be TRUE or FALSE. Specifies whether you want to use the NDR64 transfer syntax. See options \fB-n0\fR and \fB-n1\fR in \fBvlmcsd\fR(8). The default is TRUE.
|
||||
|
@ -66,7 +66,9 @@ SYNTAX
|
||||
|
||||
|
||||
KEYWORDS
|
||||
The following keywords are defined:
|
||||
The following keywords are defined (not all keywords may be available
|
||||
depending on the operating system and the options used when vlmcsd(8)
|
||||
was compiled):
|
||||
|
||||
|
||||
Listen This defines on what combinations of IP addresses and ports vlm‐
|
||||
@ -77,10 +79,10 @@ KEYWORDS
|
||||
brackets. The default is to listen to 0.0.0.0:1688 and [::]:1688
|
||||
which means listen to all IPv4 and all IPv6 addresses. See the
|
||||
-L option in vlmcsd(8) for more info about the syntax. If you
|
||||
use -L, -P, -4 or -6 on the command line, all Listen keywords in
|
||||
the ini file will be ignored. The Listen keyword cannot be used
|
||||
on Windows and Cygwin if vlmcsd has been compiled to use Micro‐
|
||||
soft RPC.
|
||||
use -L or -P on the command line, all Listen keywords in the ini
|
||||
file will be ignored. The Listen keyword cannot be used if vlm‐
|
||||
csd has been compiled to use Microsoft RPC (Windows and Cygwin
|
||||
only) or simple sockets.
|
||||
|
||||
Examples:
|
||||
|
||||
@ -89,11 +91,21 @@ KEYWORDS
|
||||
Listen = [fe80::1721:12ff:fe81:d36b%eth0]:1688
|
||||
|
||||
|
||||
Port Can only be used on Windows and Cygwin if vlmcsd has been com‐
|
||||
piled to use Microsoft RPC. Causes vlmcsd to listen on that port
|
||||
instead of 1688. On all non-Windows operating systems or if vlm‐
|
||||
csd has been compiled to use its own RPC implementation, you
|
||||
must use Listen instead.
|
||||
Port Can only be used if vlmcsd has been compiled to use simple sock‐
|
||||
ets or on Windows and Cygwin if vlmcsd(8) has been compiled to
|
||||
use Microsoft RPC. Otherwise you must use Listen instead. Causes
|
||||
vlmcsd to listen on that port instead of 1688.
|
||||
|
||||
|
||||
FreeBind
|
||||
Can be TRUE or FALSE. If TRUE, you can use the Listen keyword
|
||||
with IP addresses that are currently not defined on your system.
|
||||
vlmcsd(8) will start listening on these IP addresses as soon as
|
||||
they become available. This keyword is only available under
|
||||
Linux and FreeBSD because no other OS currently supports that
|
||||
feature. FreeBSD supports this only for IPv4 and requires the
|
||||
PRIV_NETINET_BINDANY privilege which is normally assigned to
|
||||
proccesses of the root user.
|
||||
|
||||
|
||||
UseNDR64
|
||||
@ -265,4 +277,4 @@ SEE ALSO
|
||||
|
||||
|
||||
|
||||
Hotbird64 September 2015 VLMCSD.INI(5)
|
||||
Hotbird64 June 2016 VLMCSD.INI(5)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Tue Mar 8 00:06:22 2016 -->
|
||||
<!-- CreationDate: Fri Jun 17 14:16:33 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@ -137,7 +137,9 @@ Binary arguments are case-insensitive.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The following
|
||||
<i>keyword</i>s are defined:</p>
|
||||
<i>keyword</i>s are defined (not all keywords may be
|
||||
available depending on the operating system and the options
|
||||
used when <b>vlmcsd</b>(8) was compiled):</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
@ -161,11 +163,11 @@ the <i>ipaddress</i> in brackets. The default is to listen
|
||||
to 0.0.0.0:1688 and [::]:1688 which means listen to all IPv4
|
||||
and all IPv6 addresses. See the <b>-L</b> option in
|
||||
<b>vlmcsd</b>(8) for more info about the syntax. If you use
|
||||
<b>-L</b>, <b>-P</b>, <b>-4</b> or <b>-6</b> on the command
|
||||
line, all <b>Listen</b> keywords in the ini file will be
|
||||
ignored. The <b>Listen</b> keyword cannot be used on Windows
|
||||
and Cygwin if vlmcsd has been compiled to use Microsoft
|
||||
RPC.</p> </td></tr>
|
||||
<b>-L</b> or <b>-P</b> on the command line, all
|
||||
<b>Listen</b> keywords in the ini file will be ignored. The
|
||||
<b>Listen</b> keyword cannot be used if vlmcsd has been
|
||||
compiled to use Microsoft RPC (Windows and Cygwin only) or
|
||||
simple sockets.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em">Examples:</p>
|
||||
@ -187,14 +189,25 @@ Listen = [fe80::1721:12ff:fe81:d36b%eth0]:1688</p>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Can only be used on Windows and
|
||||
Cygwin if vlmcsd has been compiled to use Microsoft RPC.
|
||||
Causes vlmcsd to listen on that port instead of 1688. On all
|
||||
non-Windows operating systems or if vlmcsd has been compiled
|
||||
to use its own RPC implementation, you must use
|
||||
<b>Listen</b> instead.</p></td></tr>
|
||||
<p style="margin-top: 1em">Can only be used if vlmcsd has
|
||||
been compiled to use simple sockets or on Windows and Cygwin
|
||||
if <b>vlmcsd</b>(8) has been compiled to use Microsoft RPC.
|
||||
Otherwise you must use <b>Listen</b> instead. Causes vlmcsd
|
||||
to listen on that port instead of 1688.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:11%;"><b>FreeBind</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Can be TRUE or FALSE. If TRUE,
|
||||
you can use the <b>Listen</b> keyword with IP addresses that
|
||||
are currently not defined on your system. <b>vlmcsd</b>(8)
|
||||
will start listening on these IP addresses as soon as they
|
||||
become available. This keyword is only available under Linux
|
||||
and FreeBSD because no other OS currently supports that
|
||||
feature. FreeBSD supports this only for IPv4 and requires
|
||||
the PRIV_NETINET_BINDANY privilege which is normally
|
||||
assigned to proccesses of the root user.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>UseNDR64</b></p>
|
||||
|
||||
<p style="margin-left:22%;">Can be TRUE or FALSE. Specifies
|
||||
|
BIN
vlmcsd.ini.5.pdf
BIN
vlmcsd.ini.5.pdf
Binary file not shown.
@ -66,7 +66,9 @@ SYNTAX
|
||||
|
||||
|
||||
KEYWORDS
|
||||
The following keywords are defined:
|
||||
The following keywords are defined (not all keywords may be available
|
||||
depending on the operating system and the options used when vlmcsd(8)
|
||||
was compiled):
|
||||
|
||||
|
||||
Listen This defines on what combinations of IP addresses and ports vlm‐
|
||||
@ -77,10 +79,10 @@ KEYWORDS
|
||||
brackets. The default is to listen to 0.0.0.0:1688 and [::]:1688
|
||||
which means listen to all IPv4 and all IPv6 addresses. See the
|
||||
-L option in vlmcsd(8) for more info about the syntax. If you
|
||||
use -L, -P, -4 or -6 on the command line, all Listen keywords in
|
||||
the ini file will be ignored. The Listen keyword cannot be used
|
||||
on Windows and Cygwin if vlmcsd has been compiled to use Micro‐
|
||||
soft RPC.
|
||||
use -L or -P on the command line, all Listen keywords in the ini
|
||||
file will be ignored. The Listen keyword cannot be used if vlm‐
|
||||
csd has been compiled to use Microsoft RPC (Windows and Cygwin
|
||||
only) or simple sockets.
|
||||
|
||||
Examples:
|
||||
|
||||
@ -89,11 +91,21 @@ KEYWORDS
|
||||
Listen = [fe80::1721:12ff:fe81:d36b%eth0]:1688
|
||||
|
||||
|
||||
Port Can only be used on Windows and Cygwin if vlmcsd has been com‐
|
||||
piled to use Microsoft RPC. Causes vlmcsd to listen on that port
|
||||
instead of 1688. On all non-Windows operating systems or if vlm‐
|
||||
csd has been compiled to use its own RPC implementation, you
|
||||
must use Listen instead.
|
||||
Port Can only be used if vlmcsd has been compiled to use simple sock‐
|
||||
ets or on Windows and Cygwin if vlmcsd(8) has been compiled to
|
||||
use Microsoft RPC. Otherwise you must use Listen instead. Causes
|
||||
vlmcsd to listen on that port instead of 1688.
|
||||
|
||||
|
||||
FreeBind
|
||||
Can be TRUE or FALSE. If TRUE, you can use the Listen keyword
|
||||
with IP addresses that are currently not defined on your system.
|
||||
vlmcsd(8) will start listening on these IP addresses as soon as
|
||||
they become available. This keyword is only available under
|
||||
Linux and FreeBSD because no other OS currently supports that
|
||||
feature. FreeBSD supports this only for IPv4 and requires the
|
||||
PRIV_NETINET_BINDANY privilege which is normally assigned to
|
||||
proccesses of the root user.
|
||||
|
||||
|
||||
UseNDR64
|
||||
@ -265,4 +277,4 @@ SEE ALSO
|
||||
|
||||
|
||||
|
||||
Hotbird64 September 2015 VLMCSD.INI(5)
|
||||
Hotbird64 June 2016 VLMCSD.INI(5)
|
||||
|
6009
vlmcsd_all.c
6009
vlmcsd_all.c
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.22.3 -->
|
||||
<!-- CreationDate: Tue Mar 8 00:06:22 2016 -->
|
||||
<!-- CreationDate: Fri Jun 17 14:16:33 2016 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
Binary file not shown.
8274
vlmcsdmulti_all.c
8274
vlmcsdmulti_all.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user