Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
vlmcsd-1107-2016-12-12-Hotbird64
Browse files Browse the repository at this point in the history
  • Loading branch information
Wind4 committed Dec 18, 2016
1 parent af593fc commit c5e1a0a
Show file tree
Hide file tree
Showing 21 changed files with 233 additions and 249 deletions.
1 change: 1 addition & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ help:
@echo " -DNO_SOCKETS Don't support standalone operation. Requires an internet superserver to start $(BASE_PROGRAM_NAME)."
@echo " -DSIMPLE_SOCKETS Compile $(BASE_PROGRAM_NAME) with basic socket support only. Removes -L option."
@echo " -DSIMPLE_RPC Don't support RPC with NDR64 and BTFN in $(BASE_PROGRAM_NAME) (but do in $(BASE_CLIENT_NAME)). Makes emulator detection easy."
@echo " -DNO_TAP Compile $(BASE_PROGRAM_NAME) without VPN support (Windows and Cygwin only)."
@echo " -DNO_CL_PIDS Don't support specifying ePIDs and HwId from the command line in $(BASE_PROGRAM_NAME)."
@echo " -DNO_LIMIT Don't support limiting concurrent clients in $(BASE_PROGRAM_NAME)."
@echo " -DNO_SIGHUP Don't support SIGHUP handling in $(BASE_PROGRAM_NAME)."
Expand Down
Binary file modified floppy/floppy144.vfd
Binary file not shown.
2 changes: 1 addition & 1 deletion man/vlmcs.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/vlmcs.1.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion man/vlmcsd-floppy.7.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/vlmcsd-floppy.7.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion man/vlmcsd.7.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/vlmcsd.7.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion man/vlmcsd.8.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/vlmcsd.8.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion man/vlmcsd.ini.5.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/vlmcsd.ini.5.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion man/vlmcsdmulti.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/vlmcsdmulti.1.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,14 @@ else
STRIPFLAGS += -s
endif

LIBRARY_CFLAGS = -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT -DNO_STRICT_MODES -DNO_CLIENT_LIST -UNO_SOCKETS -USIMPLE_RPC
LIBRARY_CFLAGS = -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT -DNO_STRICT_MODES -DNO_CLIENT_LIST -DNO_TAP -UNO_SOCKETS -USIMPLE_RPC

ifeq ($(FEATURES), embedded)
BASECFLAGS += -DNO_HELP -DNO_USER_SWITCH -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_VERBOSE_LOG -DNO_VERSION_INFORMATION
else ifeq ($(FEATURES), autostart)
BASECFLAGS += -DNO_HELP -DNO_VERSION_INFORMATION
else ifeq ($(FEATURES), minimum)
BASECFLAGS += -DSIMPLE_RPC -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT -DSMALL_AES -DNO_STRICT_MODES -DNO_CLIENT_LIST -DUNSAFE_DATA_LOAD -DNO_EXTERNAL_DATA -UFULL_INTERNAL_DATA -U_PEDANTIC
BASECFLAGS += -DSIMPLE_RPC -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT -DSMALL_AES -DNO_STRICT_MODES -DNO_TAP -DNO_CLIENT_LIST -DUNSAFE_DATA_LOAD -DNO_EXTERNAL_DATA -UFULL_INTERNAL_DATA -U_PEDANTIC
else ifeq ($(FEATURES), most)
BASECFLAGS += -DNO_SIGHUP -DNO_PID_FILE -DNO_LIMIT
else ifeq ($(FEATURES), inetd)
Expand Down
66 changes: 29 additions & 37 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,6 @@



/*
* Define default ePIDs and HWID here. Preferrably grab ePIDs and HWID
* from a real KMS server.
*/

//#ifndef EPID_WINDOWS
//#define EPID_WINDOWS "03612-00206-471-452343-03-1033-14393.0000-2932016"
//#endif
//
//#ifndef EPID_OFFICE2010
//#define EPID_OFFICE2010 "03612-00096-199-303490-03-1033-14393.0000-2932016"
//#endif
//
//#ifndef EPID_OFFICE2013
//#define EPID_OFFICE2013 "03612-00206-234-394838-03-1033-14393.0000-2932016"
//#endif
//
//#ifndef EPID_OFFICE2016
//#define EPID_OFFICE2016 "03612-00206-437-938923-03-1033-14393.0000-2932016"
//#endif

#ifndef HWID // HwId from the Ratiborus VM
#define HWID 0x3A, 0x1C, 0x04, 0x96, 0x00, 0xB6, 0x00, 0x76
Expand All @@ -67,21 +47,21 @@



