Manual Pages for UNIX Darwin command on man ldap_scherr2str
MyWebUniversity

Manual Pages for UNIX Darwin command on man ldap_scherr2str

LDAPSCHEMA(3) LDAPSCHEMA(3)

NAME

ldapstr2syntax, ldapsyntax2str, ldapsyntax2name, ldapsyntaxfree, ldapstr2matchingrule, ldapmatchingrule2str, ldapmatchingrule2name, ldapmatchingrulefree, ldapstr2attributetype, ldapattributetype2str, ldapattributetype2name, ldapattributetypefree, ldapstr2objectclass, ldapobjectclass2str, ldapobjectclass2name, ldapobjectclassfree,

ldapscherr2str - Schema definition handling routines

LLIIBBRRAARRYY

OpenLDAP LDAP (libldap, -lldap)

SYNOPSIS

##iinncclluuddee <>

##iinncclluuddee <>

LLDDAAPPSSyynnttaaxx ** llddaappssttrr22ssyynnttaaxx((ss,, ccooddee,, eerrrrpp,, ffllaaggss)) const char * s; int * code; const char ** errp; const int flags; cchhaarr ** llddaappssyynnttaaxx22ssttrr((ssyynn)) const LDAPSyntax * syn; ccoonnsstt cchhaarr ** llddaappssyynnttaaxx22nnaammee((ssyynn)) LDAPSyntax * syn; llddaappssyynnttaaxxffrreeee((ssyynn)) LDAPSyntax * syn; LLDDAAPPMMaattcchhiinnggRRuullee ** llddaappssttrr22mmaattcchhiinnggrruullee((ss,, ccooddee,, eerrrrpp,, ffllaaggss)) const char * s; int * code; const char ** errp; const int flags; cchhaarr ** llddaappmmaattcchhiinnggrruullee22ssttrr((mmrr));; const LDAPMatchingRule * mr; ccoonnsstt cchhaarr ** llddaappmmaattcchhiinnggrruullee22nnaammee((mmrr)) LDAPMatchingRule * mr; llddaappmmaattcchhiinnggrruulleeffrreeee((mmrr)) LDAPMatchingRule * mr; LLDDAAPPAAttttrriibbuutteeTTyyppee ** llddaappssttrr22aattttrriibbuutteettyyppee((ss,, ccooddee,, eerrrrpp,, ffllaaggss)) const char * s; int * code; const char ** errp; const int flags; cchhaarr ** llddaappaattttrriibbuutteettyyppee22ssttrr((aatt)) const LDAPAttributeType * at; ccoonnsstt cchhaarr ** llddaappaattttrriibbuutteettyyppee22nnaammee((aatt)) LDAPAttributeType * at; llddaappaattttrriibbuutteettyyppeeffrreeee((aatt)) LDAPAttributeType * at; LLDDAAPPOObbjjeeccttCCllaassss ** llddaappssttrr22oobbjjeeccttccllaassss((ss,, ccooddee,, eerrrrpp,, ffllaaggss)) const char * s; int * code; const char ** errp; const int flags; cchhaarr ** llddaappoobbjjeeccttccllaassss22ssttrr((oocc)) const LDAPObjectClass * oc; ccoonnsstt cchhaarr ** llddaappoobbjjeeccttccllaassss22nnaammee((oocc)) LDAPObjectClass * oc; llddaappoobbjjeeccttccllaassssffrreeee((oocc)) LDAPObjectClass * oc; cchhaarr ** llddaappsscchheerrrr22ssttrr((ccooddee)) int code;

DESCRIPTION

These routines are used to parse schema definitions in the syntax

defined in RFC 2252 into structs and handle these structs. These rou-

tines handle four kinds of definitions: syntaxes, matching rules,

attribute types and objectclasses. For each definition kind, four rou-

tines are provided. llddaappssttrr22xxxxxx(()) takes a definition in RFC 2252 format in argument s as a

NUL-terminated string and returns, if possible, a pointer to a newly

allocated struct of the appropriate kind. The caller is responsible for freeing the struct by calling llddaappxxxxxxffrreeee(()) when not needed any longer. The routine returns NULL if some problem happened. In this case, the integer pointed at by argument code will receive an error code (see below the description of llddaappsscchheerrrr22ssttrr(()) for an explanation

of the values) and a pointer to a NUL-terminated string will be placed

where requested by argument errp , indicating where in argument s the error happened, so it must not be freed by the caller. Argument flags

is a bit mask of parsing options controlling the relaxation of the syn-

tax recognized. The following values are defined: LLDDAAPPSSCCHHEEMMAAAALLLLOOWWNNOONNEE strict parsing according to RFC 2252. LLDDAAPPSSCCHHEEMMAAAALLLLOOWWNNOOOOIIDD permit definitions that do not contain an initial OID. LLDDAAPPSSCCHHEEMMAAAALLLLOOWWQQUUOOTTEEDD permit quotes around some items that should not have them. LLDDAAPPSSCCHHEEMMAAAALLLLOOWWDDEESSCCRR

permit a ddeessccrr instead of a numeric OID in places where the syn-

