summaryrefslogtreecommitdiffstats
path: root/contrib/slapd-modules/lastmod/slapo-lastmod.5
blob: 7b161dc373d8a739752964a958d292a7684d2895 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
.\" Copyright 2004-2024 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
.TH SLAPO_LASTMOD 5 "RELEASEDATE" "OpenLDAP LDVERSION"
.SH NAME
slapo-lastmod \- Last Modification overlay
.SH SYNOPSIS
ETCDIR/slapd.conf
.SH DESCRIPTION
.LP
The 
.B lastmod
overlay creates a service entry rooted at the suffix of the database
it's stacked onto, which holds the DN, the modification type,
the modifiersName and the modifyTimestamp of the last write operation
performed on that database.
The lastmod overlay cannot be used when the "lastmod" feature
is disabled, i.e. "lastmod off" is used.
.P
All operations targeted at the DN of the lastmod entry are rejected,
except reads, i.e. searches with 
.B base
scope.
Regular operations are ignored, unless they result in writing; then,
in case of success, the lastmod entry is updated accordingly,
if possible.

.SH CONFIGURATION
These 
.B slapd.conf
configuration options apply to the lastmod overlay. They must appear
after the
.B overlay
directive.
.TP
.B lastmod-rdnvalue <RDN value>
Specify the value of the RDN used for the service entry.  By default
.I Lastmod
is used.
.TP
.B lastmod-enabled {yes|no}
Specify whether the overlay must be enabled or not at startup.
By default, the overlay is enabled; however, by changing the boolean
value of the attribute
.IR lastmodEnabled ,
one can affect the status of the overlay.
This is useful, for instance, to inhibit the overlay from keeping track
of large bulk loads or deletions.

.SH OBJECT CLASS
The 
.B lastmod
overlay depends on the
.B lastmod
objectClass.  The definition of that class is as follows:
.LP
.RS 4
( 1.3.6.1.4.1.4203.666.3.13 "
    NAME 'lastmod'
    DESC 'OpenLDAP per-database last modification monitoring'
    STRUCTURAL
    SUP top
    MUST ( cn $ lastmodDN $ lastmodType )
    MAY ( description $ seeAlso ) )
.RE

.SH ATTRIBUTES
.P
Each one of the sections below details the meaning and use of a particular
attribute of this
.B lastmod
objectClass.
Most of the attributes that are specific to the lastmod objectClass are
operational, since they can logically be altered only by the DSA.
The most notable exception is the
.I lastmodEnabled
attributeType, which can be altered via protocol to change the status
of the overlay.
.P

.B lastmodEnabled
.P
This attribute contains a boolean flag that determines the status
of the overlay.  It can be altered via protocol by issuing a modify
operation that replaces the value of the attribute.
.LP
.RS 4
(  1.3.6.1.4.1.4203.666.1.30
   NAME 'lastmodEnabled'
   DESC 'Lastmod overlay state'
   SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
   EQUALITY booleanMatch
   SINGLE-VALUE )
.RE

.SH OPERATIONAL ATTRIBUTES
.P
Each one of the sections below details the meaning and use of a particular
attribute of this
.B lastmod
objectClass.
Most of the attributes that are specific to the lastmod objectClass are
operational, since they can logically be altered only by the DSA.
.P

.B lastmodDN
.P
This attribute contains the distinguished name of the entry
that was last modified within the naming context of a database.
.LP
.RS 4
(  1.3.6.1.4.1.4203.666.1.28
   NAME 'lastmodDN'
   DESC 'DN of last modification'
   EQUALITY distinguishedNameMatch
   SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
   NO-USER-MODIFICATION
   USAGE directoryOperation )
.RE

.B lastmodType
.P
This attribute contains the type of the modification that occurred
to the last modified entry.  Legal values are
.BR add ,
.BR delete ,
.BR exop ,
.BR modify ,
.B modrdn
and
.BR unknown .
The latter should only be used as a fall-thru in case of unhandled
request types that are considered equivalent to a write operation.
.LP
.RS 4
(  1.3.6.1.4.1.4203.666.1.29
   NAME 'lastmodType'
   DESC 'Type of last modification'
   SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
   EQUALITY caseIgnoreMatch
   SINGLE-VALUE
   NO-USER-MODIFICATION
   USAGE directoryOperation )
.RE


.SH EXAMPLES
.LP
.RS
.nf
database    mdb
suffix      dc=example,dc=com
\...
overlay     lastmod
lastmod-rdnvalue "Last Modification"
.fi
.RE

.SH SEE ALSO
.BR ldap (3),
.BR slapd.conf (5),
.LP
"OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
.LP

.SH BUGS
It is unclear whether this overlay can safely interoperate 
with other overlays.
If the underlying backend does not implement entry_get/entry_release
handlers, modrdn update can become tricky.
The code needs some cleanup and more consistent error handling.
So far, the OIDs for the schema haven't been assigned yet.

.SH ACKNOWLEDGEMENTS
.P
This module was written in 2004 by Pierangelo Masarati in fulfillment
of requirements from SysNet s.n.c.; this man page has been copied
from 
.BR slapo-ppolicy (5),
and most of the overlays ever written are copied from Howard Chu's
first overlays.
.P
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.