Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tero Saarni
OpenLDAP
Commits
6b2a341f
Commit
6b2a341f
authored
Sep 01, 2015
by
Ryan Tandy
Committed by
Quanah Gibson-Mount
Sep 11, 2015
Browse files
ITS#8234 revert to default policy on failure
parent
24019415
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/overlays/ppolicy.c
View file @
6b2a341f
...
...
@@ -464,6 +464,18 @@ add_passcontrol( Operation *op, SlapReply *rs, LDAPControl *ctrl )
return
oldctrls
;
}
static
void
ppolicy_get_default
(
PassPolicy
*
pp
)
{
memset
(
pp
,
0
,
sizeof
(
PassPolicy
)
);
pp
->
ad
=
slap_schema
.
si_ad_userPassword
;
/* Users can change their own password by default */
pp
->
pwdAllowUserChange
=
1
;
}
static
void
ppolicy_get
(
Operation
*
op
,
Entry
*
e
,
PassPolicy
*
pp
)
{
...
...
@@ -477,12 +489,7 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp )
const char *text;
#endif
memset
(
pp
,
0
,
sizeof
(
PassPolicy
)
);
pp
->
ad
=
slap_schema
.
si_ad_userPassword
;
/* Users can change their own password by default */
pp
->
pwdAllowUserChange
=
1
;
ppolicy_get_default
(
pp
);
if
((
a
=
attr_find
(
e
->
e_attrs
,
ad_pwdPolicySubentry
))
==
NULL
)
{
/*
...
...
@@ -580,6 +587,9 @@ defaultpol:
Debug
(
LDAP_DEBUG_TRACE
,
"ppolicy_get: using default policy
\n
"
,
0
,
0
,
0
);
ppolicy_get_default
(
pp
);
return
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment