JunkBox_Lib  1.10.2
password.h
Go to the documentation of this file.
1 #ifndef __JBXL_PASSWORD_H_
2 #define __JBXL_PASSWORD_H_
3 
10 /*
11 #ifndef _XOPEN_SOURCE
12  #define _XOPEN_SOURCE
13 #endif
14 */
15 
16 #include "tools.h"
17 #include <pwd.h>
18 
19 
20 #ifdef HAVE_SHADOW_H
21  #include <shadow.h>
22 #endif
23 
24 #ifdef HAVE_UNISTD_H
25  #ifndef _XOPEN_SOURCE
26  #define _XOPEN_SOURCE
27  #endif
28  #include <unistd.h>
29 #endif
30 
31 #ifdef HAVE_CRYPT_H
32  #include <crypt.h>
33 #endif
34 
35 #ifdef HAVE_RPCSVC_YPCLNT_H
36  #include <rpcsvc/ypclnt.h>
37 #endif
38 
39 #ifdef AIX
40  struct dom_binding {int dummy;};
41 #endif
42 
43 
44 #define LEN_DOLLAR_SALT 12
45 #define LEN_DOLLAR2_SALT 29
46 #define LEN_DOLLAR5_SALT 20
47 #define LEN_DOLLAR6_SALT 20
48 
49 #define LEN_MD5PASS 34
50 #define LEN_MD5SALT 12
51 #define LEN_DESPASS 13
52 #define LEN_DESSALT 2
53 
54 
55 char* get_passwd(char* user_id);
56 void free_pw(struct passwd* pw);
57 int check_passwd(char* passwd, char* cryptpass);
58 int check_salt(char* passwd);
59 
60 char* x2crypt(char* pass, char* salt);
61 
62 
63 #ifdef HAVE_RPCSVC_YPCLNT_H
64 char* get_nis_passwdf(char* usrid);
65 struct passwd* getnisnam(char* usrid);
66 #endif
67 
68 
69 #endif
int check_passwd(char *passwd, char *cryptpass)
Definition: password.c:248
char * x2crypt(char *pass, char *salt)
Definition: password.c:194
void free_pw(struct passwd *pw)
Definition: password.c:167
char * get_passwd(char *user_id)
Definition: password.c:25
int check_salt(char *passwd)
Definition: password.c:301
汎用ツールヘッダ