src/group.h file

Enums

enum GroupScope { GROUP_SCOPE_DOMAIN_LOCAL = 0, GROUP_SCOPE_GLOBAL = 1, GROUP_SCOPE_UNIVERSAL = 2 }
enum GroupCategory { GROUP_CATEGORY_DISTRIBUTION = 0, GROUP_CATEGORY_SECURITY = 1 }

Functions

auto ld_add_group(LDHandle* handle, const char* name, LDAPAttribute_t** attributes, const char* parent) -> enum OperationReturnCode
ld_add_group Creates the group.
auto ld_del_group(LDHandle* handle, const char* name, const char* parent) -> enum OperationReturnCode
ld_del_group Deletes the group.
auto ld_mod_group(LDHandle* handle, const char* name, const char* parent, LDAPAttribute_t** group_attrs) -> enum OperationReturnCode
ld_mod_group Modifies the group.
auto ld_rename_group(LDHandle* handle, const char* old_name, const char* new_name, const char* parent) -> enum OperationReturnCode
ld_rename_group Renames group.
auto ld_group_add_user(LDHandle* handle, const char* group_name, const char* user_name) -> enum OperationReturnCode
ld_group_add_user Adds user to the group.
auto ld_group_remove_user(LDHandle* handle, const char* group_name, const char* user_name) -> enum OperationReturnCode
ld_group_remove_user Removes user from the group.

Function documentation

enum OperationReturnCode ld_add_group(LDHandle* handle, const char* name, LDAPAttribute_t** attributes, const char* parent)

ld_add_group Creates the group.

Parameters
handle in Pointer to libdomain session handle.
name in Name of a group.
attributes in List of group attributes depends on directory type.
parent in Parent container that holds the group.
Returns
  • RETURN_CODE_SUCCESS on success.
  • RETURN_CODE_FAILURE on failure.

enum OperationReturnCode ld_del_group(LDHandle* handle, const char* name, const char* parent)

ld_del_group Deletes the group.

Parameters
handle in Pointer to libdomain session handle.
name in Name of the group.
parent in Container that holds the group.
Returns
  • RETURN_CODE_SUCCESS on success.
  • RETURN_CODE_FAILURE on failure.

enum OperationReturnCode ld_mod_group(LDHandle* handle, const char* name, const char* parent, LDAPAttribute_t** group_attrs)

ld_mod_group Modifies the group.

Parameters
handle in Pointer to libdomain session handle.
name in Name of the group.
parent in Container that holds the group.
group_attrs in List of attributes to modify.
Returns
  • RETURN_CODE_SUCCESS on success.
  • RETURN_CODE_FAILURE on failure.

enum OperationReturnCode ld_rename_group(LDHandle* handle, const char* old_name, const char* new_name, const char* parent)

ld_rename_group Renames group.

Parameters
handle in Pointer to libdomain session handle.
old_name in Old name of the group.
new_name in New name of the group.
parent in Container that holds the group.
Returns
  • RETURN_CODE_SUCCESS on success.
  • RETURN_CODE_FAILURE on failure.

enum OperationReturnCode ld_group_add_user(LDHandle* handle, const char* group_name, const char* user_name)

ld_group_add_user Adds user to the group.

Parameters
handle in Pointer to libdomain session handle.
group_name in Name of the group to add user into.
user_name in Name of the user to add.
Returns
  • RETURN_CODE_SUCCESS on success.
  • RETURN_CODE_FAILURE on failure.

enum OperationReturnCode ld_group_remove_user(LDHandle* handle, const char* group_name, const char* user_name)

ld_group_remove_user Removes user from the group.

Parameters
handle in Pointer to libdomain session handle.
group_name in Name of the group to remove user from.
user_name in Name of the user.
Returns
  • RETURN_CODE_SUCCESS on success.
  • RETURN_CODE_FAILURE on failure.