📄 slapo-retcode.5
字号:
.TH SLAPO-RETCODE 5 "RELEASEDATE" "OpenLDAP LDVERSION".\" Copyright 1998-2007 The OpenLDAP Foundation, All Rights Reserved..\" Copying restrictions apply. See the COPYRIGHT file..\" Copyright 2001, Pierangelo Masarati, All rights reserved. <ando@sys-net.it>.\" $OpenLDAP: pkg/ldap/doc/man/man5/slapo-retcode.5,v 1.2.2.8 2007/01/02 21:43:45 kurt Exp $.SH NAMEslapo-retcode \- return code overlay.SH SYNOPSISETCDIR/slapd.conf.SH DESCRIPTIONThe.B retcodeoverlay to.BR slapd (8)is useful to test the behavior of clients when server-generated erroneousand/or unusual responses occur, e.g. error codes, referrals, excessive response times and so on.The error responses are generated according to different strategies..LPIn the first case, all operations targeted at a specific configurablesubtree cause the object related to the request DN to be looked upand checked for return code data: a response code, plus an optionaltextual message, an optional configurable delay, an optional matched DNfield, and, when the response code is "referral", a (list of) referral(s)..LPWell-known response codes from standard track documents are providedin \fBretcode.conf\fP, which can be included after instantiatingthe overlay..LPIn the second case, objects of classes inherited from the \fBerrAbsObject\fP, like \fBerrObject\fP or \fBerrAuxObject\fP,when returned as intermediate responses of a search request, are changedinto the response dictated by their content..LPA third mode causes objects to be looked up from the underlying database to discover if their class inherits from \fBerrABsObject\fP;in that case, their content is used to compute the corresponding response..LPThe behavior is disabled by using the \fBmanageDSAit\fP control (RFC 3296);in that case, the resulting object, either present in the directory or dynamically generated by the overlay, or contained in the request,is handled as usual..LP The config directives that are specific to the.B retcodeoverlay must be prefixed by.BR retcode\- ,to avoid conflicts with directives specific to the underlying databaseor to other stacked overlays. The following specific directives can be used to configure the retcode overlay: .TP.B retcode\-parent <DN>This directive defines the parent DN where dynamically generatedentries reside.If not defined, the suffix of the database is used..HP.hy 0.B retcode\-item <RDN> <errCode> [op=<oplist>] [text=<message>].B [ref=<referral>] [sleeptime=<sec>] [matched=<DN>].RSA dynamically generated entry, located below \fBretcode\-parent\fP.The \fB<errCode>\fP is the number of the response code;it can be in any format supported by strtol.The optional \fB<oplist>\fP is a list of operations that causeresponse code generation; if absent, all operations are affected.The \fBmatched\fP field is the matched DN that is returnedalong with the error.The \fBref\fP field is only allowed for the \fBreferral\fP response code..RE.TP.B retcode\-indirEnables exploitation of in-directory stored errAbsObject.May result in a lot of unnecessary overhead..TP.B retcode\-sleep [-]<n>Defines a sleep time in seconds that is spent before actually handlingany operation.If negative, a random time between 0 and the absolute value of the argumentis used..SH SCHEMAThe.B retcodeoverlay utilizes the "return code" schema described herein. This schema is specifically designed for use with thisoverlay and is not intended to be used otherwise.It is also noted that the schema describe here is.I a work in.IR progress ,and hence subject to change without notice.The schema is loaded automatically by the overlay.The schema includes a number of object classes and associatedattribute types as described below..LPThe error code:.RS 4( 1.3.6.1.4.1.4203.666.11.4.1.1 NAME ( 'errCode' ) DESC 'LDAP error code' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ).RE.LPThe operations that trigger the response code:.RS 4( 1.3.6.1.4.1.4203.666.11.4.1.2 NAME ( 'errOp' ) DESC 'Operations the errObject applies to' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ).RE.LPThe text message:.RS 4( 1.3.6.1.4.1.4203.666.11.4.1.3 NAME ( 'errText' ) DESC 'LDAP error textual description' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ).RE.LPThe sleep time before the response is actually returned to the client:.RS 4( 1.3.6.1.4.1.4203.666.11.4.1.4 NAME ( 'errSleepTime' ) DESC 'Time to wait before returning the error' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ).RE.LPThe matched DN returned to the client:.RS 4( 1.3.6.1.4.1.4203.666.11.4.1.5 NAME ( 'errMatchedDN' ) DESC 'Value to be returned as matched DN' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE ).RE.LPThe abstract class that triggers the overlay:.RS 4( 1.3.6.1.4.1.4203.666.11.4.3.0 NAME ( 'errAbsObject' ) SUP top ABSTRACT MUST ( errCode ) MAY ( cn $ description $ errOp $ errText $ errSleepTime $ errMatchedDN ) ).RE.LPThe standalone structural objectclass for specifically created data:.RS 4( 1.3.6.1.4.1.4203.666.11.4.3.1 NAME ( 'errObject' ) SUP errAbsObject STRUCTURAL ).RE.LPThe auxiliary objectclass to alter the behavior of existing objects:.RS 4( 1.3.6.1.4.1.4203.666.11.4.3.2 NAME ( 'errAuxObject' ) SUP errAbsObject AUXILIARY ).RE.SH EXAMPLE.LP.RS.nfoverlay retcoderetcode-parent "ou=RetCodes,dc=example,dc=com"include ./retcode.conf# Wait 10 seconds, then return success (0x00)retcode-item "cn=Success after 10 seconds" 0x00 sleeptime=10# Wait 10 seconds, then return timelimitExceeded (0x03)retcode-item "cn=Timelimit after 10 seconds" 0x03 sleeptime=10.fi.RE.LP.LP.SH FILES.TPETCDIR/slapd.confdefault slapd configuration file.SH SEE ALSO.BR slapd.conf (5),.BR slapd (8),.SH ACKNOWLEDGEMENTS.PThis module was written in 2005 by Pierangelo Masarati for SysNet s.n.c.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -