dsinst.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. /** BEGIN COPYRIGHT BLOCK
  2. * This Program is free software; you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation; version 2 of the License.
  5. *
  6. * This Program is distributed in the hope that it will be useful, but WITHOUT
  7. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  9. *
  10. * You should have received a copy of the GNU General Public License along with
  11. * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  12. * Place, Suite 330, Boston, MA 02111-1307 USA.
  13. *
  14. * In addition, as a special exception, Red Hat, Inc. gives You the additional
  15. * right to link the code of this Program with code not covered under the GNU
  16. * General Public License ("Non-GPL Code") and to distribute linked combinations
  17. * including the two, subject to the limitations in this paragraph. Non-GPL Code
  18. * permitted under this exception must only link to the code of this Program
  19. * through those well defined interfaces identified in the file named EXCEPTION
  20. * found in the source code files (the "Approved Interfaces"). The files of
  21. * Non-GPL Code may instantiate templates or use macros or inline functions from
  22. * the Approved Interfaces without causing the resulting work to be covered by
  23. * the GNU General Public License. Only Red Hat, Inc. may make changes or
  24. * additions to the list of Approved Interfaces. You must obey the GNU General
  25. * Public License in all respects for all of the Program code and other code used
  26. * in conjunction with the Program except the Non-GPL Code covered by this
  27. * exception. If you modify this file, you may extend this exception to your
  28. * version of the file, but you are not obligated to do so. If you do not wish to
  29. * provide this exception without modification, you must delete this exception
  30. * statement from your version and license this file solely under the GPL without
  31. * exception.
  32. *
  33. *
  34. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  35. * Copyright (C) 2005 Red Hat, Inc.
  36. * All rights reserved.
  37. * END COPYRIGHT BLOCK **/
  38. //////////////////////////////////////////////////////////////////////////////
  39. // dsinst.h - Netscape SuiteSpot Installation Plug-In Directory Server
  40. //
  41. //
  42. #ifndef __DSINST_H
  43. #define __DSINST_H
  44. #include <regparms.h>
  45. #include "libinst.h"
  46. #include "plstr.h"
  47. extern __declspec(dllexport) DSINST_ReadComponentInf(LPCSTR pszCacheFile, LPCSTR pszSection);
  48. extern __declspec(dllexport) INT __cdecl DSINST_AskOptions(HWND hwndParent, INT nDirection);
  49. extern __declspec(dllexport) VOID __cdecl DSINST_GetSummary(LPSTR lpszSummary);
  50. extern __declspec(dllexport) BOOL __cdecl DSINST_WriteCacheGlobal(LPCSTR lpszCacheFileName, LPCSTR lpszSection);
  51. extern __declspec(dllexport) BOOL __cdecl DSINST_WriteCacheLocal(LPCSTR lpszCacheFileName, LPCSTR lpszSection);
  52. extern __declspec(dllexport) BOOL __cdecl DSINST_ReadCacheGlobal(LPCSTR lpszCacheFileName, LPCSTR lpszSection);
  53. extern __declspec(dllexport) BOOL __cdecl DSINST_ReadCacheLocal(LPCSTR lpszCacheFileName, LPCSTR lpszSection);
  54. extern __declspec(dllexport) BOOL __cdecl DSINST_PreInstall(LPCSTR lpszInstallPath);
  55. extern __declspec(dllexport) BOOL __cdecl DSINST_Install(void);
  56. extern __declspec(dllexport) BOOL __cdecl DSINST_PostInstall(void);
  57. extern __declspec(dllexport) BOOL __cdecl DSINST_PreUnInstall(LPCSTR pszServerRoot);
  58. extern __declspec(dllexport) BOOL __cdecl DSINST_PostUnInstall(LPCSTR pszServerRoot);
  59. /* no attr we add uses more the 5 */
  60. #define MAX_LDAP_ATTR_VALUES 5
  61. /* shutdown tries * shutdown time should == 10 minutes */
  62. #define MAX_SLAPD_SHUTDOWN_TRIES 2400
  63. #define SLAPD_SHUTDOWN_TIME_MILLISECONDS 15000
  64. /* stevross: GLOBAL_INF_ only here to speed integration until
  65. admin header file gets updated */
  66. #define GLOBAL_INF_LDAP_INSTALL_DN "InstallationRootDN"
  67. #define LOCAL_INF_HOST "InstanceHost"
  68. #define LOCAL_INF_PORT "InstancePort"
  69. #define LOCAL_INF_SUFFIX "InstanceSuffix"
  70. #define LOCAL_INF_ROOTDN "RootDN"
  71. #define LOCAL_INF_ROOTDN_PASSWD "RootDNPwd"
  72. #define LOCAL_INF_CONFIG_SSPT "ConfigSspt"
  73. #define LOCAL_INF_CONFIG_CONSUMER_DN "ConfigConsumerDN"
  74. #define LOCAL_INF_SNMP_ON "SNMPServiceOn"
  75. #define NETSCAPEROOT "NetscapeRoot"
  76. /* for now admin wants suffix always to be o=netscaperoot,
  77. have it defined here in case it changes */
  78. #define CONFIG_DIR_SUFFIX "o=netscaperoot"
  79. /* default settings */
  80. #define DEFAULT_UNRESTRICTED_USER "cn=Directory Manager"
  81. #define DEFAULT_SERVER_PORT 389
  82. #define DEFAULT_SECURITY_ON 0
  83. #define DEFAULT_CONFIG_SSPT 1
  84. #define DEFAULT_START_SERVER 1
  85. #define DEFAULT_LDAP_INSTALL_DN "ou=mcom.com, o=NetscapeRoot"
  86. #define DEFAULT_SSPT_USER "admin"
  87. #define DEFAULT_SUPPLIER_DN "cn=Replication Manager"
  88. #define DEFAULT_CHANGELOGDIR "logs\\changelogdb"
  89. #define DEFAULT_CHANGELOGSUFFIX "cn=changelog"
  90. #define DEFAULT_ADD_SAMPLE_ENTRIES 0
  91. #define DEFAULT_ADD_ORG_ENTRIES 0
  92. #define DEFAULT_SETUP_CONSUMER 0
  93. #define DEFAULT_CIR_HOST "\0"
  94. #define DEFAULT_CIR_PORT 389
  95. #define DEFAULT_CIR_SUFFIX "\0"
  96. #define DEFAULT_CIR_BINDDN "cn=Replication Consumer"
  97. #define DEFAULT_CIR_BINDDN_PWD "\0"
  98. #define DEFAULT_CIR_INTERVAL 10
  99. #define DEFAULT_CIR_DAYS "0123456"
  100. #define DEFAULT_CIR_TIMES "0000-2359"
  101. #define DEFAULT_REPLICATION_DN "cn=supplier"
  102. #define DEFAULT_REPLICATION_PWD "\0"
  103. #define DEFAULT_SETUP_SUPPLIER 0
  104. #define DEFAULT_SIR_HOST "\0"
  105. #define DEFAULT_SIR_PORT 389
  106. #define DEFAULT_SIR_SUFFIX "\0"
  107. #define DEFAULT_SIR_BINDDN "cn=supplier"
  108. #define DEFAULT_SIR_BINDDN_PWD "\0"
  109. #define DEFAULT_SIR_DAYS "0123456"
  110. #define DEFAULT_SIR_TIMES "0000-2359"
  111. #define DEFAULT_CONFIG_CONSUMER_DN 0
  112. #define DEFAULT_CONSUMER_DN "cn=Replication Consumer"
  113. #define DEFAULT_CONSUMER_PWD "\0"
  114. #define DEFAULT_INF_POP_LDIF_FILE "\0"
  115. #define DEFAULT_POPULATE_SAMPLE_ENTRIES 0
  116. #define DEFAULT_DISABLE_SCHEMA_CHECKING 0
  117. #define DEFAULT_SNMP_ON 0
  118. #define DEFAULT_ADMIN_PORT 80
  119. #define SUGGEST_LDIF "suggest"
  120. #define SAMPLE_LDIF "bin\\slapd\\install\\ldif\\Example.ldif"
  121. #define TEMPLATE_LDIF "bin\\slapd\\install\\ldif\\template.ldif"
  122. #define PROCESSED_TEMPLATE_LDIF "ldif\\sample-org.ldif"
  123. #define LDAP_MODIFY_EXE "bin\\slapd\\server\\ldapmodify.exe"
  124. #define INSTALL_CTRS_BAT "install-nsldapctrs.bat"
  125. #define BIN_SLAPD_INSTALL_BIN "bin\\slapd\\install\\bin"
  126. #define ROOT_DN "RootDN"
  127. #define ROOT_DN_PWD "RootDNPwd"
  128. #define SERVER_IDENTIFIER "ServerId"
  129. #define CONSUMER_REPL_AGREE "Consumer Replication Agreement"
  130. #define SUPPLIER_REPL_AGREE "Supplier Replication Agreement"
  131. #define SERVER_MIGRATION_CLASS "com.netscape.admin.dirserv.task.MigrateCreate"
  132. #define SERVER_CREATION_CLASS "com.netscape.admin.dirserv.task.MigrateCreate"
  133. #define NO_REPLICATION 3
  134. #define CONSUMER_SIR_REPLICATION 1
  135. #define CONSUMER_CIR_REPLICATION 2
  136. #define SUPPLIER_SIR_REPLICATION 1
  137. #define SUPPLIER_CIR_REPLICATION 2
  138. /// inf file stuff
  139. #define SETUP_INF_COM_VENDOR "Vendor"
  140. #define SETUP_INF_COM_DESC "Description"
  141. #define SETUP_INF_COM_NAME "Name"
  142. #define SETUP_INF_COM_NICKNAME "NickName"
  143. #define SETUP_INF_COM_VERSION "Version"
  144. #define SETUP_INF_COM_BUILDNUMBER "BuildNumber"
  145. #define SETUP_INF_COM_REVISION "Revision"
  146. #define SETUP_INF_COM_CREATIONDATE "CreationDate"
  147. #define SETUP_INF_COM_EXPIRY "Expires"
  148. #define SETUP_INF_COM_SECURITY "Security"
  149. #define SLAPD_MIN_PW_LEN 8
  150. #define SSPT_MIN_PW_LEN 1
  151. #define N_DAYS 8
  152. #define N_TIMES 10
  153. #define SNMP_SERVICE "SNMP"
  154. /* error messages */
  155. #define ASCII_ZERO 48
  156. typedef struct tagMODULEINFO {
  157. HINSTANCE m_hModule;
  158. HWND m_hwndParent;
  159. INT m_nResult;
  160. INT m_nReInstall;
  161. CHAR *m_szMCCBindAs;
  162. INT m_nInstanceServerPort;
  163. INT m_nAdminServerPort;
  164. INT m_nCfgSspt;
  165. INT m_nPopulateSampleEntries;
  166. INT m_nPopulateSampleOrg;
  167. INT m_nSetupConsumerReplication;
  168. INT m_nSetupSupplierReplication;
  169. INT m_nMaxChangeLogRecords;
  170. INT m_nMaxChangeLogAge;
  171. INT m_nChangeLogAgeMagnitude;
  172. INT m_nConsumerSSL;
  173. INT m_nSupplierSSL;
  174. INT m_nUseSupplierSettings;
  175. INT m_nUseChangeLogSettings;
  176. INT m_nCIRInterval;
  177. INT m_nConsumerPort;
  178. INT m_nSupplierPort;
  179. INT m_nMCCPort;
  180. INT m_nExistingMCC;
  181. INT m_nUGPort;
  182. INT m_nExistingUG;
  183. INT m_nDisableSchemaChecking;
  184. INT m_nSNMPOn;
  185. INT m_nConfigConsumerDN;
  186. CHAR m_szMCCPw[MAX_STR_SIZE];
  187. CHAR m_szMCCHost[MAX_STR_SIZE];
  188. CHAR m_szMCCSuffix[MAX_STR_SIZE];
  189. CHAR m_szUGPw[MAX_STR_SIZE];
  190. CHAR m_szUGHost[MAX_STR_SIZE];
  191. CHAR m_szUGSuffix[MAX_STR_SIZE];
  192. CHAR m_szAdminDomain[MAX_STR_SIZE];
  193. CHAR m_szLdapURL[MAX_STR_SIZE];
  194. CHAR m_szUserGroupURL[MAX_STR_SIZE];
  195. CHAR m_szUserGroupAdmin[MAX_STR_SIZE];
  196. CHAR m_szUserGroupAdminPW[MAX_STR_SIZE];
  197. CHAR m_szInstallDN[MAX_STR_SIZE];
  198. CHAR m_szSsptUid[MAX_STR_SIZE];
  199. CHAR m_szSsptUidPw[MAX_STR_SIZE];
  200. CHAR m_szSsptUidPwAgain[MAX_STR_SIZE];
  201. CHAR m_szSsptUser[MAX_STR_SIZE];
  202. CHAR m_szServerIdentifier[MAX_STR_SIZE];
  203. CHAR m_szInstanceSuffix[MAX_STR_SIZE];
  204. CHAR m_szInstanceUnrestrictedUser[MAX_STR_SIZE];
  205. CHAR m_szInstancePassword[MAX_STR_SIZE];
  206. CHAR m_szInstancePasswordAgain[MAX_STR_SIZE];
  207. CHAR m_szInstanceHostName[MAX_STR_SIZE];
  208. CHAR m_szSupplierDN[MAX_STR_SIZE];
  209. CHAR m_szSupplierPW[MAX_STR_SIZE];
  210. CHAR m_szSupplierPWAgain[MAX_STR_SIZE];
  211. CHAR m_szSSLClients[MAX_STR_SIZE];
  212. CHAR m_szChangeLogDbDir[MAX_STR_SIZE];
  213. CHAR m_szChangeLogSuffix[MAX_STR_SIZE];
  214. CHAR m_szConsumerDN[MAX_STR_SIZE];
  215. CHAR m_szConsumerPW[MAX_STR_SIZE];
  216. CHAR m_szConsumerPWAgain[MAX_STR_SIZE];
  217. CHAR m_szConsumerHost[MAX_STR_SIZE];
  218. CHAR m_szConsumerRoot[MAX_STR_SIZE];
  219. CHAR m_szConsumerBindAs[MAX_STR_SIZE];
  220. CHAR m_szConsumerPw[MAX_STR_SIZE];
  221. CHAR m_szSupplierHost[MAX_STR_SIZE];
  222. CHAR m_szSupplierRoot[MAX_STR_SIZE];
  223. CHAR m_szSupplierBindAs[MAX_STR_SIZE];
  224. CHAR m_szSupplierPw[MAX_STR_SIZE];
  225. CHAR m_szPopLdifFile[MAX_STR_SIZE];
  226. CHAR m_szCIRDays[N_DAYS];
  227. CHAR m_szCIRTimes[N_TIMES];
  228. CHAR m_szSIRDays[N_DAYS];
  229. CHAR m_szSIRTimes[N_TIMES];
  230. } MODULEINFO;
  231. typedef struct tagINFDATA
  232. {
  233. char* szVendor;
  234. char* szDescription;
  235. char* szName;
  236. char* szNickname;
  237. char* szVersion;
  238. char* szBuildNumber;
  239. char* szRevision;
  240. char* szTimeStamp;
  241. char* szExpireDate;
  242. char* szSecurity;
  243. } INFDATA;
  244. typedef struct tagShutdownArgs
  245. {
  246. HWND hwnd;
  247. char* pszServiceName;
  248. } ShutdownArg;
  249. #endif // __DSINST_H