[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Tue Feb 8 06:51:01 MST 2011
The branch, master has been updated
via 4086c1e s4-waf: split out wscript_build for ndrdump binary.
via 56fe080 lib/compression: add shared wscript_build.
via 947ba44 libndr: apply some const and make is_valid_policy_hnd a callback to policy_handle_empty.
via 34722c7 pam: share pam errors in a common location.
from 242797a pysecurity: Add missing dependency on pytalloc-util.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 4086c1e382a22f08a5b138bb6617451de2042ad9
Author: Günther Deschner <gd at samba.org>
Date: Fri Jan 28 14:02:55 2011 +0100
s4-waf: split out wscript_build for ndrdump binary.
Guenther
Autobuild-User: Günther Deschner <gd at samba.org>
Autobuild-Date: Tue Feb 8 14:50:54 CET 2011 on sn-devel-104
commit 56fe080d87952c6f1f1175444327769c67c55167
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 8 14:00:02 2011 +0100
lib/compression: add shared wscript_build.
Guenther
commit 947ba448a4d52bfbf03f6ed96e96d172a0c69dce
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 8 11:49:33 2011 +0100
libndr: apply some const and make is_valid_policy_hnd a callback to policy_handle_empty.
Guenther
commit 34722c72f687ad8a357656152aed9f6bafab1cad
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 8 10:45:39 2011 +0100
pam: share pam errors in a common location.
Guenther
-----------------------------------------------------------------------
Summary of changes:
lib/compression/wscript_build | 6 +
{source3/lib => libcli/auth}/pam_errors.c | 14 ++--
{source4/auth/ntlm => libcli/auth}/pam_errors.h | 15 ++--
libcli/auth/wscript_build | 4 +
librpc/ndr/libndr.h | 2 +-
librpc/ndr/uuid.c | 6 +-
librpc/tools/wscript_build | 7 ++
librpc/wscript_build | 1 +
source3/Makefile.in | 10 +-
source3/auth/pampass.c | 1 +
source3/include/proto.h | 7 --
source3/pam_smbpass/general.h | 1 +
source3/pam_smbpass/wscript_build | 2 +-
source3/winbindd/winbindd_util.c | 1 +
source3/wscript_build | 9 +-
source4/auth/ntlm/auth_unix.c | 2 +-
source4/auth/ntlm/pam_errors.c | 125 -----------------------
source4/auth/ntlm/wscript_build | 6 -
source4/lib/wscript_build | 6 -
source4/librpc/wscript_build | 9 +--
source4/torture/winbind/struct_based.c | 2 +-
source4/winbind/wb_samba3_cmd.c | 2 +-
22 files changed, 52 insertions(+), 186 deletions(-)
create mode 100644 lib/compression/wscript_build
rename {source3/lib => libcli/auth}/pam_errors.c (98%)
rename {source4/auth/ntlm => libcli/auth}/pam_errors.h (90%)
create mode 100644 librpc/tools/wscript_build
delete mode 100644 source4/auth/ntlm/pam_errors.c
Changeset truncated at 500 lines:
diff --git a/lib/compression/wscript_build b/lib/compression/wscript_build
new file mode 100644
index 0000000..7ad5333
--- /dev/null
+++ b/lib/compression/wscript_build
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+bld.SAMBA_SUBSYSTEM('LZXPRESS',
+ deps='replace',
+ source='lzxpress.c'
+ )
diff --git a/source3/lib/pam_errors.c b/libcli/auth/pam_errors.c
similarity index 98%
rename from source3/lib/pam_errors.c
rename to libcli/auth/pam_errors.c
index e55d7a0..978f8ff 100644
--- a/source3/lib/pam_errors.c
+++ b/libcli/auth/pam_errors.c
@@ -1,23 +1,24 @@
-/*
+/*
* Unix SMB/CIFS implementation.
* PAM error mapping functions
* Copyright (C) Andrew Bartlett 2002
- *
+ *
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
+#include "../libcli/auth/pam_errors.h"
#ifdef WITH_PAM
#if defined(HAVE_SECURITY_PAM_APPL_H)
@@ -28,7 +29,7 @@
#if defined(PAM_AUTHTOK_RECOVERY_ERR) && !defined(PAM_AUTHTOK_RECOVER_ERR)
#define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR
-#endif
+#endif
/* PAM -> NT_STATUS map */
static const struct {
@@ -115,7 +116,7 @@ int nt_status_to_pam(NTSTATUS nt_status)
return PAM_SYSTEM_ERR;
}
-#else
+#else
/*****************************************************************************
convert a PAM error to a NT status32 code
@@ -136,4 +137,3 @@ int nt_status_to_pam(NTSTATUS nt_status)
}
#endif
-
diff --git a/source4/auth/ntlm/pam_errors.h b/libcli/auth/pam_errors.h
similarity index 90%
rename from source4/auth/ntlm/pam_errors.h
rename to libcli/auth/pam_errors.h
index 2dfe085..128910f 100644
--- a/source4/auth/ntlm/pam_errors.h
+++ b/libcli/auth/pam_errors.h
@@ -1,24 +1,24 @@
-/*
+/*
* Unix SMB/CIFS implementation.
* PAM error mapping functions
* Copyright (C) Andrew Bartlett 2002
- *
+ *
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __AUTH_NTLM_PAM_ERRORS_H__
-#define __AUTH_NTLM_PAM_ERRORS_H__
+#ifndef __LIBCLI_AUTH_PAM_ERRORS_H__
+#define __LIBCLI_AUTH_PAM_ERRORS_H__
/*****************************************************************************
convert a PAM error to a NT status32 code
@@ -30,5 +30,4 @@ convert an NT status32 code to a PAM error
*****************************************************************************/
int nt_status_to_pam(NTSTATUS nt_status);
-#endif /* __AUTH_NTLM_PAM_ERRORS_H__ */
-
+#endif /* __LIBCLI_AUTH_PAM_ERRORS_H__ */
diff --git a/libcli/auth/wscript_build b/libcli/auth/wscript_build
index 26b7438..c47c6f7 100644
--- a/libcli/auth/wscript_build
+++ b/libcli/auth/wscript_build
@@ -24,3 +24,7 @@ bld.SAMBA_SUBSYSTEM('COMMON_SCHANNELDB',
deps='tdb-wrap'
)
+
+bld.SAMBA_SUBSYSTEM('PAM_ERRORS',
+ source='pam_errors.c'
+ )
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index f621535..67b5372 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -505,7 +505,7 @@ NDR_SCALAR_PROTO(double, double)
enum ndr_err_code ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r);
enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r);
void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r);
-bool policy_handle_empty(struct policy_handle *h);
+bool policy_handle_empty(const struct policy_handle *h);
bool is_valid_policy_hnd(const struct policy_handle *hnd);
bool policy_handle_equal(const struct policy_handle *hnd1,
const struct policy_handle *hnd2);
diff --git a/librpc/ndr/uuid.c b/librpc/ndr/uuid.c
index b6a7fc7..445b6dd 100644
--- a/librpc/ndr/uuid.c
+++ b/librpc/ndr/uuid.c
@@ -331,16 +331,14 @@ _PUBLIC_ char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid)
guid->node[4], guid->node[5]);
}
-_PUBLIC_ bool policy_handle_empty(struct policy_handle *h)
+_PUBLIC_ bool policy_handle_empty(const struct policy_handle *h)
{
return (h->handle_type == 0 && GUID_all_zero(&h->uuid));
}
_PUBLIC_ bool is_valid_policy_hnd(const struct policy_handle *hnd)
{
- struct policy_handle tmp;
- ZERO_STRUCT(tmp);
- return (memcmp(&tmp, hnd, sizeof(tmp)) != 0);
+ return !policy_handle_empty(hnd);
}
_PUBLIC_ bool policy_handle_equal(const struct policy_handle *hnd1,
diff --git a/librpc/tools/wscript_build b/librpc/tools/wscript_build
new file mode 100644
index 0000000..d1f0a26
--- /dev/null
+++ b/librpc/tools/wscript_build
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+
+bld.SAMBA_BINARY('ndrdump',
+ source='ndrdump.c',
+ manpages='ndrdump.1',
+ deps='samba-hostconfig samba-util popt POPT_SAMBA ndr-table errors'
+ )
diff --git a/librpc/wscript_build b/librpc/wscript_build
index 34be18a..d15e8b2 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -1,6 +1,7 @@
#!/usr/bin/env python
bld.RECURSE('idl')
+bld.RECURSE('../lib/compression')
bld.SAMBA_SUBSYSTEM('NDR_AUDIOSRV',
source='gen_ndr/ndr_audiosrv.c',
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 27de07e..2055a6e 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -457,7 +457,7 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \
lib/ms_fnmatch.o lib/errmap_unix.o \
lib/tallocmsg.o lib/dmallocmsg.o \
libsmb/clisigning.o libsmb/smb_signing.o \
- lib/iconv.o lib/pam_errors.o intl/lang_tdb.o \
+ lib/iconv.o intl/lang_tdb.o \
lib/conn_tdb.o lib/adt_tree.o lib/gencache.o \
lib/sessionid_tdb.o \
lib/module.o lib/events.o @LIBTEVENT_OBJ0@ \
@@ -838,7 +838,8 @@ VFS_CROSSRENAME_OBJ = modules/vfs_crossrename.o
VFS_LINUX_XFS_SGID_OBJ = modules/vfs_linux_xfs_sgid.o
VFS_TIME_AUDIT_OBJ = modules/vfs_time_audit.o
-PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
+PAM_ERRORS_OBJ = ../libcli/auth/pam_errors.o
+PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o $(PAM_ERRORS_OBJ)
SLCACHE_OBJ = libsmb/samlogon_cache.o
@@ -1294,7 +1295,7 @@ PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \
pam_smbpass/pam_smb_acct.o pam_smbpass/support.o ../lib/util/asn1.o
PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
$(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) \
- $(LIBTSOCKET_OBJ)
+ $(LIBTSOCKET_OBJ) $(PAM_ERRORS_OBJ)
IDMAP_RW_OBJ = winbindd/idmap_rw.o
@@ -1427,7 +1428,8 @@ WINBINDD_OBJ = \
$(LIBCLI_SAMR_OBJ) \
$(LIBCLI_NETLOGON_OBJ) \
rpc_client/init_netlogon.o \
- rpc_client/init_samr.o
+ rpc_client/init_samr.o \
+ $(PAM_ERRORS_OBJ)
WBINFO_OBJ = ../nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
$(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) \
diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c
index dfeeb22..a4f136c 100644
--- a/source3/auth/pampass.c
+++ b/source3/auth/pampass.c
@@ -27,6 +27,7 @@
*/
#include "includes.h"
+#include "../libcli/auth/pam_errors.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source3/include/proto.h b/source3/include/proto.h
index a509177..2f2c627 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -608,13 +608,6 @@ int ms_fnmatch(const char *pattern, const char *string, bool translate_pattern,
bool is_case_sensitive);
int gen_fnmatch(const char *pattern, const char *string);
-/* The following definitions come from lib/pam_errors.c */
-
-NTSTATUS pam_to_nt_status(int pam_error);
-int nt_status_to_pam(NTSTATUS nt_status);
-NTSTATUS pam_to_nt_status(int pam_error);
-int nt_status_to_pam(NTSTATUS nt_status);
-
/* The following definitions come from lib/pidfile.c */
pid_t pidfile_pid(const char *name);
diff --git a/source3/pam_smbpass/general.h b/source3/pam_smbpass/general.h
index f6b3e67..74bd870 100644
--- a/source3/pam_smbpass/general.h
+++ b/source3/pam_smbpass/general.h
@@ -1,4 +1,5 @@
#include "../librpc/gen_ndr/samr.h"
+#include "../libcli/auth/pam_errors.h"
#ifndef LINUX
/* This is only needed by modules in the Sun implementation. */
diff --git a/source3/pam_smbpass/wscript_build b/source3/pam_smbpass/wscript_build
index 1a43bce..2eaee2e 100644
--- a/source3/pam_smbpass/wscript_build
+++ b/source3/pam_smbpass/wscript_build
@@ -6,7 +6,7 @@ if bld.CONFIG_SET('WITH_PAM_MODULES'):
pam_smb_passwd.c
pam_smb_acct.c
support.c''',
- deps='''tdb talloc pam wbclient cap ASN1_UTIL PARAM LIB_NONSMBD PASSDB GROUPDB SMBLDAP
+ deps='''tdb talloc pam PAM_ERRORS wbclient cap ASN1_UTIL PARAM LIB_NONSMBD PASSDB GROUPDB SMBLDAP
LIBSAMBA LIBTSOCKET''',
cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
realname='pam_smbpass.so',
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index 58cec44..e87f25e 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -24,6 +24,7 @@
#include "winbindd.h"
#include "secrets.h"
#include "../libcli/security/security.h"
+#include "../libcli/auth/pam_errors.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
diff --git a/source3/wscript_build b/source3/wscript_build
index a799e1a..fde1d17 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -101,7 +101,7 @@ LIB_SRC = '''${LIBSAMBAUTIL_SRC}
lib/ms_fnmatch.c lib/errmap_unix.c
lib/tallocmsg.c lib/dmallocmsg.c
libsmb/clisigning.c libsmb/smb_signing.c
- lib/pam_errors.c intl/lang_tdb.c
+ intl/lang_tdb.c
lib/conn_tdb.c lib/adt_tree.c lib/gencache.c
lib/sessionid_tdb.c
lib/module.c lib/events.c ${LIBTEVENT_SRC0}
@@ -995,7 +995,7 @@ bld.SAMBA_SUBSYSTEM('SERVICES',
bld.SAMBA_SUBSYSTEM('PLAINTEXT_AUTH',
source=PLAINTEXT_AUTH_SRC,
- deps='pam',
+ deps='pam PAM_ERRORS',
vars=locals())
bld.SAMBA_SUBSYSTEM('PASSCHANGE',
@@ -1052,10 +1052,6 @@ bld.SAMBA_SUBSYSTEM('dcerpc', '')
bld.SAMBA_SUBSYSTEM('ldb',
source='lib/ldb_compat.c')
-bld.SAMBA_SUBSYSTEM('LZXPRESS',
- deps='replace',
- source='../lib/compression/lzxpress.c')
-
bld.SAMBA_SUBSYSTEM('NDR_SECURITY',
source='''../librpc/gen_ndr/ndr_security.c ../librpc/ndr/ndr_sec_helper.c''',
deps='ndr',
@@ -1133,6 +1129,7 @@ bld.SAMBA_BINARY('winbindd/winbindd',
LIBCLI_SAMR LIBCLI_LSA LIBRPCCLI_NETLOGON
RPC_NDR_DSSETUP NAMED_PIPE_AUTH_TSTREAM INIT_NETLOGON
RPC_NCACN_NP RPC_PIPE_REGISTER RPC_SAMR RPC_LSARPC
+ PAM_ERRORS
''',
enabled=bld.env.build_winbind,
install_path='${SBINDIR}',
diff --git a/source4/auth/ntlm/auth_unix.c b/source4/auth/ntlm/auth_unix.c
index ba37e0a..08759ab 100644
--- a/source4/auth/ntlm/auth_unix.c
+++ b/source4/auth/ntlm/auth_unix.c
@@ -25,7 +25,7 @@
#include "system/passwd.h" /* needed by some systems for struct passwd */
#include "lib/socket/socket.h"
#include "lib/tsocket/tsocket.h"
-#include "auth/ntlm/pam_errors.h"
+#include "../libcli/auth/pam_errors.h"
#include "param/param.h"
/* TODO: look at how to best fill in parms retrieveing a struct passwd info
diff --git a/source4/auth/ntlm/pam_errors.c b/source4/auth/ntlm/pam_errors.c
deleted file mode 100644
index 9774ad8..0000000
--- a/source4/auth/ntlm/pam_errors.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * PAM error mapping functions
- * Copyright (C) Andrew Bartlett 2002
- *
- * 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 3 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, see <http://www.gnu.org/licenses/>.
- */
-
-#include "includes.h"
-
-#ifdef WITH_HAVE_SECURITY_PAM_APPL_H
-#include <security/pam_appl.h>
-
-#if defined(PAM_AUTHTOK_RECOVERY_ERR) && !defined(PAM_AUTHTOK_RECOVER_ERR)
-#define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR
-#endif
-
-/* PAM -> NT_STATUS map */
-static const struct {
- int pam_code;
- NTSTATUS ntstatus;
-} pam_to_nt_status_map[] = {
- {PAM_OPEN_ERR, NT_STATUS_UNSUCCESSFUL},
- {PAM_SYMBOL_ERR, NT_STATUS_UNSUCCESSFUL},
- {PAM_SERVICE_ERR, NT_STATUS_UNSUCCESSFUL},
- {PAM_SYSTEM_ERR, NT_STATUS_UNSUCCESSFUL},
- {PAM_BUF_ERR, NT_STATUS_UNSUCCESSFUL},
- {PAM_PERM_DENIED, NT_STATUS_ACCESS_DENIED},
- {PAM_AUTH_ERR, NT_STATUS_WRONG_PASSWORD},
- {PAM_CRED_INSUFFICIENT, NT_STATUS_INSUFFICIENT_LOGON_INFO}, /* FIXME: Is this correct? */
- {PAM_AUTHINFO_UNAVAIL, NT_STATUS_LOGON_FAILURE},
- {PAM_USER_UNKNOWN, NT_STATUS_NO_SUCH_USER},
- {PAM_MAXTRIES, NT_STATUS_REMOTE_SESSION_LIMIT}, /* FIXME: Is this correct? */
- {PAM_NEW_AUTHTOK_REQD, NT_STATUS_PASSWORD_MUST_CHANGE},
- {PAM_ACCT_EXPIRED, NT_STATUS_ACCOUNT_EXPIRED},
- {PAM_SESSION_ERR, NT_STATUS_INSUFFICIENT_RESOURCES},
- {PAM_CRED_UNAVAIL, NT_STATUS_NO_TOKEN}, /* FIXME: Is this correct? */
- {PAM_CRED_EXPIRED, NT_STATUS_PASSWORD_EXPIRED}, /* FIXME: Is this correct? */
- {PAM_CRED_ERR, NT_STATUS_UNSUCCESSFUL},
- {PAM_AUTHTOK_ERR, NT_STATUS_UNSUCCESSFUL},
-#ifdef PAM_AUTHTOK_RECOVER_ERR
- {PAM_AUTHTOK_RECOVER_ERR, NT_STATUS_UNSUCCESSFUL},
-#endif
- {PAM_AUTHTOK_EXPIRED, NT_STATUS_PASSWORD_EXPIRED},
- {PAM_SUCCESS, NT_STATUS_OK}
-};
-
-/* NT_STATUS -> PAM map */
-static const struct {
- NTSTATUS ntstatus;
- int pam_code;
-} nt_status_to_pam_map[] = {
- {NT_STATUS_UNSUCCESSFUL, PAM_SYSTEM_ERR},
- {NT_STATUS_NO_SUCH_USER, PAM_USER_UNKNOWN},
- {NT_STATUS_WRONG_PASSWORD, PAM_AUTH_ERR},
- {NT_STATUS_LOGON_FAILURE, PAM_AUTH_ERR},
- {NT_STATUS_ACCOUNT_EXPIRED, PAM_ACCT_EXPIRED},
- {NT_STATUS_PASSWORD_EXPIRED, PAM_AUTHTOK_EXPIRED},
- {NT_STATUS_PASSWORD_MUST_CHANGE, PAM_NEW_AUTHTOK_REQD},
- {NT_STATUS_OK, PAM_SUCCESS}
-};
-
-/*****************************************************************************
-convert a PAM error to a NT status32 code
- *****************************************************************************/
-NTSTATUS pam_to_nt_status(int pam_error)
-{
- int i;
- if (pam_error == 0) return NT_STATUS_OK;
-
- for (i=0; NT_STATUS_V(pam_to_nt_status_map[i].ntstatus); i++) {
- if (pam_error == pam_to_nt_status_map[i].pam_code)
- return pam_to_nt_status_map[i].ntstatus;
- }
- return NT_STATUS_UNSUCCESSFUL;
-}
-
-/*****************************************************************************
-convert an NT status32 code to a PAM error
- *****************************************************************************/
-int nt_status_to_pam(NTSTATUS nt_status)
-{
- int i;
- if NT_STATUS_IS_OK(nt_status) return PAM_SUCCESS;
-
- for (i=0; NT_STATUS_V(nt_status_to_pam_map[i].ntstatus); i++) {
- if (NT_STATUS_EQUAL(nt_status,nt_status_to_pam_map[i].ntstatus))
- return nt_status_to_pam_map[i].pam_code;
- }
- return PAM_SYSTEM_ERR;
-}
-
-#else
-
-/*****************************************************************************
-convert a PAM error to a NT status32 code
- *****************************************************************************/
-NTSTATUS pam_to_nt_status(int pam_error)
-{
- if (pam_error == 0) return NT_STATUS_OK;
- return NT_STATUS_UNSUCCESSFUL;
-}
-
-/*****************************************************************************
-convert an NT status32 code to a PAM error
- *****************************************************************************/
-int nt_status_to_pam(NTSTATUS nt_status)
-{
- if (NT_STATUS_EQUAL(nt_status, NT_STATUS_OK)) return 0;
- return 4; /* PAM_SYSTEM_ERR */
-}
-
-#endif
-
diff --git a/source4/auth/ntlm/wscript_build b/source4/auth/ntlm/wscript_build
index 8063076..b0f519f 100644
--- a/source4/auth/ntlm/wscript_build
+++ b/source4/auth/ntlm/wscript_build
@@ -48,12 +48,6 @@ bld.SAMBA_MODULE('auth_unix',
)
-bld.SAMBA_SUBSYSTEM('PAM_ERRORS',
- source='pam_errors.c',
- deps='talloc'
- )
-
-
bld.SAMBA_LIBRARY('auth',
source='auth.c auth_util.c auth_simple.c',
autoproto='auth_proto.h',
diff --git a/source4/lib/wscript_build b/source4/lib/wscript_build
index 27b5582..872259d 100644
--
Samba Shared Repository
More information about the samba-cvs
mailing list