s/qmail  4.1.18
Next generation secure email transport
Macros | Functions | Variables
checkpassword-ldap.c File Reference
#include <sys/types.h>
#include <grp.h>
#include <pwd.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ldap.h>
Include dependency graph for checkpassword-ldap.c:

Go to the source code of this file.

Macros

#define LDAP_HOST   "localhost"
 
#define LDAP_BASE   "ou=mail,o=enterprise"
 
#define LDAP_SCOPE   LDAP_SCOPE_SUBTREE
 
#define LDAP_FILTER   "(&(uid=%s)(dc=%s))"
 
#define LDAP_UID_PARAM   "uid"
 
#define LDAP_HOME_PARAM   "mailMessageStore"
 
#define LDAP_BIND_DN   "uid=auth,ou=mail,o=enterprise"
 
#define LDAP_BIND_PASSWD   "password"
 
#define MAIL_ACCOUNT_NAME   "mail"
 
#define MAIL_ACCOUNT_UID   8
 
#define MAIL_ACCOUNT_GID   12
 
#define PROTOCOL_LEN   512
 

Functions

int _ldap_lookup (void)
 
int _ldap_get_home_param (void)
 
int main (int argc, char *argv[])
 

Variables

char up [PROTOCOL_LEN]
 
char * prog
 
char * password
 
char * homeparam
 
char * user
 
char * host
 
char * username
 

Macro Definition Documentation

◆ LDAP_BASE

#define LDAP_BASE   "ou=mail,o=enterprise"

Definition at line 38 of file checkpassword-ldap.c.

◆ LDAP_BIND_DN

#define LDAP_BIND_DN   "uid=auth,ou=mail,o=enterprise"

Definition at line 43 of file checkpassword-ldap.c.

◆ LDAP_BIND_PASSWD

#define LDAP_BIND_PASSWD   "password"

Definition at line 44 of file checkpassword-ldap.c.

◆ LDAP_FILTER

#define LDAP_FILTER   "(&(uid=%s)(dc=%s))"

Definition at line 40 of file checkpassword-ldap.c.

◆ LDAP_HOME_PARAM

#define LDAP_HOME_PARAM   "mailMessageStore"

Definition at line 42 of file checkpassword-ldap.c.

◆ LDAP_HOST

#define LDAP_HOST   "localhost"

Definition at line 37 of file checkpassword-ldap.c.

◆ LDAP_SCOPE

#define LDAP_SCOPE   LDAP_SCOPE_SUBTREE

Definition at line 39 of file checkpassword-ldap.c.

◆ LDAP_UID_PARAM

#define LDAP_UID_PARAM   "uid"

Definition at line 41 of file checkpassword-ldap.c.

◆ MAIL_ACCOUNT_GID

#define MAIL_ACCOUNT_GID   12

Definition at line 48 of file checkpassword-ldap.c.

◆ MAIL_ACCOUNT_NAME

#define MAIL_ACCOUNT_NAME   "mail"

Definition at line 46 of file checkpassword-ldap.c.

◆ MAIL_ACCOUNT_UID

#define MAIL_ACCOUNT_UID   8

Definition at line 47 of file checkpassword-ldap.c.

◆ PROTOCOL_LEN

#define PROTOCOL_LEN   512

Definition at line 50 of file checkpassword-ldap.c.

Function Documentation

◆ _ldap_get_home_param()

int _ldap_get_home_param ( void  )

Definition at line 208 of file checkpassword-ldap.c.

◆ _ldap_lookup()

int _ldap_lookup ( void  )

Definition at line 157 of file checkpassword-ldap.c.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 59 of file checkpassword-ldap.c.

Variable Documentation

◆ homeparam

char * homeparam

Definition at line 54 of file checkpassword-ldap.c.

◆ host

char * host

Definition at line 54 of file checkpassword-ldap.c.

◆ password

char * password

Definition at line 54 of file checkpassword-ldap.c.

◆ prog

char* prog

Definition at line 54 of file checkpassword-ldap.c.

◆ up

char up[PROTOCOL_LEN]

Definition at line 53 of file checkpassword-ldap.c.

◆ user

char * user

Definition at line 54 of file checkpassword-ldap.c.

◆ username

char * username

Definition at line 54 of file checkpassword-ldap.c.