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
Nadezhda Ivanova
OpenLDAP
Commits
50b1c4e1
Commit
50b1c4e1
authored
Dec 02, 2010
by
Hallvard Furuseth
Browse files
ITS#6620: Don't delete absent pwdChangedTime.
Based on patch by Martin Evans.
parent
4ed4c3a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/overlays/ppolicy.c
View file @
50b1c4e1
...
...
@@ -1973,23 +1973,26 @@ do_modify:
timestamp
.
bv_len
=
sizeof
(
timebuf
);
slap_timestamp
(
&
now
,
&
timestamp
);
mods
=
(
Modifications
*
)
ch_calloc
(
sizeof
(
Modifications
),
1
);
mods
->
sml_desc
=
ad_pwdChangedTime
;
mods
=
NULL
;
if
(
pwmop
!=
LDAP_MOD_DELETE
)
{
mods
=
(
Modifications
*
)
ch_calloc
(
sizeof
(
Modifications
),
1
);
mods
->
sml_op
=
LDAP_MOD_REPLACE
;
mods
->
sml_numvals
=
1
;
mods
->
sml_values
=
(
BerVarray
)
ch_malloc
(
2
*
sizeof
(
struct
berval
)
);
ber_dupbv
(
&
mods
->
sml_values
[
0
],
&
timestamp
);
BER_BVZERO
(
&
mods
->
sml_values
[
1
]
);
assert
(
!
BER_BVISNULL
(
&
mods
->
sml_values
[
0
]
)
);
}
else
{
}
else
if
(
attr_find
(
e
->
e_attrs
,
ad_pwdChangedTime
))
{
mods
=
(
Modifications
*
)
ch_calloc
(
sizeof
(
Modifications
),
1
);
mods
->
sml_op
=
LDAP_MOD_DELETE
;
}
mods
->
sml_flags
=
SLAP_MOD_INTERNAL
;
mods
->
sml_next
=
NULL
;
modtail
->
sml_next
=
mods
;
modtail
=
mods
;
if
(
mods
)
{
mods
->
sml_desc
=
ad_pwdChangedTime
;
mods
->
sml_flags
=
SLAP_MOD_INTERNAL
;
mods
->
sml_next
=
NULL
;
modtail
->
sml_next
=
mods
;
modtail
=
mods
;
}
if
(
attr_find
(
e
->
e_attrs
,
ad_pwdGraceUseTime
))
{
mods
=
(
Modifications
*
)
ch_calloc
(
sizeof
(
Modifications
),
1
);
...
...
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