s3-waf: Fix client/smbclient dependencies.
[Samba/gebeck_regimport.git] / lib / replace / system / passwd.h
blob223324c4b4670cd2b9f2ef85fd9afb8d9b07ec24
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 /* this needs to be included before nss_wrapper.h on some systems */
31 #include <unistd.h>
33 #ifdef HAVE_PWD_H
34 #include <pwd.h>
35 #endif
36 #ifdef HAVE_GRP_H
37 #include <grp.h>
38 #endif
39 #ifdef HAVE_SYS_PRIV_H
40 #include <sys/priv.h>
41 #endif
42 #ifdef HAVE_SYS_ID_H
43 #include <sys/id.h>
44 #endif
46 #ifdef HAVE_CRYPT_H
47 #include <crypt.h>
48 #endif
50 #ifdef HAVE_SHADOW_H
51 #include <shadow.h>
52 #endif
54 #ifdef HAVE_SYS_SECURITY_H
55 #include <sys/security.h>
56 #include <prot.h>
57 #define PASSWORD_LENGTH 16
58 #endif /* HAVE_SYS_SECURITY_H */
60 #ifdef HAVE_GETPWANAM
61 #include <sys/label.h>
62 #include <sys/audit.h>
63 #include <pwdadj.h>
64 #endif
66 #ifdef HAVE_COMPAT_H
67 #include <compat.h>
68 #endif
70 #if !defined(getpass)
71 #ifdef REPLACE_GETPASS
72 #if defined(REPLACE_GETPASS_BY_GETPASSPHRASE)
73 #define getpass(prompt) getpassphrase(prompt)
74 #else
75 #define getpass(prompt) rep_getpass(prompt)
76 char *rep_getpass(const char *prompt);
77 #endif
78 #endif
79 #endif
81 #ifndef NGROUPS_MAX
82 #define NGROUPS_MAX 32 /* Guess... */
83 #endif
85 /* what is the longest significant password available on your system?
86 Knowing this speeds up password searches a lot */
87 #ifndef PASSWORD_LENGTH
88 #define PASSWORD_LENGTH 8
89 #endif
91 #if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS)
92 #define OSF1_ENH_SEC 1
93 #endif
95 #ifndef ALLOW_CHANGE_PASSWORD
96 #if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
97 #define ALLOW_CHANGE_PASSWORD 1
98 #endif
99 #endif
101 #if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
102 #define ULTRIX_AUTH 1
103 #endif
105 #ifdef NSS_WRAPPER
106 #ifndef NSS_WRAPPER_DISABLE
107 #ifndef NSS_WRAPPER_NOT_REPLACE
108 #define NSS_WRAPPER_REPLACE
109 #endif /* NSS_WRAPPER_NOT_REPLACE */
110 #include "../nss_wrapper/nss_wrapper.h"
111 #endif /* NSS_WRAPPER_DISABLE */
112 #endif /* NSS_WRAPPER */
114 #ifdef UID_WRAPPER
115 # ifndef UID_WRAPPER_DISABLE
116 # ifndef UID_WRAPPER_NOT_REPLACE
117 # define UID_WRAPPER_REPLACE
118 # endif /* UID_WRAPPER_NOT_REPLACE */
119 # include "../uid_wrapper/uid_wrapper.h"
120 # endif /* UID_WRAPPER_DISABLE */
121 #else /* UID_WRAPPER */
122 # define uwrap_enabled() 0
123 #endif /* UID_WRAPPER */
125 #endif