12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- /*
- * Licensed Materials - Property of IBM and/or HCL
- *
- * IBM Informix
- * Copyright IBM Corporation 2013
- * (c) Copyright HCL Technologies Ltd. 2017. All Rights Reserved.
- */
- #include "API.h"
- #ifndef IADUSER_HEADER_INCLUDED
- #define IADUSER_HEADER_INCLUDED
- /* Installation properties */
- #define IAD_P_RUNAS_INFORMIX 0 /* used for server owner */
- #define IAD_P_CHANGE_USER_CRED 1 /* Changes are required for user */
- #define IAD_P_RUNAS_LOCAL 2 /* local or remote informix account */
- #define IAD_P_ENABLE_ROLESEP 3
- #define IAD_P_USER_IS_ADMIN 4
- #define IAD_P_USER_IS_DOMAIN_ADMIN 5
- #define IAD_P_COMPUTER_IS_DOMAIN 6
- #define IAD_P_COMPUTER_ON_DOMAIN 7 /* TRUE when computer is connected to domain
- * and user has rights to query users on
- * DOMAIN */
- #define IAD_P_FIRST IAD_P_RUNAS_INFORMIX
- #define IAD_P_LAST_SETABLE IAD_P_ENABLE_ROLESEP
- #define IAD_P_LAST IAD_P_COMPUTER_ON_DOMAIN
- #define IAD_P_GROUP_EXISTS 0 /* group there */
- #define IAD_P_USER_EXISTS 1 /* user there */
- #define IAD_P_DOMAIN_GROUP_EXISTS 2 /* True when the loged in user detects that
- * the DOMAIN group is there */
- #define IAD_P_DOMAIN_USER_EXISTS 3
- #define IAD_USERTYPE_DBSA 0
- #define IAD_USERTYPE_DBSO 1
- #define IAD_USERTYPE_AAOG 2
- #define IAD_USERTYPE_USER 3
- #define IAD_USERTYPE_JSON 4
- #define IAD_USERTYPE_LAST IAD_USERTYPE_JSON
- #define FALSE 0
- #define TRUE 1
- /* function prototypes */
- /* Called by init_API */
- /* detects the current state of the informix required users and groups */
- EXPORT int STDCALL initIadUser(install_t *is);
- /* Called by deployInstallation */
- /* Applies informix required users and groups */
- EXPORT int STDCALL iadDeployIfmxCredentials(install_t *is);
- /* Not implemented yet, need to confirm what it needs to do */
- EXPORT int STDCALL iadValidateUser(install_t *is);
- /* iadSetInstallationProperty,
- * property must be a valid properties, between IAD_P_FIRST and IAD_P_LAST_SETABLE
- * setting must be TRUE or FALSE
- */
- EXPORT int STDCALL iadSetInstallationProperty(install_t *is, int property, int setting);
- /* iadGetUserProperty, property must be a valid enum user_properties, returns TRUE or FALSE */
- EXPORT int STDCALL iadGetUserProperty(install_t *is, int type, int property);
- EXPORT int STDCALL iadGetInstallationProperty(install_t *is, int property);
- /* When modifying user info use this home dir for informix account */
- EXPORT int STDCALL iadSetHomePath(install_t *is, const char *homedir);
- /* When modifying user info use this password for informix account */
- /* When not modifying user info validate that this is the password for informix account */
- EXPORT int STDCALL iadSetPasswd(install_t *is, int type, const char *passwd);
- EXPORT char *STDCALL iadGetAccountName(install_t *is);
- EXPORT char *STDCALL iadGetAccountName_a(install_t *is, int type);
- EXPORT char *STDCALL iadGetUserName(install_t * is, int type);
- EXPORT char *STDCALL iadGetGroupName(install_t * is, int type);
- EXPORT char *STDCALL iadGetDoaminControler(install_t * is);
- EXPORT char *STDCALL iadGetDoaminName(install_t * is);
- EXPORT int STDCALL iadChangeGroupRequired(install_t * is, int type, const char *group);
- EXPORT int STDCALL iadAddUserGroupRequired(install_t * is, int type, const char *group, const char *user, const char * passwd);
- /* Cleanup All user related memory */
- EXPORT void STDCALL iadFreeUser(install_t * is);
- #endif /* IADUSER_HEADER_INCLUDED */
|