/**
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2014 - 2015 ForgeRock AS.
*/
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#define COBJMACROS
#include "platform.h"
#include "am.h"
#include "utility.h"
#include <objbase.h>
#include <oleauto.h>
#include <ahadmin.h>
#include <accctrl.h>
#include <aclapi.h>
static BOOL add_to_modules(IAppHostWritableAdminManager* manager, BSTR config_path, const char* siteid);
GET_SYS_INFO native = (GET_SYS_INFO) GetProcAddress(GetModuleHandle("kernel32.dll"), "GetNativeSystemInfo");
} else {
}
return TRUE;
}
return FALSE;
}
if (outlen) {
*outlen = 0;
}
if (out_len > 0) {
if (outlen) {
}
return tmp;
}
return NULL;
}
if (outlen) {
*outlen = 0;
}
if (out_len > 0) {
if (outlen) {
}
return tmp;
}
return NULL;
}
static char *get_property_value_byname(IAppHostElement* ahe, VARIANT* value, BSTR* name, VARTYPE type) {
return NULL;
}
}
return NULL;
}
fwprintf(stderr, L"get_property_value_byname(%s) failed. Property type %d differs from type expected %d.",
}
return NULL;
}
} else {
if (l > 0) {
if (tmp) {
tmp[l] = 0;
}
}
}
}
return ret;
}
UINT i;
do {
break;
}
break;
}
hresult = IAppHostWritableAdminManager_GetAdminSection(admin_manager, bstr_sites, bstr_config_path, &he);
break;
}
break;
}
break;
}
for (i = 0; i < num; i++) {
char *p;
for (p = name; *p != '\0'; ++p) {
*p = toupper(*p);
}
}
}
}
}
} while (FALSE);
}
}
if (admin_manager != NULL) {
}
}
do {
break;
}
break;
}
} while (FALSE);
}
}
do {
break;
}
break;
}
} while (FALSE);
}
}
USHORT i;
*index = -1;
do {
break;
}
break;
}
break;
}
*index = i;
break;
}
}
} while (FALSE);
}
}
IAppHostElement** element) {
short idx;
}
if (idx != -1) {
return FALSE;
} else {
return TRUE;
}
} else {
return TRUE;
}
}
do {
break;
}
break;
}
break;
}
break;
}
break;
}
} else {
}
} else {
}
}
}
} while (FALSE);
}
}
}
}
}
}
return result;
}
do {
hresult = IAppHostWritableAdminManager_GetAdminSection(manager, AM_IIS_GLOBAL, AM_IIS_APPHOST, &parent);
break;
}
break;
}
/* create a global modules child element, like:
* <add name="ModuleName", image="module.dll" />
**/
break;
}
break;
}
break;
}
#ifdef ADMIN64BIT
break;
}
#else
break;
}
#endif
break;
}
}
break;
}
} while (FALSE);
}
if (collection != NULL) {
}
}
return result;
}
/**
* Turn the HRESULT in "hr" into a piece of text we can display to the user.
* The text is copied into a static buffer which will be overwritten with each
* call - caveat programmer.
*/
char *msg;
}
if (FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
0, NULL)) {
} else {
}
return buff;
}
static BOOL update_module_site_config(IAppHostWritableAdminManager* manager, BSTR config_path, BSTR mod_config_path, BOOL enabled) {
a.bstrVal = L"enabled";
b.bstrVal = L"configFile";
do {
break;
}
break;
}
break;
}
break;
}
break;
}
break;
}
} while (FALSE);
if (cfile_prop != NULL) {
}
if (enabled_prop != NULL) {
}
if (properties != NULL) {
}
}
return result;
}
static BOOL remove_from_modules(IAppHostWritableAdminManager* manager, BSTR config_path, BSTR section, BOOL test_only) {
short sitemap_index;
do {
break;
}
break;
}
break;
}
break;
}
if (test_only) {
} else {
if (sitemap_index != -1) {
}
} else {
}
}
} while (FALSE);
if (name_property != NULL) {
}
}
if (collection != NULL) {
}
}
return result;
}
int rv = 0;
return rv;
}
if (is_win64()) {
#ifdef ADMIN64BIT
#else
#endif
} else {
}
return rv;
}
do {
break;
}
break;
}
break;
}
break;
}
if (file_exists(schema_sys_file) ||
rv = 1;
} else {
}
} else {
}
}
} while (FALSE);
if (admin_manager != NULL) {
}
return rv;
}
int remove_module() {
int rv = 0;
do {
break;
}
break;
}
break;
}
break;
}
rv = 1;
}
} while (FALSE);
if (admin_manager != NULL) {
}
return rv;
}
UINT i;
do {
break;
}
break;
}
hresult = IAppHostWritableAdminManager_GetAdminSection(admin_manager, bstr_sites, bstr_config_path, &he);
break;
}
break;
}
break;
}
for (i = 0; i < num; i++) {
char *p;
for (p = name; *p != '\0'; ++p) {
*p = toupper(*p);
}
i = num;
}
}
}
}
}
} while (FALSE);
}
}
if (admin_manager != NULL) {
}
return ret;
}
int rv = 0;
char *config_path;
return rv;
}
if (config_path != NULL) {
}
do {
break;
}
break;
}
break;
}
break;
}
break;
}
} else {
rv = 1;
}
}
} while (FALSE);
if (admin_manager != NULL) {
}
return rv;
}
int rv = 0;
char *config_path;
return rv;
}
if (config_path != NULL) {
}
do {
break;
}
break;
}
break;
}
break;
}
break;
}
} else {
rv = 1;
}
}
} while (FALSE);
if (admin_manager != NULL) {
}
return rv;
}
static BOOL add_to_modules(IAppHostWritableAdminManager* manager, BSTR config_path, const char* siteid) {
do {
hresult = IAppHostWritableAdminManager_GetAdminSection(manager, AM_IIS_MODULES, bstr_config_path, &parent);
break;
}
break;
}
break;
}
/* module is already registered */
break;
}
break;
}
break;
}
#ifdef ADMIN64BIT
break;
}
#else
break;
}
#endif
switch (hresult) {
case S_OK:
break;
case ERROR_INVALID_INDEX:
break;
case ERROR_FILE_NOT_FOUND:
{
break;
}
default:
{
break;
}
}
} while (FALSE);
}
if (collection != NULL) {
}
}
return result;
}
char *config_path;
return rv;
}
if (config_path != NULL) {
}
do {
if (config_path_w == NULL) {
break;
}
break;
}
break;
}
break;
}
} else {
}
}
}
}
} while (FALSE);
if (admin_manager != NULL) {
}
return rv;
}
UINT i, j;
do {
break;
}
break;
}
break;
}
break;
}
break;
}
for (i = 0; i < site_count; i++) {
for (j = 0; j < app_count; j++) {
}
}
}
if (app_element_name != NULL) {
}
}
if (app_element != NULL) {
}
}
}
if (site_element_collection != NULL) {
}
}
}
}
}
if (host_element_collection != NULL) {
}
} while (FALSE);
}
if (env_init) {
}
return app_pool;
}
char *app_pool_name;
return AM_EINVAL;
}
if (ISINVALID(app_pool_name)) {
return AM_ERROR;
}
if (rv != ERROR_SUCCESS) {
if (directory_secd != NULL) {
}
return AM_FILE_ERROR;
}
if (rv == ERROR_SUCCESS) {
if (rv == ERROR_SUCCESS) {
status = AM_SUCCESS;
}
}
}
if (directory_secd != NULL) {
}
return status;
}
#else
/*no-ops on this platform*/
}
return 0;
}
return 0;
}
return 0;
}
return 0;
}
int remove_module() {
return 0;
}
return 0;
}
#endif