summaryrefslogtreecommitdiffstats
path: root/source3/winbindd
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2014-02-21 18:56:04 +0100
committerGünther Deschner <gd@samba.org>2014-03-12 10:13:20 +0100
commit1270e35ba70a4e4881512d375c767023512f67bd (patch)
treee64e3bdf1912577e3d8c253d4219d27be81cf090 /source3/winbindd
parent35a1ed22f65473fabb2f4846f6d2b50da1847f6a (diff)
downloadsamba-1270e35ba70a4e4881512d375c767023512f67bd.tar.gz
samba-1270e35ba70a4e4881512d375c767023512f67bd.tar.xz
samba-1270e35ba70a4e4881512d375c767023512f67bd.zip
s3-kerberos: return a full PAC in kerberos_return_pac().
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_pam.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 61e2cefd522..a8daae51484 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -576,7 +576,9 @@ static NTSTATUS winbindd_raw_kerberos_login(TALLOC_CTX *mem_ctx,
time_t time_offset = 0;
const char *user_ccache_file;
struct PAC_LOGON_INFO *logon_info = NULL;
+ struct PAC_DATA *pac_data = NULL;
const char *local_service;
+ int i;
*info3 = NULL;
@@ -662,7 +664,7 @@ static NTSTATUS winbindd_raw_kerberos_login(TALLOC_CTX *mem_ctx,
WINBINDD_PAM_AUTH_KRB5_RENEW_TIME,
NULL,
local_service,
- &logon_info);
+ &pac_data);
if (user_ccache_file != NULL) {
gain_root_privilege();
}
@@ -673,6 +675,24 @@ static NTSTATUS winbindd_raw_kerberos_login(TALLOC_CTX *mem_ctx,
goto failed;
}
+ if (pac_data == NULL) {
+ goto failed;
+ }
+
+ for (i=0; i < pac_data->num_buffers; i++) {
+
+ if (pac_data->buffers[i].type != PAC_TYPE_LOGON_INFO) {
+ continue;
+ }
+
+ logon_info = pac_data->buffers[i].info->logon_info.info;
+ if (!logon_info) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
+ break;
+ }
+
*info3 = &logon_info->info3;
DEBUG(10,("winbindd_raw_kerberos_login: winbindd validated ticket of %s\n",