#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pwd.h>
#include <grp.h>
#include <ctype.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "lcmaps_config.h"
#include "lcmaps_modules.h"
#include "lcmaps_arguments.h"
#include "lcmaps_cred_data.h"
#include "ldap.h"
Go to the source code of this file.
Defines | |
#define | MAX_LOG_BUFFER_SIZE 2048 |
Functions | |
int | lcmaps_get_ldap_pw (const char *path, char **ldap_passwd) |
Get the LDAP password from file. | |
int | lcmaps_set_pgid (const char *username, const char *pgroupname, gid_t pgroupnumber, LDAP *ld_handle, const char *searchBase) |
Sets the primary group ID. | |
int | lcmaps_add_username_to_ldapgroup (const char *username, const char *groupname, gid_t groupnumber, LDAP *ld_handle, const char *searchBase) |
Adds the username to the appropriate (LDAP) group. |
The following internal functions are available:
Definition in file lcmaps_ldap.c.
|
Maximum logging buffer size, length of log may not exceed this number Definition at line 135 of file lcmaps_ldap.c. |
|
Adds the username to the appropriate (LDAP) group. This function tries to add the username to the list of usernames belonging to the group with name groupname and gid groupnumber in the posixGroup LDAP structure. If the group does not exist, -1 is returned.
Definition at line 1026 of file lcmaps_ldap.c. References lcmaps_log(), and lcmaps_log_debug(). |
|
Get the LDAP password from file. This function tries to read the LDAP password from the ldap_pw file. It also tests if the access bits of the file are correctly set.
Definition at line 1373 of file lcmaps_ldap.c. References lcmaps_log(), and lcmaps_log_debug(). |
|
Sets the primary group ID. This function tries to set the primary group in the posixAccount LDAP structure for the user "username".
Definition at line 1265 of file lcmaps_ldap.c. References lcmaps_log(), and lcmaps_log_debug(). |