modified: pixi.toml
[GalaxyCodeBases.git] / etc / Windows / vlmcsd_old_vancepym / config.h
blob221e97d117059fc47ff379772d66b5b92602ecde
1 #ifndef CONFIG_H_
2 #define CONFIG_H_
4 /* Don't change anything ABOVE this line */
6 /*
7 * As a best practice do not change the original config.h as distributed with vlmcsd.
8 * Instead make a copy, e.g. myconfig.h, customize it and type 'make CONFIG=myconfig.h'
9 * to build vlmcsd. This prevents your copy being overwritten when you upgrade to a
10 * new version.
16 * ----------------------------------------------------------------------------------------
17 * Useful customizations. These options are mandatory. You cannot comment them out.
18 * Feel free to change them to fit your needs.
19 * ----------------------------------------------------------------------------------------
22 #ifndef VERSION
24 * Define your own version identifier here, e.g. '#define VERSION "my vlmcsd based on svn560"'
27 #define VERSION "private build"
29 #endif // VERSION
35 * Define default ePIDs and HWID here. Preferrably grab ePIDs and HWID
36 * from a real KMS server.
39 #ifndef EPID_WINDOWS
40 #define EPID_WINDOWS "06401-00206-271-298329-03-1033-9600.0000-0452015"
41 #endif
43 #ifndef EPID_OFFICE2010
44 #define EPID_OFFICE2010 "06401-00096-199-198322-03-1033-9600.0000-0452015"
45 #endif
47 #ifndef EPID_OFFICE2013
48 #define EPID_OFFICE2013 "06401-00206-234-398213-03-1033-9600.0000-0452015"
49 #endif
51 #ifndef HWID // HwId from the Ratiborus VM
52 #define HWID 0x36, 0x4F, 0x46, 0x3A, 0x88, 0x63, 0xD3, 0x5F
53 #endif
60 * Anything below this line is optional. If you want to use any of these options
61 * uncomment one or more lines starting with "//#define"
67 * -------------------------------
68 * Defaults
69 * -------------------------------
73 #ifndef INI_FILE
75 * Uncomment and customize the following line if you want vlmcsd to look for an ini file
76 * at a default location
79 //#define INI_FILE "/etc/vlmcsd.ini"
81 #endif // INI_FILE
87 * ----------------------------------------------------------------------------------------
88 * Troubleshooting options. Please note that disabling features may also help troubleshooting.
89 * If you have an old OS that does not support features like pthreads, shared memory or
90 * semaphores, uncomment "#define NO_LIMIT" and "#define NO_SIGHUP" and leave "#define USE_THREADS"
91 * commented out.
92 * ----------------------------------------------------------------------------------------
96 #ifndef CHILD_HANDLER
98 * Uncomment the following #define if you are compiling for a platform that does
99 * not correctly handle the SA_NOCLDWAIT flag when ignoring SIGCHLD, i.e. forked
100 * processes remain as "zombies" after dying. This option will add a SIGCHLD handler that
101 * "waits" for a child that has terminated. This is only required for a few
102 * unixoid OSses.
105 //#define CHILD_HANDLER
107 #endif // CHILD_HANDLER
110 #ifndef NO_TIMEOUT
112 * Uncomment the following #define if you are compiling for a platform that does
113 * not support custom socket send or receive timeouts.
116 //#define NO_TIMEOUT
118 #endif // NO_TIMEOUT
121 #ifndef NO_DNS
123 * Uncomment the following #define if you have trouble with accessing routines
124 * from libresolv. If enabled, vlmcs will be compiled without support for
125 * detecting KMS servers via DNS.
128 //#define NO_DNS
130 #endif // NO_DNS
133 #ifndef TERMINAL_FIXED_WIDTH
135 * Uncomment the following #define and optionally change its value if you are compiling for
136 * a platform that cannot properly determine the width of a terminal/command prompt.
137 * This affects the output of "vlmcsd -x" only. It should be rarely necessary to use this.
140 //#define TERMINAL_FIXED_WIDTH 80
142 #endif // TERMINAL_FIXED_WIDTH
147 #ifndef _PEDANTIC
149 * Uncomment the following #define if you want to do vlmcs and vlmcsd more checks on the data
150 * it receives over the network. They are normally not necessary but may provide useful if
151 * you are testing any KMS server or client emulator that may send malformed KMS packets.
154 //#define _PEDANTIC
156 #endif // _PEDANTIC
161 #ifndef NO_PROCFS
163 * Cygwin, Linux, Android, NetBSD, DragonflyBSD:
164 * Do not rely on a properly mounted proc filesystem and use the less reliable
165 * argv[0] to determine the program's executable name when restarting vlmcsd
166 * by sending a SIGHUP signal. Use only if absolutely necessary (very old versions
167 * of these OSses).
169 * FreeBSD:
170 * Do not use sysctl and but the less reliable
171 * argv[0] to determine the program's executable name when restarting vlmcsd
172 * by sending a SIGHUP signal. Use only if absolutely necessary (very old FreeBSD).
174 * OpenBSD:
175 * This option has no effect since OpenBSD always must use the less reliable argv[0].
177 * Mac OS X, Solaris:
178 * This option is not neccessary (and has no effect) since these OSses provide
179 * a reliable way to determine the executable name.
181 * Windows:
182 * This option is not used because Windows doesn't support signals.
185 //#define NO_PROCFS
187 #endif // NO_PROCFS
192 #ifndef USE_AUXV
194 * Linux only:
195 * Use the process' ELF aux vector to determine the executable name when restarting
196 * vlmcsd by sending a SIGHUP signal. This is actually the best method but is supported
197 * only with
198 * * the musl library
199 * * the glbic library 2.16 or newer
201 * It does NOT work with uclibc (most routers and other small devices) and glibc < 2.16.
202 * Use it only if your system supports it and you do not plan to use the binary on older systems.
203 * It won't work on debian 7 or Red Hat 6.x.
205 * It it safe to try this by yourself. vlmcsd won't compile if your system doesn't support it.
208 //#define USE_AUXV
210 #endif // USE_AUXV
215 #ifndef _OPENSSL_NO_HMAC
217 * If you configured vlmcsd to use OpenSSL (which you shouldn't) you may use this option
218 * to calculate the KMSv6 HMAC with internal code instead of using OpenSSL.
220 * This may be necessary for some embedded devices that have OpenSSL without HMAC support.
223 //#define _OPENSSL_NO_HMAC
225 #endif // _OPENSSL_NO_HMAC
231 * ----------------------------------------------------------------------------------------
232 * Modes of operation
233 * ----------------------------------------------------------------------------------------
237 #ifndef USE_THREADS
239 * Do not use fork() but threads to serve your clients.
241 * Unix-like operarting systems:
242 * You may use this or not. Entirely your choice. Threads do not require explicitly allocating
243 * a shared memory segment which might be a problem on some systems. Using fork() is more robust
244 * although the threaded version of vlmcsd is rock solid too.
246 * Some older unixoid OSses may not have pthreads. Do NOT use USE_THREADS and define NO_SIGHUP
247 * and NO_LIMIT instead to disable use of the pthreads, shared memory and semaphores.
249 * Cygwin:
250 * It is recommended to use threads since fork() is extremely slow (no copy on write) and somewhat
251 * unstable.
253 * Windows:
254 * This option has no effect since fork() is not supported.
257 //#define USE_THREADS
259 #endif // USE_THREADS
264 #ifndef _CRYPTO_POLARSSL
266 * Not available on native Windows. Can be used with Cygwin.
268 * Use PolarSSL for crypto routines if possible and if it is safe. There is not much benefit by using this
269 * options since it can be used for SHA256 and HMAC_SHA256 only. It cannot be used for AES calculations because
270 * KMSv6 uses a modified algorithm that PolarSSL does not support. KMSv4 CMAC is also unsupported since it uses
271 * a Rijndael keysize (160 bits) that is not part of the AES standard.
273 * It is strongly recommended not to use an external crypto library.
275 * Do not define both _CRYPTO_OPENSSL and _CRYPTO_POLARSSL
278 //#define _CRYPTO_POLARSSL
280 #endif // _CRYPTO_POLARSSL
285 #ifndef _CRYPTO_OPENSSL
287 * Not available on native Windows. Can be used with Cygwin.
289 * Use OpenSSL for crypto routines if possible and if it is safe. There is not much benefit by using this
290 * options since it can be used for SHA256 and HMAC_SHA256 only. It cannot be used for AES calculations because
291 * KMSv6 uses a modified algorithm that OpenSSL does not support. KMSv4 CMAC is also unsupported since it uses
292 * a Rijndael keysize (160 bits) that is not part of the AES standard.
294 * It is strongly recommended not to use an external crypto library.
296 * Do not define both _CRYPTO_OPENSSL and _CRYPTO_POLARSSL
299 //#define _CRYPTO_OPENSSL
301 #endif // _CRYPTO_OPENSSL
306 #ifndef _USE_AES_FROM_OPENSSL
308 * DANGEROUS: Tweak OpenSSL to perform KMSv4 CMAC and KMSv6 modified AES. This option creates the expanded
309 * AES key by itself and then applies modifications to it. OpenSSL will then perfom modified AES operations.
311 * This options tampers with internal structures of OpenSSL that are subject to change or may have a platform
312 * specific implementation. In this case your resulting binary can only perform KMSv5 operations.
314 * This option has no effect if _CRYPTO_OPENSSL is not defined.
316 * Don't use this except for your own research on the internals of OpenSSL.
319 //#define _USE_AES_FROM_OPENSSL
321 #endif // _USE_AES_FROM_OPENSSL
327 #ifndef _OPENSSL_SOFTWARE
329 * Use this only if you have defined _CRYPTO_OPENSSL and _USE_AES_FROM_OPENSSL. It has no effect otherwise.
331 * This options assumes a different internal AES expanded key in OpenSSL which is used mostly if OpenSSL is
332 * compiled without support for hardware accelerated AES. It's worth a try if _USE_AES_FROM_OPENSSL doesn't work.
335 //#define _OPENSSL_SOFTWARE
337 #endif // _OPENSSL_SOFTWARE
343 * ------------------------------------------------------------------------------------------
344 * Extra features not compiled by default because they are rarely needed
345 * ------------------------------------------------------------------------------------------
349 #ifndef INCLUDE_BETAS
351 * Uncomment the following #define if you want obsolete beta/preview SKUs
352 * to be included in the extended product list.
355 //#define INCLUDE_BETAS
356 #endif
362 * ----------------------------------------------------------------------------------------
363 * Removal of features. Allows you to remove features of vlmcsd you do not need or want.
364 * Use it to get smaller binaries. This is especially useful on very small embedded devices.
365 * ----------------------------------------------------------------------------------------
369 #ifndef NO_EXTENDED_PRODUCT_LIST
371 * Do not compile the extended product list. Removes the list of Activation GUIDs (aka
372 * Client SKU Id, License Id) and their respective product names (e.g. Windows 8.1 Enterprise).
374 * This affects logging only and does not have an effect on activation itself. As long as you
375 * do not also define NO_BASIC_PRODUCT_LIST more generic names like Windows 8.1 or Office 2013
376 * will still be logged. Saves a lot of space without loosing much functionality.
380 //#define NO_EXTENDED_PRODUCT_LIST
382 #endif // NO_EXTENDED_PRODUCT_LIST
387 #ifndef NO_BASIC_PRODUCT_LIST
389 * Do not compile the basic product list. Removes the list KMS GUIDs (aka Server SKU Id) and their
390 * respective product names. Only affects logging not activation. This has a negative impact only
391 * if you activate a product that is not (yet) in the extended product list. On the other hand you
392 * do not save much space by not compiling this list.
395 //#define NO_BASIC_PRODUCT_LIST
397 #endif // NO_BASIC_PRODUCT_LIST
402 #ifndef NO_VERBOSE_LOG
404 * Removes the ability to do verbose logging and disables -v and -q in vlmcsd. It does not remove the -v
405 * option in the vlmcs client. Disables ini file directive LogVerbose.
408 //#define NO_VERBOSE_LOG
410 #endif // NO_VERBOSE_LOG
415 #ifndef NO_LOG
417 * Disables logging completely. You can neither log to a file nor to the console. -D and -f will
418 * start vlmcsd in foreground. -e will not be available. Disables ini file directive LogFile.
419 * Implies NO_VERBOSE_LOG, NO_EXTENDED_PRODUCT_LIST and NO_BASIC_PRODUCT_LIST.
422 //#define NO_LOG
424 #endif // NO_LOG
429 #ifndef NO_RANDOM_EPID
431 * Disables the ability to generate random ePIDs. Useful if you managed to grab ePID/HWID from a
432 * real KMS server and want to use these. Removes -r from the vlmcsd command line and the ini
433 * file directive RandomizationLevel (The randomization level will be harcoded to 0).
436 //#define NO_RANDOM_EPID
438 #endif // NO_RANDOM_EPID
443 #ifndef NO_INI_FILE
445 * Disables the ability to use a configuration file (aka ini file). Removes -i from the command line.
448 //#define NO_INI_FILE
450 #endif // NO_INI_FILE
455 #ifndef NO_PID_FILE
457 * Disables the abilty to write a pid file containing the process id of vlmcsd. If your init system
458 * does not need this feature, you can safely disables this but it won't save much space. Disables
459 * the use of -p from the command line and PidFile from the ini file.
462 //#define NO_PID_FILE
464 #endif // NO_PID_FILE
469 #ifndef NO_USER_SWITCH
471 * Disables switching to another uid and/or gid after starting the program and setting up the sockets.
472 * You cannot use -u anf -g on the command line as well as User and Group in the ini file. If your init system
473 * supports starting daemons as another uid/gid (user/group) you can disable this feature in vlmcsd as long as you
474 * do not need to run vlmcsd on a privileged port ( < 1024 on most systems).
476 * This setting has no effect on native Windows since -u and -g is not available anyway. It may be used with
477 * Cygwin.
480 //#define NO_USER_SWITCH
482 #endif // NO_USER_SWITCH
487 #ifndef NO_HELP
489 * Disables display of help in both vlmcsd and vlmcs. Saves some bytes but only makes sense if you have
490 * access to the man files vlmcsd.8 and vlmcs.1
493 //#define NO_HELP
495 #endif // NO_HELP
500 #ifndef NO_CUSTOM_INTERVALS
502 * Disables the ability to specify custom interval for renewing and retrying activation. Newer versions of the Microsoft's
503 * KMS activation client (as in Win 8.1) do not honor these parameters anyway. Disable them to save some bytes. Removes
504 * -A and -R from the command line as well as ActivationInterval and RenewalInterval in the ini file.
507 //#define NO_CUSTOM_INTERVALS
509 #endif // NO_CUSTOM_INTERVALS
514 #ifndef NO_SOCKETS
516 * Disables standalone startup of vlmcsd. If you use this config directive, you must start vlmcsd from an internet
517 * superserver like inetd, xinetd, systemd or launchd. Disables -m, -t, -4, -6, -e, -f, -P and -L in the vlmcsd
518 * command line. Socket setup is the job of your superserver.
521 //#define NO_SOCKETS
523 #endif // NO_SOCKETS
528 #ifndef NO_CL_PIDS
530 * Disables the ability to specify ePIDs and HWID at the command line. You still may use them in the ini file.
531 * Removes -0, -3, -w and -H from the vlmcsd command line.
534 //#define NO_CL_PIDS
536 #endif // NO_CL_PIDS
541 #ifndef NO_LIMIT
543 * Disables the ability to limit the number of worker threads or processes that vlmcsd uses. While you should set a
544 * limit whenever possible, you may save some bytes by enabling that setting. If you do not use a limit, use vlmcsd
545 * in a "friendly" environment only, i.e. do not run it without a reasonable limit on the internet.
547 * Removes the ability to use -m in the vlmcsd command line and MaxWorkers in the ini file.
549 * Some older unixoid OSses may not have pthreads. Do NOT use USE_THREADS and define NO_SIGHUP
550 * and NO_LIMIT instead to disable use of the pthreads, shared memory and semaphores.
553 //#define NO_LIMIT
555 #endif // NO_LIMIT
560 #ifndef NO_SIGHUP
562 * Disables the ability to signal hangup (SIGHUP) to vlmcsd to restart it (rereading the ini file). The SIGHUP
563 * handler makes heavy use of OS specific code. It should not cause any trouble on Solaris, Mac OS X and iOS. On Linux
564 * use "#define USE_AUXV" (see troubleshooting options) if this is supported by your C runtime library.
566 * You may save some bytes by enabling this option. Use it also if the SIGHUP handler causes any trouble on your
567 * platform. Please note that with no SIGHUP handler at all. vlmcsd will simply terminate (uncleanly) if it receives
568 * the SIGHUP signal. This is the same behavior as with most other signals.
570 * This option has no effect on native Windows since Posix signaling is not supported. It can be used with Cygwin.
573 //#define NO_SIGHUP
575 #endif // NO_SIGHUP
580 /* Don't change anything BELOW this line */
583 #endif /* CONFIG_H_ */