Remove special nss_wrapper code
[Samba.git] / lib / replace / system / passwd.h
blobf8b9a774b3ddb0acbdde4fc80779135ebb5372d8
1 #ifndef _system_passwd_h
2 #define _system_passwd_h
4 /*
5 Unix SMB/CIFS implementation.
7 passwd system include wrappers
9 Copyright (C) Andrew Tridgell 2004
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
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 3 of the License, or (at your option) any later version.
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.
25 You should have received a copy of the GNU Lesser General Public
26 License along with this library; if not, see <http://www.gnu.org/licenses/>.
30 #ifdef HAVE_PWD_H
31 #include <pwd.h>
32 #endif
33 #ifdef HAVE_GRP_H
34 #include <grp.h>
35 #endif
36 #ifdef HAVE_SYS_PRIV_H
37 #include <sys/priv.h>
38 #endif
39 #ifdef HAVE_SYS_ID_H
40 #include <sys/id.h>
41 #endif
43 #ifdef HAVE_CRYPT_H
44 #include <crypt.h>
45 #endif
47 #ifdef HAVE_SHADOW_H
48 #include <shadow.h>
49 #endif
51 #ifdef HAVE_SYS_SECURITY_H
52 #include <sys/security.h>
53 #include <prot.h>
54 #define PASSWORD_LENGTH 16
55 #endif /* HAVE_SYS_SECURITY_H */
57 #ifdef HAVE_GETPWANAM
58 #include <sys/label.h>
59 #include <sys/audit.h>
60 #include <pwdadj.h>
61 #endif
63 #ifdef HAVE_COMPAT_H
64 #include <compat.h>
65 #endif
67 #ifndef NGROUPS_MAX
68 #define NGROUPS_MAX 32 /* Guess... */
69 #endif
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
78 #ifndef ALLOW_CHANGE_PASSWORD
79 #if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
80 #define ALLOW_CHANGE_PASSWORD 1
81 #endif
82 #endif
84 #if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
85 #define ULTRIX_AUTH 1
86 #endif
88 #endif