2006-09-19 02:49:20 +04:00
# ifndef _system_passwd_h
# define _system_passwd_h
2009-09-15 22:26:24 +04:00
/*
2006-09-19 02:49:20 +04:00
Unix SMB / CIFS implementation .
passwd system include wrappers
Copyright ( C ) Andrew Tridgell 2004
2009-09-15 22:26:24 +04:00
2007-06-02 13:10:08 +04:00
* * NOTE ! The following LGPL license applies to the replace
* * library . This does NOT imply that all of Samba is released
* * under the LGPL
2009-09-15 22:26:24 +04:00
2007-06-02 13:10:08 +04:00
This library is free software ; you can redistribute it and / or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
2007-07-10 05:44:42 +04:00
version 3 of the License , or ( at your option ) any later version .
2007-06-02 13:10:08 +04:00
This library is distributed in the hope that it will be useful ,
2006-09-19 02:49:20 +04:00
but WITHOUT ANY WARRANTY ; without even the implied warranty of
2007-06-02 13:10:08 +04:00
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public
2007-07-10 07:42:26 +04:00
License along with this library ; if not , see < http : //www.gnu.org/licenses/>.
2007-06-02 13:10:08 +04:00
2006-09-19 02:49:20 +04:00
*/
2007-11-06 09:54:49 +03:00
/* this needs to be included before nss_wrapper.h on some systems */
# include <unistd.h>
2006-09-19 02:49:20 +04:00
# ifdef HAVE_PWD_H
# include <pwd.h>
# endif
# ifdef HAVE_GRP_H
# include <grp.h>
# endif
# ifdef HAVE_SYS_PRIV_H
# include <sys/priv.h>
# endif
# ifdef HAVE_SYS_ID_H
# include <sys/id.h>
# endif
# ifdef HAVE_CRYPT_H
# include <crypt.h>
# endif
# ifdef HAVE_SHADOW_H
# include <shadow.h>
# endif
# ifdef HAVE_SYS_SECURITY_H
# include <sys/security.h>
# include <prot.h>
# define PASSWORD_LENGTH 16
# endif /* HAVE_SYS_SECURITY_H */
# ifdef HAVE_GETPWANAM
# include <sys/label.h>
# include <sys/audit.h>
# include <pwdadj.h>
# endif
# ifdef HAVE_COMPAT_H
# include <compat.h>
# endif
2012-02-01 00:15:36 +04:00
# if !defined(getpass)
2006-09-19 02:49:20 +04:00
# ifdef REPLACE_GETPASS
2007-12-12 00:16:35 +03:00
# if defined(REPLACE_GETPASS_BY_GETPASSPHRASE)
# define getpass(prompt) getpassphrase(prompt)
# else
2007-10-15 17:42:13 +04:00
# define getpass(prompt) rep_getpass(prompt)
char * rep_getpass ( const char * prompt ) ;
2006-09-19 02:49:20 +04:00
# endif
2007-12-12 00:16:35 +03:00
# endif
2012-02-01 00:15:36 +04:00
# endif
2006-09-19 02:49:20 +04:00
# ifndef NGROUPS_MAX
# define NGROUPS_MAX 32 /* Guess... */
# endif
2009-09-15 22:26:24 +04:00
/* what is the longest significant password available on your system?
2006-09-19 02:49:20 +04:00
Knowing this speeds up password searches a lot */
# ifndef PASSWORD_LENGTH
# define PASSWORD_LENGTH 8
# endif
# if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS)
# define OSF1_ENH_SEC 1
# endif
# ifndef ALLOW_CHANGE_PASSWORD
# if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
# define ALLOW_CHANGE_PASSWORD 1
# endif
# endif
# if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
# define ULTRIX_AUTH 1
# endif
2007-11-05 18:45:08 +03:00
# ifdef NSS_WRAPPER
2010-02-08 10:55:44 +03:00
# ifndef NSS_WRAPPER_DISABLE
2007-11-05 18:45:08 +03:00
# ifndef NSS_WRAPPER_NOT_REPLACE
# define NSS_WRAPPER_REPLACE
2010-02-08 10:55:44 +03:00
# endif /* NSS_WRAPPER_NOT_REPLACE */
2008-09-16 19:05:00 +04:00
# include "../nss_wrapper/nss_wrapper.h"
2010-02-08 10:55:44 +03:00
# endif /* NSS_WRAPPER_DISABLE */
# endif /* NSS_WRAPPER */
2007-11-05 18:45:08 +03:00
2011-10-27 14:00:53 +04:00
# ifdef UID_WRAPPER
# ifndef UID_WRAPPER_DISABLE
# ifndef UID_WRAPPER_NOT_REPLACE
# define UID_WRAPPER_REPLACE
# endif /* UID_WRAPPER_NOT_REPLACE */
# include ".. / uid_wrapper / uid_wrapper.h"
# endif /* UID_WRAPPER_DISABLE */
# else /* UID_WRAPPER */
# define uwrap_enabled() 0
# endif /* UID_WRAPPER */
2006-09-19 02:49:20 +04:00
# endif