From a983b06d37c3b87a02444d9a9862777b88629344 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Sep 2006 04:44:32 +0000 Subject: r18129: moved the system includes into libreplace - this gives much more isolation of our portability environment from the main code, and also simplifies the includes system (no separate #ifdef _SAMBA_BUILD for tdb. ldb etc now) (This used to be commit 77d1a468e06290aba789e2f3affc769fc5159a21) --- source4/lib/replace/system/passwd.h | 96 +++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 source4/lib/replace/system/passwd.h (limited to 'source4/lib/replace/system/passwd.h') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h new file mode 100644 index 0000000000..6f8d729a7c --- /dev/null +++ b/source4/lib/replace/system/passwd.h @@ -0,0 +1,96 @@ +#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 + + +#ifndef HAVE_INITGROUPS +int initgroups(char *name,gid_t id); +#endif + +#endif -- cgit From 3ca73facc59ed8a97abbc28c1b4bedde87e109a6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Sep 2006 11:31:59 +0000 Subject: r18160: - pread and pwrite replacements need to be non-static - replacing rename() is pointless - all platforms have it (and the #define of rename breaks some code) - use system/locale.h in snprintf.c - fix passwd.h for initgroups - stdlib is in replace.h, not needed elsewhere - fix the initgroups replacement - fix mapping of dl functions to rep_* (This used to be commit 57cd0ca176387d6a3acabf9fedeef4f2a3a3dad7) --- source4/lib/replace/system/passwd.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source4/lib/replace/system/passwd.h') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 6f8d729a7c..21f31f0388 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/lib/replace/system/passwd.h @@ -88,9 +88,4 @@ #define ULTRIX_AUTH 1 #endif - -#ifndef HAVE_INITGROUPS -int initgroups(char *name,gid_t id); -#endif - #endif -- cgit From c3b00b471aaa4a0da7f2743ae2170a36bb11a16f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 13 May 2007 15:53:59 +0000 Subject: r22827: Change license to LGPL (discussed with tridge). (This used to be commit 1193c759622edd9e6843d9b7f53d9532748ce8a0) --- source4/lib/replace/system/passwd.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'source4/lib/replace/system/passwd.h') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 21f31f0388..d51914eb50 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/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 b8d69a7ea2505b706ff7c74d7c97bc89d82dfa07 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:46:15 +0000 Subject: r23795: more v2->v3 conversion (This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac) --- source4/lib/replace/system/passwd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/system/passwd.h') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index d51914eb50..6820d05b97 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/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 6c973f4e8ccbcb6c9275f8a54e26abb19df7e15a 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 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb) --- source4/lib/replace/system/passwd.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/lib/replace/system/passwd.h') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 6820d05b97..4e858fc89c 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/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 c68e3d8d652109edd95999755b31fd123bbffc90 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 17 Oct 2007 14:02:06 +0200 Subject: r25685: rename getsmbpass -> rep_getpass and provide the function prototype metze (cherry picked from commit 96820f8d8f6522fc264efda0f069e2f6a420ac2e) (This used to be commit cd5069a8ca17a3a14814c0fbf55f113690291165) --- source4/lib/replace/system/passwd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/system/passwd.h') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 4e858fc89c..53d35e7b87 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/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 4d354fd58374df6ab5ae52e6cd61988377ceddb2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 5 Nov 2007 15:45:08 +0100 Subject: r25838: libreplace: include nss_wrapper.h if NSS_WRAPPER is defined metze (This used to be commit 17f9189fb4b34dbc08f6aded6b0c81ee8eb07a9f) --- source4/lib/replace/system/passwd.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/lib/replace/system/passwd.h') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 53d35e7b87..513947c85d 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/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 9ed91eabdd9311f01c2595a60e4b05a5869cc699 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 6 Nov 2007 06:54:49 +0100 Subject: r25863: libreplace: we need include before nss_wrapper.h metze (This used to be commit a16f0e3cdbb9fb1238e25af8bb911c27b839c89b) --- source4/lib/replace/system/passwd.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib/replace/system/passwd.h') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 513947c85d..36fca7b4f8 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/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 645c6518d75c683865a29d1b8c49247a092399da 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. (lib/replace part of 657bf8c3479d6192f269e3daef1517e77a9fa9cb metze) (This used to be commit 9f5c443972a09a70de7c8d6695b08c3730484c6c) --- source4/lib/replace/system/passwd.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/system/passwd.h') diff --git a/source4/lib/replace/system/passwd.h b/source4/lib/replace/system/passwd.h index 36fca7b4f8..cad3197ccb 100644 --- a/source4/lib/replace/system/passwd.h +++ b/source4/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