From 3bbffb96646bda732c21c7c418e80ddc63f16de4 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 14 Aug 2008 16:53:51 +0200 Subject: pam_winbind: convert to use talloc. Guenther --- source3/nsswitch/pam_winbind.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/nsswitch/pam_winbind.h') diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h index 6dba127cdc..425471d0d6 100644 --- a/source3/nsswitch/pam_winbind.h +++ b/source3/nsswitch/pam_winbind.h @@ -7,6 +7,7 @@ #include "../lib/replace/replace.h" #include "system/syslog.h" #include "system/time.h" +#include #define MODULE_NAME "pam_winbind" #define PAM_SM_AUTH @@ -209,3 +210,8 @@ struct pwb_context { dictionary *dict; uint32_t ctrl; }; + +#define TALLOC_FREE(ctx) do { if ((ctx) != NULL) {talloc_free(ctx); ctx=NULL;} } while(0) +#define TALLOC_ZERO_P(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type) +#define TALLOC_P(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type) + -- cgit From 7817ad4ae0c462429f176ddf94bebcd44a3d6619 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 14 Aug 2008 18:15:00 +0200 Subject: pam_winbind: prepare to use libwbclient inside pam_winbind. Guenther --- source3/nsswitch/pam_winbind.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/nsswitch/pam_winbind.h') diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h index 425471d0d6..ea7055ae19 100644 --- a/source3/nsswitch/pam_winbind.h +++ b/source3/nsswitch/pam_winbind.h @@ -8,6 +8,7 @@ #include "system/syslog.h" #include "system/time.h" #include +#include "libwbclient/wbclient.h" #define MODULE_NAME "pam_winbind" #define PAM_SM_AUTH -- cgit From 3eae89dd7729c08a40d97dc1b095011bf2933dce Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 15 Aug 2008 02:34:22 +0200 Subject: pam_winbind: use libwbclient for WINBINDD_PAM_CHAUTHTOK. Guenther --- source3/nsswitch/pam_winbind.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'source3/nsswitch/pam_winbind.h') diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h index ea7055ae19..f05f2d7018 100644 --- a/source3/nsswitch/pam_winbind.h +++ b/source3/nsswitch/pam_winbind.h @@ -182,14 +182,6 @@ do { \ };\ }; -/* from samr.idl */ -#define DOMAIN_PASSWORD_COMPLEX 0x00000001 - -#define SAMR_REJECT_OTHER 0x00000000 -#define SAMR_REJECT_TOO_SHORT 0x00000001 -#define SAMR_REJECT_IN_HISTORY 0x00000002 -#define SAMR_REJECT_COMPLEXITY 0x00000005 - #define ACB_PWNOEXP 0x00000200 /* from netlogon.idl */ -- cgit From 4ff415dd15ac13019171b07b0c49784293d41f53 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 19 Aug 2008 14:48:23 +0200 Subject: pam_winbind: remove ACB_PWNOEXP. Guenther --- source3/nsswitch/pam_winbind.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source3/nsswitch/pam_winbind.h') diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h index f05f2d7018..1b1d646643 100644 --- a/source3/nsswitch/pam_winbind.h +++ b/source3/nsswitch/pam_winbind.h @@ -182,8 +182,6 @@ do { \ };\ }; -#define ACB_PWNOEXP 0x00000200 - /* from netlogon.idl */ #define NETLOGON_CACHED_ACCOUNT 0x00000004 #define NETLOGON_GRACE_LOGON 0x01000000 -- cgit From 9a0860f93f8260040ac458b06d7a8609b7b5beab Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 19 Aug 2008 14:51:31 +0200 Subject: pam_winbind: remove NETLOGON_CACHED_ACCOUNT and NETLOGON_GRACE_LOGON. Guenther --- source3/nsswitch/pam_winbind.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'source3/nsswitch/pam_winbind.h') diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h index 1b1d646643..670120afde 100644 --- a/source3/nsswitch/pam_winbind.h +++ b/source3/nsswitch/pam_winbind.h @@ -182,16 +182,11 @@ do { \ };\ }; -/* from netlogon.idl */ -#define NETLOGON_CACHED_ACCOUNT 0x00000004 -#define NETLOGON_GRACE_LOGON 0x01000000 - -/* from include/rpc_netlogon.h */ #define LOGON_KRB5_FAIL_CLOCK_SKEW 0x02000000 -#define PAM_WB_CACHED_LOGON(x) (x & NETLOGON_CACHED_ACCOUNT) +#define PAM_WB_CACHED_LOGON(x) (x & WBC_AUTH_USER_INFO_CACHED_ACCOUNT) #define PAM_WB_KRB5_CLOCK_SKEW(x) (x & LOGON_KRB5_FAIL_CLOCK_SKEW) -#define PAM_WB_GRACE_LOGON(x) ((NETLOGON_CACHED_ACCOUNT|NETLOGON_GRACE_LOGON) == ( x & (NETLOGON_CACHED_ACCOUNT|NETLOGON_GRACE_LOGON))) +#define PAM_WB_GRACE_LOGON(x) ((WBC_AUTH_USER_INFO_CACHED_ACCOUNT|WBC_AUTH_USER_INFO_GRACE_LOGON) == ( x & (WBC_AUTH_USER_INFO_CACHED_ACCOUNT|WBC_AUTH_USER_INFO_GRACE_LOGON))) struct pwb_context { pam_handle_t *pamh; -- cgit From 9448520828bbd78f34d027fd1801467395449b7c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 25 Aug 2008 14:35:42 +0200 Subject: pam_winbind: remove some unused macros. Guenther --- source3/nsswitch/pam_winbind.h | 47 ------------------------------------------ 1 file changed, 47 deletions(-) (limited to 'source3/nsswitch/pam_winbind.h') diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h index 670120afde..e7c869c843 100644 --- a/source3/nsswitch/pam_winbind.h +++ b/source3/nsswitch/pam_winbind.h @@ -135,53 +135,6 @@ do { \ };\ }; -#define PAM_WB_REMARK_DIRECT_RET(h,f,x)\ -{\ - const char *error_string = NULL; \ - error_string = _get_ntstatus_error_string(x);\ - if (error_string != NULL) {\ - _make_remark(h, f, PAM_ERROR_MSG, error_string);\ - return ret;\ - };\ - _make_remark(h, f, PAM_ERROR_MSG, x);\ - return ret;\ -}; - -#define PAM_WB_REMARK_CHECK_RESPONSE(c,x,y)\ -{\ - const char *ntstatus = x.data.auth.nt_status_string; \ - const char *error_string = NULL; \ - if (!strcasecmp(ntstatus,y)) {\ - error_string = _get_ntstatus_error_string(y);\ - if (error_string != NULL) {\ - _make_remark(c, PAM_ERROR_MSG, error_string);\ - };\ - if (x.data.auth.error_string[0] != '\0') {\ - _make_remark(c, PAM_ERROR_MSG, x.data.auth.error_string);\ - };\ - _make_remark(c, PAM_ERROR_MSG, y);\ - };\ -}; - -#define PAM_WB_REMARK_CHECK_RESPONSE_RET(c,x,y)\ -{\ - const char *ntstatus = x.data.auth.nt_status_string; \ - const char *error_string = NULL; \ - if (!strcasecmp(ntstatus,y)) {\ - error_string = _get_ntstatus_error_string(y);\ - if (error_string != NULL) {\ - _make_remark(c, PAM_ERROR_MSG, error_string);\ - return ret;\ - };\ - if (x.data.auth.error_string[0] != '\0') {\ - _make_remark(c, PAM_ERROR_MSG, x.data.auth.error_string);\ - return ret;\ - };\ - _make_remark(c, PAM_ERROR_MSG, y);\ - return ret;\ - };\ -}; - #define LOGON_KRB5_FAIL_CLOCK_SKEW 0x02000000 #define PAM_WB_CACHED_LOGON(x) (x & WBC_AUTH_USER_INFO_CACHED_ACCOUNT) -- cgit From 042df7f0b78d60a721fa35c42e950774261cea1d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 14 Aug 2008 14:39:52 +0200 Subject: pam_winbind: re-add mkhomedir option. Guenther --- source3/nsswitch/pam_winbind.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/nsswitch/pam_winbind.h') diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h index e7c869c843..cb6f450ccb 100644 --- a/source3/nsswitch/pam_winbind.h +++ b/source3/nsswitch/pam_winbind.h @@ -99,6 +99,7 @@ do { \ #define WINBIND_SILENT 0x00000800 #define WINBIND_DEBUG_STATE 0x00001000 #define WINBIND_WARN_PWD_EXPIRE 0x00002000 +#define WINBIND_MKHOMEDIR 0x00004000 /* * here is the string to inform the user that the new passwords they -- cgit