[GLUE] Rsync SAMBA_3_0 SVN r25598 in order to create the v3-0-test branch.
[gd/samba/.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    This program is free software; you can redistribute it and/or modify
12    it under the terms of the GNU General Public License as published by
13    the Free Software Foundation; either version 2 of the License, or
14    (at your option) any later version.
15    
16    This program is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19    GNU General Public License for more details.
20    
21    You should have received a copy of the GNU General Public License
22    along with this program; if not, write to the Free Software
23    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26 #ifdef HAVE_PWD_H
27 #include <pwd.h>
28 #endif
29 #ifdef HAVE_GRP_H
30 #include <grp.h>
31 #endif
32 #ifdef HAVE_SYS_PRIV_H
33 #include <sys/priv.h>
34 #endif
35 #ifdef HAVE_SYS_ID_H
36 #include <sys/id.h>
37 #endif
38
39 #ifdef HAVE_CRYPT_H
40 #include <crypt.h>
41 #endif
42
43 #ifdef HAVE_SHADOW_H
44 #include <shadow.h>
45 #endif
46
47 #ifdef HAVE_SYS_SECURITY_H
48 #include <sys/security.h>
49 #include <prot.h>
50 #define PASSWORD_LENGTH 16
51 #endif  /* HAVE_SYS_SECURITY_H */
52
53 #ifdef HAVE_GETPWANAM
54 #include <sys/label.h>
55 #include <sys/audit.h>
56 #include <pwdadj.h>
57 #endif
58
59 #ifdef HAVE_COMPAT_H
60 #include <compat.h>
61 #endif
62
63 #ifdef REPLACE_GETPASS
64 #define getpass(prompt) getsmbpass((prompt))
65 #endif
66
67 #ifndef NGROUPS_MAX
68 #define NGROUPS_MAX 32 /* Guess... */
69 #endif
70
71 /* what is the longest significant password available on your system? 
72  Knowing this speeds up password searches a lot */
73 #ifndef PASSWORD_LENGTH
74 #define PASSWORD_LENGTH 8
75 #endif
76
77 #if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS)
78 #define OSF1_ENH_SEC 1
79 #endif
80
81 #ifndef ALLOW_CHANGE_PASSWORD
82 #if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
83 #define ALLOW_CHANGE_PASSWORD 1
84 #endif
85 #endif
86
87 #if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
88 #define ULTRIX_AUTH 1
89 #endif
90
91 #endif