From 8f153c6128dd15fb132d8ddb1752e793bd6a5985 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 18 Sep 2006 22:49:20 +0000 Subject: r18644: bring in libreplace in lib/replace metze (This used to be commit 596cbe73dd268742acf456fccd8a234376fb0c97) --- source3/lib/replace/system/passwd.h | 91 +++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 source3/lib/replace/system/passwd.h (limited to 'source3/lib/replace/system/passwd.h') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h new file mode 100644 index 0000000000..21f31f0388 --- /dev/null +++ b/source3/lib/replace/system/passwd.h @@ -0,0 +1,91 @@ +#ifndef _system_passwd_h +#define _system_passwd_h + +/* + Unix SMB/CIFS implementation. + + passwd system include wrappers + + Copyright (C) Andrew Tridgell 2004 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifdef HAVE_PWD_H +#include +#endif +#ifdef HAVE_GRP_H +#include +#endif +#ifdef HAVE_SYS_PRIV_H +#include +#endif +#ifdef HAVE_SYS_ID_H +#include +#endif + +#ifdef HAVE_CRYPT_H +#include +#endif + +#ifdef HAVE_SHADOW_H +#include +#endif + +#ifdef HAVE_SYS_SECURITY_H +#include +#include +#define PASSWORD_LENGTH 16 +#endif /* HAVE_SYS_SECURITY_H */ + +#ifdef HAVE_GETPWANAM +#include +#include +#include +#endif + +#ifdef HAVE_COMPAT_H +#include +#endif + +#ifdef REPLACE_GETPASS +#define getpass(prompt) getsmbpass((prompt)) +#endif + +#ifndef NGROUPS_MAX +#define NGROUPS_MAX 32 /* Guess... */ +#endif + +/* what is the longest significant password available on your system? + 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 + +#endif -- cgit From e893d7f021d149803aa85e347e0a8acefde210ac Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 2 Jun 2007 09:10:08 +0000 Subject: r23309: sync lib/replace with SAMBA_4_0 metze (This used to be commit 20965d800fcac0c55853fb12cdd36b5836fc7e56) --- source3/lib/replace/system/passwd.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'source3/lib/replace/system/passwd.h') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 21f31f0388..d51914eb50 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/lib/replace/system/passwd.h @@ -8,19 +8,24 @@ Copyright (C) Andrew Tridgell 2004 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + ** NOTE! The following LGPL license applies to the replace + ** library. This does NOT imply that all of Samba is released + ** under the LGPL - This program is distributed in the hope that it will be useful, + 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 + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + 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 + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ #ifdef HAVE_PWD_H -- cgit From 2c09988e46d4e917b1c53c9bda3f81a48bba4952 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 01:44:42 +0000 Subject: r23790: LGPLv3+ conversion for our LGPLv2+ library code (This used to be commit 1b78cace504f60c0f525765fbf59d9cc6506cd4d) --- source3/lib/replace/system/passwd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/replace/system/passwd.h') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index d51914eb50..6820d05b97 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/lib/replace/system/passwd.h @@ -15,7 +15,7 @@ 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 - version 2 of the License, or (at your option) any later version. + version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -- cgit From 9fa1c63578733077c0aaaeeb2fc97c3b191089cc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 03:42:26 +0000 Subject: r23798: updated old Temple Place FSF addresses to new URL (This used to be commit c676a971142d7176fd5dbf21405fca14515a0a76) --- source3/lib/replace/system/passwd.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/lib/replace/system/passwd.h') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 6820d05b97..4e858fc89c 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/lib/replace/system/passwd.h @@ -23,8 +23,7 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see . */ -- cgit From c08cd08acc74db1f7b5620ad346131a9d77b0a08 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Oct 2007 15:42:13 +0200 Subject: rename getsmbpass -> rep_getpass and provide the function prototype metze (This used to be commit 96820f8d8f6522fc264efda0f069e2f6a420ac2e) --- source3/lib/replace/system/passwd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/lib/replace/system/passwd.h') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 4e858fc89c..53d35e7b87 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/lib/replace/system/passwd.h @@ -65,7 +65,8 @@ #endif #ifdef REPLACE_GETPASS -#define getpass(prompt) getsmbpass((prompt)) +#define getpass(prompt) rep_getpass(prompt) +char *rep_getpass(const char *prompt); #endif #ifndef NGROUPS_MAX -- cgit From f16544ad3b167113a352605ffb0f7bb79116eff3 Mon Sep 17 00:00:00 2001 From: metze Date: Mon, 5 Nov 2007 15:45:08 +0000 Subject: libreplace: include nss_wrapper.h if NSS_WRAPPER is defined metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25838 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 809fee4bef66eb8b8687f88257c0d6f77d3b4063) --- source3/lib/replace/system/passwd.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/lib/replace/system/passwd.h') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 53d35e7b87..513947c85d 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/lib/replace/system/passwd.h @@ -93,4 +93,11 @@ char *rep_getpass(const char *prompt); #define ULTRIX_AUTH 1 #endif +#ifdef NSS_WRAPPER +#ifndef NSS_WRAPPER_NOT_REPLACE +#define NSS_WRAPPER_REPLACE +#endif +#include "lib/nss_wrapper/nss_wrapper.h" +#endif + #endif -- cgit From cfb20163a5a6b8a58778c95e53824dcd68938454 Mon Sep 17 00:00:00 2001 From: metze Date: Tue, 6 Nov 2007 06:54:49 +0000 Subject: libreplace: we need include before nss_wrapper.h metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25863 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 20ec1f472566bbc570fa138cce5dbd0407aef530) --- source3/lib/replace/system/passwd.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/lib/replace/system/passwd.h') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 513947c85d..36fca7b4f8 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/lib/replace/system/passwd.h @@ -27,6 +27,9 @@ */ +/* this needs to be included before nss_wrapper.h on some systems */ +#include + #ifdef HAVE_PWD_H #include #endif -- cgit From 95c2f313cef37680fee47b2fc4d1bf15929ad6e7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 11 Dec 2007 13:16:35 -0800 Subject: Add patches for bug #4866 from jiri sasek - Sun Microsystems - Prague Czech Republic - slightly modified - Jiri please check ! to allow Solaris to get passwords > 8 chars. Jeremy. (This used to be commit 657bf8c3479d6192f269e3daef1517e77a9fa9cb) --- source3/lib/replace/system/passwd.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib/replace/system/passwd.h') diff --git a/source3/lib/replace/system/passwd.h b/source3/lib/replace/system/passwd.h index 36fca7b4f8..cad3197ccb 100644 --- a/source3/lib/replace/system/passwd.h +++ b/source3/lib/replace/system/passwd.h @@ -68,9 +68,13 @@ #endif #ifdef REPLACE_GETPASS +#if defined(REPLACE_GETPASS_BY_GETPASSPHRASE) +#define getpass(prompt) getpassphrase(prompt) +#else #define getpass(prompt) rep_getpass(prompt) char *rep_getpass(const char *prompt); #endif +#endif #ifndef NGROUPS_MAX #define NGROUPS_MAX 32 /* Guess... */ -- cgit