heimdal: Add parameter to windc_plugin to allow extended return codes.
authorAndrew Kroeger <andrew@sprocks.gotdns.com>
Thu, 13 Mar 2008 04:11:48 +0000 (23:11 -0500)
committerAndrew Kroeger <andrew@sprocks.gotdns.com>
Thu, 13 Mar 2008 06:16:49 +0000 (01:16 -0500)
These changes add a krb5_data parameter named e_data to the windc_plugin to
allow the samba KDC to return extended error information in addition to the
standard KRB5KDC_ERR_* codes.  Windows uses the extended information to provide
detailed information in user dialogs (e.g. account disabled, logon hours
restriction, must change password, etc.).

This particular commit modifies only heimdal code.  Hopefully this can be
submitted and accepted into the upstream heimdal codebase.
(This used to be commit f542362be25e7182a0836de7a0163f6b9fce9408)

source4/heimdal/kdc/kdc-private.h
source4/heimdal/kdc/kerberos5.c
source4/heimdal/kdc/windc.c
source4/heimdal/kdc/windc_plugin.h

index 030be9ae58baeabc2717d43acb642d99c58d1e01..4052e9b5090acd1f29f9e61cd4993391fcc7abc5 100644 (file)
@@ -281,6 +281,7 @@ krb5_error_code
 _kdc_windc_client_access (
        krb5_context /*context*/,
        struct hdb_entry_ex */*client*/,
-       KDC_REQ */*req*/);
+       KDC_REQ */*req*/,
+       krb5_data */*e_data*/);
 
 #endif /* __kdc_private_h__ */
index 40a9c9c972f53ba52d871c24f598bf1611fc732f..23ca5a035ec67365038e2e753c3a57885c55f2d4 100644 (file)
@@ -1043,7 +1043,7 @@ _kdc_as_rep(krb5_context context,
        goto out;
     }
 
-    ret = _kdc_windc_client_access(context, client, req);
+    ret = _kdc_windc_client_access(context, client, req, &e_data);
     if(ret)
        goto out;
 
index 395ab7343284667ab7119def32d9cf1ff5e38dae..85e4d7f725cb415d036409b8a675d9823d0bef78 100644 (file)
@@ -101,9 +101,10 @@ _kdc_pac_verify(krb5_context context,
 krb5_error_code
 _kdc_windc_client_access(krb5_context context,
                         struct hdb_entry_ex *client,
-                        KDC_REQ *req)
+                        KDC_REQ *req,
+                        krb5_data *e_data)
 {
     if (windcft == NULL)
        return 0;
-    return (windcft->client_access)(windcctx, context, client, req);
+    return (windcft->client_access)(windcctx, context, client, req, e_data);
 }
index ec480cf950c667414e0e392da0e5607a530c2b59..3ae0c94681e785cd28cdf9eaf3d2db456c361de4 100644 (file)
@@ -64,7 +64,7 @@ typedef krb5_error_code
 
 typedef krb5_error_code 
 (*krb5plugin_windc_client_access)(
-    void *, krb5_context, struct hdb_entry_ex *, KDC_REQ *);
+    void *, krb5_context, struct hdb_entry_ex *, KDC_REQ *, krb5_data *);
 
 
 #define KRB5_WINDC_PLUGING_MINOR               2