/*
* -------------------------------
* Defaults
* -------------------------------
*/
/*
* -------------------------------
* Defaults
* -------------------------------
*/



#ifndef INI_FILE
/*
* Uncomment and customize the following line if you want vlmcsd to look for an ini file
* at a default location.
*/
/*
* Uncomment and customize the following line if you want vlmcsd to look for an ini file
* at a default location.
*/

//#define INI_FILE "/etc/vlmcsd.ini"
//#define INI_FILE "/etc/vlmcsd.ini"

#endif // INI_FILE

Expand All @@ -95,7 +75,7 @@
* at a custom default location.
*/

//#define DATA_FILE "/etc/vlmcsd.kmd"
//#define DATA_FILE "/etc/vlmcsd.kmd"

#endif // DATA_FILE

Expand Down Expand Up @@ -353,7 +333,7 @@
* Includes the full database in vlmcsd.
*/

//#define FULL_INTERNAL_DATA
//#define FULL_INTERNAL_DATA
#endif // FULL_INTERNAL_DATA


Expand All @@ -374,13 +354,25 @@
* your system.
*/

//#define NO_FREEBIND
//#define NO_FREEBIND

#endif // NO_FREEBIND




#ifndef NO_TAP
/*
* Do not compile support for using a VPN adapter under Windows. Disables -O command line option.
*/

//#define NO_TAP

#endif // NO_TAP




#ifndef NO_VERSION_INFORMATION
/*
* Removes the -V option from vlmcsd and vlmcs that displays the version information
Expand Down Expand Up @@ -493,7 +485,7 @@
* and ini file parameter KmsData. Implies UNSAFE_DATA_LOAD.
*/

//#define NO_EXTERNAL_DATA
//#define NO_EXTERNAL_DATA

#endif // NO_EXTERNAL_DATA

Expand All @@ -507,7 +499,7 @@
* the program exits with an error message.
*/

//#define NO_INTERNAL_DATA
//#define NO_INTERNAL_DATA

#endif // NO_INTERNAL_DATA

Expand Down Expand Up @@ -658,7 +650,7 @@
* smaller binaries but makes emulator detection easier.
*/

//#define SIMPLE_RPC
//#define SIMPLE_RPC
#endif // !SIMPLE_RPC


Expand All @@ -670,7 +662,7 @@
* It still supports IPv4 and IPv6.
*/

//#define SIMPLE_SOCKETS
//#define SIMPLE_SOCKETS

#endif // SIMPLE_SOCKETS

Expand Down
2 changes: 1 addition & 1 deletion src/helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ void getExeName()

fn_exe = (char*)getauxval(AT_EXECFN);

# elif __UCLIBC__ && __UCLIBC_MAJOR__ < 1 && !defined(NO_PROCFS) // Workaround for older uclibc
# elif (__ANDROID__ && __ANDROID_API__ < 16) || (__UCLIBC__ && __UCLIBC_MAJOR__ < 1 && !defined(NO_PROCFS)) // Workaround for older uclibc

char temp[PATH_MAX + 1];

Expand Down
2 changes: 1 addition & 1 deletion src/kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ static void generateRandomPid(int index, char *const szPid, int serverType, int1
time(&maxTime);

# ifndef BUILD_TIME
# define BUILD_TIME 1479938320
# define BUILD_TIME 1481079869
# endif

if (maxTime < (time_t)BUILD_TIME) // Just in case the system time is < 10/17/2013 1:00 pm
Expand Down
12 changes: 3 additions & 9 deletions src/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ SOCKET connectToAddress(const char *const addr, const int AddressFamily, int_fas


#ifndef NO_SOCKETS
#ifdef SIMPLE_SOCKETS

static int_fast8_t allowSocketReuse(SOCKET s)
{
Expand Down Expand Up @@ -322,6 +321,8 @@ static int_fast8_t allowSocketReuse(SOCKET s)
}


#ifdef SIMPLE_SOCKETS

int listenOnAllAddresses()
{
uint32_t port_listen;
Expand Down Expand Up @@ -575,14 +576,7 @@ static int listenOnAddress(const struct addrinfo *const ai, SOCKET *s)
}
# endif

# if !_WIN32 && !__CYGWIN__
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 && !__CYGWIN__
allowSocketReuse(*s);

# if HAVE_FREEBIND
# if (defined(IP_NONLOCALOK) || __FreeBSD_kernel__ || __FreeBSD__) && !defined(IPV6_BINDANY)
Expand Down
Loading

0 comments on commit c5e1a0a

Please sign in to comment.