vlmcsd-1107-2016-12-12-Hotbird64

pull/5/head svn1107
Wind4 8 years ago
parent af593fc11b
commit c5e1a0a591

@ -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)."

Binary file not shown.

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Mon Dec 5 18:18:46 2016 -->
<!-- CreationDate: Sun Dec 11 22:03:19 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

Binary file not shown.

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Mon Dec 5 18:18:46 2016 -->
<!-- CreationDate: Sun Dec 11 22:03:20 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

Binary file not shown.

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Mon Dec 5 18:18:46 2016 -->
<!-- CreationDate: Sun Dec 11 22:03:19 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

Binary file not shown.

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Mon Dec 5 18:18:46 2016 -->
<!-- CreationDate: Sun Dec 11 22:03:20 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

Binary file not shown.

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Mon Dec 5 18:18:46 2016 -->
<!-- CreationDate: Sun Dec 11 22:03:20 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

Binary file not shown.

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Mon Dec 5 18:18:46 2016 -->
<!-- CreationDate: Sun Dec 11 22:03:19 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

Binary file not shown.

@ -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)

@ -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
@ -381,6 +361,18 @@
#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

@ -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];

@ -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

@ -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)
{
@ -322,6 +321,8 @@ static int_fast8_t allowSocketReuse(SOCKET s)
}
#ifdef SIMPLE_SOCKETS
int listenOnAllAddresses()
{
uint32_t port_listen;
@ -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)

@ -28,10 +28,9 @@ VOID WINAPI ServiceCtrlHandler(DWORD dwCtrl)
// Remove PID file and free ressources
cleanup();
# ifdef USE_MSRPC
# if __CYGWIN__ || defined(USE_MSRPC)
ReportServiceStatus(SERVICE_STOPPED, NO_ERROR, 0);
# endif // !USE_MSRPC
return;
# endif // __CYGWIN__
default:
break;
@ -42,14 +41,8 @@ static VOID WINAPI ServiceMain(const int argc_unused, CARGV argv_unused)
{
// Register the handler function for the service
gSvcStatusHandle = RegisterServiceCtrlHandler(
NT_SERVICE_NAME,
ServiceCtrlHandler
);
if(!gSvcStatusHandle)
if (!((gSvcStatusHandle = RegisterServiceCtrlHandler(NT_SERVICE_NAME, ServiceCtrlHandler))))
{
//ServiceReportEvent(RegisterServiceCtrlHandler);
return;
}

@ -17,6 +17,10 @@
#include "tap-windows.h"
#include <iphlpapi.h>
#if !_WIN32
#include <arpa/inet.h>
#endif // !_WIN32
static char* szIpAddress = "10.10.10.9";
static char* szMask = "30";
static char* szTapName;
@ -117,7 +121,7 @@ static void parseTapArgument(char* argument)
exit(VLMCSD_EINVAL);
}
Mask = (uint32_t)~(UINT_MAX >> Cidr);
Mask = (uint32_t)~(0xffffffff >> Cidr);
Network = IpAddress & Mask;
Broadcast = IpAddress | ~Mask;
DhcpServer = IpAddress + 1;

Loading…
Cancel
Save