r23309: sync lib/replace with SAMBA_4_0
[sfrench/samba-autobuild/.git] / source / lib / replace / system / passwd.h
1 #ifndef _system_passwd_h
2 #define _system_passwd_h
3
4 /* 
5    Unix SMB/CIFS implementation.
6
7    passwd system include wrappers
8
9    Copyright (C) Andrew Tridgell 2004
10    
11      ** NOTE! The following LGPL license applies to the replace
12      ** library. This does NOT imply that all of Samba is released
13      ** under the LGPL
14    
15    This library is free software; you can redistribute it and/or
16    modify it under the terms of the GNU Lesser General Public
17    License as published by the Free Software Foundation; either
18    version 2 of the License, or (at your option) any later version.
19
20    This library is distributed in the hope that it will be useful,
21    but WITHOUT ANY WARRANTY; without even the implied warranty of
22    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23    Lesser General Public License for more details.
24
25    You should have received a copy of the GNU Lesser General Public
26    License along with this library; if not, write to the Free Software
27    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28
29 */
30
31 #ifdef HAVE_PWD_H
32 #include <pwd.h>
33 #endif
34 #ifdef HAVE_GRP_H
35 #include <grp.h>
36 #endif
37 #ifdef HAVE_SYS_PRIV_H
38 #include <sys/priv.h>
39 #endif
40 #ifdef HAVE_SYS_ID_H
41 #include <sys/id.h>
42 #endif
43
44 #ifdef HAVE_CRYPT_H
45 #include <crypt.h>
46 #endif
47
48 #ifdef HAVE_SHADOW_H
49 #include <shadow.h>
50 #endif
51
52 #ifdef HAVE_SYS_SECURITY_H
53 #include <sys/security.h>
54 #include <prot.h>
55 #define PASSWORD_LENGTH 16
56 #endif  /* HAVE_SYS_SECURITY_H */
57
58 #ifdef HAVE_GETPWANAM
59 #include <sys/label.h>
60 #include <sys/audit.h>
61 #include <pwdadj.h>
62 #endif
63
64 #ifdef HAVE_COMPAT_H
65 #include <compat.h>
66 #endif
67
68 #ifdef REPLACE_GETPASS
69 #define getpass(prompt) getsmbpass((prompt))
70 #endif
71
72 #ifndef NGROUPS_MAX
73 #define NGROUPS_MAX 32 /* Guess... */
74 #endif
75
76 /* what is the longest significant password available on your system? 
77  Knowing this speeds up password searches a lot */
78 #ifndef PASSWORD_LENGTH
79 #define PASSWORD_LENGTH 8
80 #endif
81
82 #if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS)
83 #define OSF1_ENH_SEC 1
84 #endif
85
86 #ifndef ALLOW_CHANGE_PASSWORD
87 #if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
88 #define ALLOW_CHANGE_PASSWORD 1
89 #endif
90 #endif
91
92 #if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
93 #define ULTRIX_AUTH 1
94 #endif
95
96 #endif