tax expect the latter. LLDDAAPPSSCCHHEEMMAAAALLLLOOWWDDEESSCCRRPPRREEFFIIXX permit that the initial numeric OID contains a prefix in ddeessccrr format. LLDDAAPPSSCCHHEEMMAAAALLLLOOWWAALLLL be very liberal, include all options. The structures returned are as follows: typedef struct ldapschemaextensionitem { char *lseiname; /* Extension name */ char **lseivalues; /* Extension values */ } LDAPSchemaExtensionItem; typedef struct ldapsyntax { char *synoid; /* OID */ char **synnames; /* Names */ char *syndesc; /* Description */ LDAPSchemaExtensionItem **synextensions; /* Extension */ } LDAPSyntax; typedef struct ldapmatchingrule { char *mroid; /* OID */ char **mrnames; /* Names */ char *mrdesc; /* Description */ int mrobsolete; /* Is obsolete? */ char *mrsyntaxoid; /* Syntax of asserted values */ LDAPSchemaExtensionItem **mrextensions; /* Extensions */ } LDAPMatchingRule; typedef struct ldapattributetype { char *atoid; /* OID */ char **atnames; /* Names */ char *atdesc; /* Description */ int atobsolete; /* Is obsolete? */ char *atsupoid; /* OID of superior type */ char *atequalityoid; /* OID of equality matching rule */ char *atorderingoid; /* OID of ordering matching rule */ char *atsubstroid; /* OID of substrings matching rule */ char *atsyntaxoid; /* OID of syntax of values */ int atsyntaxlen; /* Suggested minimum maximum length */

int atsinglevalue; /* Is single-valued? */

int atcollective; /* Is collective? */ int atnousermod; /* Are changes forbidden through LDAP? */ int atusage; /* Usage, see below */ LDAPSchemaExtensionItem **atextensions; /* Extensions */ } LDAPAttributeType; typedef struct ldapobjectclass { char *ocoid; /* OID */ char **ocnames; /* Names */ char *ocdesc; /* Description */ int ocobsolete; /* Is obsolete? */ char **ocsupoids; /* OIDs of superior classes */ int ockind; /* Kind, see below */ char **ocatoidsmust; /* OIDs of required attribute types */ char **ocatoidsmay; /* OIDs of optional attribute types */ LDAPSchemaExtensionItem **ocextensions; /* Extensions */ } LDAPObjectClass; Some integer fields (those described with a question mark) have a truth value, for these fields the possible values are: LLDDAAPPSSCCHHEEMMAANNOO The answer to the question is no. LLDDAAPPSSCCHHEEMMAAYYEESS The answer to the question is yes. For attribute types, the following usages are possible: LLDDAAPPSSCCHHEEMMAAUUSSEERRAAPPPPLLIICCAATTIIOONNSS

the attribute type is non-operational.

LLDDAAPPSSCCHHEEMMAADDIIRREECCTTOORRYYOOPPEERRAATTIIOONN

the attribute type is operational and is pertinent to the direc-

tory itself, i.e. it has the same value on all servers that mas-

ter the entry containing this attribute type. LLDDAAPPSSCCHHEEMMAADDIISSTTRRIIBBUUTTEEDDOOPPEERRAATTIIOONN

the attribute type is operational and is pertinent to replica-

tion, shadowing or other distributed directory aspect. TBC. LLDDAAPPSSCCHHEEMMAADDSSAAOOPPEERRAATTIIOONN

the attribute type is operational and is pertinent to the direc-

tory server itself, i.e. it may have different values for the same entry when retrieved from different servers that master the entry. Object classes can be of three kinds: LLDDAAPPSSCCHHEEMMAAAABBSSTTRRAACCTT the object class is abstract, i.e. there cannot be entries of this class alone. LLDDAAPPSSCCHHEEMMAASSTTRRUUCCTTUURRAALL the object class is structural, i.e. it describes the main role of the entry. On some servers, once the entry is created the set of structural object classes assigned cannot be changed: none of those present can be removed and none other can be added. LLDDAAPPSSCCHHEEMMAAAAUUXXIILLIIAARRYY the object class is auxiliary, i.e. it is intended to go with other, structural, object classes. These can be added or removed at any time if attribute types are added or removed at the same time as needed by the set of object classes resulting from the operation. Routines llddaappxxxxxx22nnaammee(()) return a canonical name for the definition. Routines llddaappxxxxxx22ssttrr(()) return a string representation in the format described by RFC 2252 of the struct passed in the argument. The string is a newly allocated string that must be freed by the caller. These routines may return NULL if no memory can be allocated for the string.

llddaappsscchheerrrr22ssttrr(()) returns a NUL-terminated string with a text descrip-

tion of the error found. This is a pointer to a static area, so it must not be freed by the caller. The argument code comes from one of the parsing routines and can adopt the following values: LLDDAAPPSSCCHHEERRRROOUUTTOOFFMMEEMM Out of memory. LLDDAAPPSSCCHHEERRRRUUNNEEXXPPTTOOKKEENN Unexpected token. LLDDAAPPSSCCHHEERRRRNNOOLLEEFFTTPPAARREENN Missing opening parenthesis. LLDDAAPPSSCCHHEERRRRNNOORRIIGGHHTTPPAARREENN Missing closing parenthesis. LLDDAAPPSSCCHHEERRRRNNOODDIIGGIITT Expecting digit.

LDAPSCHERRBADNAME

Expecting a name. LLDDAAPPSSCCHHEERRRRBBAADDDDEESSCC Bad description. LLDDAAPPSSCCHHEERRRRBBAADDSSUUPP Bad superiors. LLDDAAPPSSCCHHEERRRRDDUUPPOOPPTT Duplicate option. LLDDAAPPSSCCHHEERRRREEMMPPTTYY Unexpected end of data.

SEE ALSO

llddaapp(3) AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS OOppeennLLDDAAPP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OOppeennLLDDAAPP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.2.19 2004/11/26 LDAPSCHEMA(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™