File: rutinas_db.h

package info (click to toggle)
postman 2.1-6
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,248 kB
  • ctags: 3,249
  • sloc: cpp: 33,376; ansic: 2,014; sh: 768; makefile: 300
file content (64 lines) | stat: -rw-r--r-- 1,340 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

#ifndef __RUTINAS_DB_H
#define __RUTINAS_DB_H

/* 
* Para compilar en el POSTAL:
*   -ldb -I/usr/local/include/db -lsec
*
*  en el POST:
*   -lsec
*
*/       

#ifdef __cplusplus
  extern "C" {
#endif  

#include <pwd.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <signal.h>
#include <crypt.h>
#include <unistd.h>
#include <syslog.h>
#include <stdlib.h>
       
#define XLOGFACILITY LOG_MAIL
#define XLOGOPTIONS  LOG_PID
#define XLOGPRIORITY LOG_INFO

#define XBUFSIZE 300

#if defined(HP)
#include <hpsecurity.h>
#include <prot.h>
#elif defined(LINUX)
#elif defined(SUN)
#endif

#include "xdb.h"

#define MAXDATUM  256  /* maxima longitud e una entrada passwd en DB */
#define MAXUSUNOM  20  /* maxima longitud de nombre de usuario */
#define MAXCAM     10  /* maximo numero de campos en la DB */
#define isdebug     0

struct passwd *sm_getpwnam(char *dbfile, char *user);
int verify_user_POST (char *user, char *pass);
int verify_user_POSTAL (char *dbfile, char *user, char *pass);
int exist_user_POSTAL (char *dbfile, char *user);
int exist_user (char *dbfile, char *user);
void db_get_data_from_user (char *dbfile, char *user, char *imapserver, int *imapport, char *smtpserver, char *maildomain, char *trueemail);
      
#ifdef __cplusplus
  }
#endif
   
#endif