Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 584357 Details for
Bug 726456
[RFE] sssd should support Netscape LDAP password expiration controls
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
simple implementation of Netscape password warning expiration control
0001-Support-Netscape-LDAP-password-warning-control.patch (text/plain), 3.53 KB, created by
Joshua Roys
on 2012-05-14 12:55:26 UTC
(
hide
)
Description:
simple implementation of Netscape password warning expiration control
Filename:
MIME Type:
Creator:
Joshua Roys
Created:
2012-05-14 12:55:26 UTC
Size:
3.53 KB
patch
obsolete
>From c200566a8220068acd93ae76375d98c6e59b252a Mon Sep 17 00:00:00 2001 >From: Joshua Roys <Joshua.Roys@gtri.gatech.edu> >Date: Thu, 10 May 2012 09:44:01 -0400 >Subject: [PATCH] Support Netscape LDAP password warning control > >https://fedorahosted.org/sssd/ticket/984 >--- > src/providers/ldap/sdap_async_connection.c | 36 ++++++++++++++++++++++++++- > 1 files changed, 34 insertions(+), 2 deletions(-) > >diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c >index 9e4d86a..7c68485 100644 >--- a/src/providers/ldap/sdap_async_connection.c >+++ b/src/providers/ldap/sdap_async_connection.c >@@ -540,7 +540,7 @@ static void simple_bind_done(struct sdap_op *op, > struct tevent_req *req = talloc_get_type(pvt, struct tevent_req); > struct simple_bind_state *state = tevent_req_data(req, > struct simple_bind_state); >- char *errmsg = NULL; >+ char *errmsg = NULL, *nval; > int ret; > LDAPControl **response_controls; > int c; >@@ -586,7 +586,8 @@ static void simple_bind_done(struct sdap_op *op, > DEBUG(7, ("Password Policy Response: expire [%d] grace [%d] " > "error [%s].\n", pp_expire, pp_grace, > ldap_passwordpolicy_err2txt(pp_error))); >- state->ppolicy = talloc(state, struct sdap_ppolicy_data); >+ if (!state->ppolicy) >+ state->ppolicy = talloc(state, struct sdap_ppolicy_data); > if (state->ppolicy == NULL) { > DEBUG(1, ("talloc failed.\n")); > ret = ENOMEM; >@@ -612,6 +613,37 @@ static void simple_bind_done(struct sdap_op *op, > ("Password expired user must set a new password.\n")); > state->result = LDAP_X_SSSD_PASSWORD_EXPIRED; > } >+ } else if (strcmp(response_controls[c]->ldctl_oid, >+ "2.16.840.1.113730.3.4.4") == 0) { >+ DEBUG(4, ("Password expired user must set a new password.\n")); >+ state->result = LDAP_X_SSSD_PASSWORD_EXPIRED; >+ } else if (strcmp(response_controls[c]->ldctl_oid, >+ "2.16.840.1.113730.3.4.5") == 0) { >+ /* ignore controls with suspiciously long values */ >+ if (response_controls[c]->ldctl_value.bv_len > 32) >+ continue; >+ if (!state->ppolicy) >+ state->ppolicy = talloc(state, struct sdap_ppolicy_data); >+ if (state->ppolicy == NULL) { >+ DEBUG(1, ("talloc failed.\n")); >+ ret = ENOMEM; >+ goto done; >+ } >+ /* ensure that bv_val is a null-terminated string */ >+ nval = strndup(response_controls[c]->ldctl_value.bv_val, >+ response_controls[c]->ldctl_value.bv_len + 1); >+ if (nval == NULL) { >+ DEBUG(1, ("strndup failed.\n")); >+ ret = ENOMEM; >+ goto done; >+ } >+ memcpy(nval, response_controls[c]->ldctl_value.bv_val, >+ response_controls[c]->ldctl_value.bv_len); >+ nval[response_controls[c]->ldctl_value.bv_len] = '\0'; >+ state->ppolicy->expire = atoi(nval); >+ free(nval); >+ DEBUG(4, ("Password will expire in [%d] seconds.\n", >+ state->ppolicy->expire)); > } > } > } >-- >1.7.4.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 726456
:
583569
|
584357
|
584385