404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.128.206.181: ~ $
.lf 1 stdin
.TH LDAP_SCHEMA 3 "2018/03/22" "OpenLDAP 2.4.46"
.\" $OpenLDAP$
.\" Copyright 2000-2018 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
.SH NAME
ldap_str2syntax, ldap_syntax2str, ldap_syntax2name, ldap_syntax_free, ldap_str2matchingrule, ldap_matchingrule2str, ldap_matchingrule2name, ldap_matchingrule_free, ldap_str2attributetype, ldap_attributetype2str, ldap_attributetype2name, ldap_attributetype_free, ldap_str2objectclass, ldap_objectclass2str, ldap_objectclass2name, ldap_objectclass_free, ldap_scherr2str \- Schema definition handling routines
.SH LIBRARY
OpenLDAP LDAP (libldap, \-lldap)
.SH SYNOPSIS
.nf
.ft B
#include <ldap.h>
#include <ldap_schema.h>
.LP
.ft B
LDAPSyntax * ldap_str2syntax(s, code, errp, flags)
.ft
const char * s;
int * code;
const char ** errp;
const int flags;
.LP
.ft B
char * ldap_syntax2str(syn)
.ft
const LDAPSyntax * syn;
.LP
.ft B
const char * ldap_syntax2name(syn)
.ft
LDAPSyntax * syn;
.LP
.ft B
ldap_syntax_free(syn)
.ft
LDAPSyntax * syn;
.LP
.ft B
LDAPMatchingRule * ldap_str2matchingrule(s, code, errp, flags)
.ft
const char * s;
int * code;
const char ** errp;
const int flags;
.LP
.ft B
char * ldap_matchingrule2str(mr);
.ft
const LDAPMatchingRule * mr;
.LP
.ft B
const char * ldap_matchingrule2name(mr)
.ft
LDAPMatchingRule * mr;
.LP
.ft B
ldap_matchingrule_free(mr)
.ft
LDAPMatchingRule * mr;
.LP
.ft B
LDAPAttributeType * ldap_str2attributetype(s, code, errp, flags)
.ft
const char * s;
int * code;
const char ** errp;
const int flags;
.LP
.ft B
char * ldap_attributetype2str(at)
.ft
const LDAPAttributeType * at;
.LP
.ft B
const char * ldap_attributetype2name(at)
.ft
LDAPAttributeType * at;
.LP
.ft B
ldap_attributetype_free(at)
.ft
LDAPAttributeType * at;
.LP
.ft B
LDAPObjectClass * ldap_str2objectclass(s, code, errp, flags)
.ft
const char * s;
int * code;
const char ** errp;
const int flags;
.LP
.ft B
char * ldap_objectclass2str(oc)
.ft
const LDAPObjectClass * oc;
.LP
.ft B
const char * ldap_objectclass2name(oc)
.ft
LDAPObjectClass * oc;
.LP
.ft B
ldap_objectclass_free(oc)
.ft
LDAPObjectClass * oc;
.LP
.ft B
char * ldap_scherr2str(code)
.ft
int code;
.SH DESCRIPTION
These routines are used to parse schema definitions in the syntax
defined in RFC 4512 into structs and handle these structs.  These
routines handle four kinds of definitions: syntaxes, matching rules,
attribute types and object classes.  For each definition kind, four
routines are provided.
.LP
.B ldap_str2xxx()
takes a definition in RFC 4512 format in argument
.IR 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
.B ldap_xxx_free()
when not needed any longer.  The routine returns NULL if some problem
happened.  In this case, the integer pointed at by argument
.IR code
will receive an error code (see below the description of
.B ldap_scherr2str()
for an explanation of the values) and a pointer to a NUL-terminated
string will be placed where requested by argument
.IR errp
, indicating where in argument
.IR s
the error happened, so it must not be freed by the caller.  Argument
.IR flags
is a bit mask of parsing options controlling the relaxation of the
syntax recognized.  The following values are defined:
.TP
.B LDAP_SCHEMA_ALLOW_NONE
strict parsing according to RFC 4512.
.TP
.B LDAP_SCHEMA_ALLOW_NO_OID
permit definitions that do not contain an initial OID.
.TP
.B LDAP_SCHEMA_ALLOW_QUOTED
permit quotes around some items that should not have them.
.TP
.B LDAP_SCHEMA_ALLOW_DESCR
permit a
.B descr
instead of a numeric OID in places where the syntax expect the latter.
.TP
.B LDAP_SCHEMA_ALLOW_DESCR_PREFIX
permit that the initial numeric OID contains a prefix in
.B descr
format.
.TP
.B LDAP_SCHEMA_ALLOW_ALL
be very liberal, include all options.
.LP
The structures returned are as follows:
.sp
.RS
.nf
.ne 7
.ta 8n 16n 32n
typedef struct ldap_schema_extension_item {
	char *lsei_name;	/* Extension name */
	char **lsei_values;	/* Extension values */
} LDAPSchemaExtensionItem;

typedef struct ldap_syntax {
	char *syn_oid;		/* OID */
	char **syn_names;	/* Names */
	char *syn_desc;		/* Description */
	LDAPSchemaExtensionItem **syn_extensions; /* Extension */
} LDAPSyntax;

typedef struct ldap_matchingrule {
	char *mr_oid;		/* OID */
	char **mr_names;	/* Names */
	char *mr_desc;		/* Description */
	int  mr_obsolete;	/* Is obsolete? */
	char *mr_syntax_oid;	/* Syntax of asserted values */
	LDAPSchemaExtensionItem **mr_extensions; /* Extensions */
} LDAPMatchingRule;

typedef struct ldap_attributetype {
	char *at_oid;		/* OID */
	char **at_names;	/* Names */
	char *at_desc;		/* Description */
	int  at_obsolete;	/* Is obsolete? */
	char *at_sup_oid;	/* OID of superior type */
	char *at_equality_oid;	/* OID of equality matching rule */
	char *at_ordering_oid;	/* OID of ordering matching rule */
	char *at_substr_oid;	/* OID of substrings matching rule */
	char *at_syntax_oid;	/* OID of syntax of values */
	int  at_syntax_len;	/* Suggested minimum maximum length */
	int  at_single_value;	/* Is single-valued?  */
	int  at_collective;	/* Is collective? */
	int  at_no_user_mod;	/* Are changes forbidden through LDAP? */
	int  at_usage;		/* Usage, see below */
	LDAPSchemaExtensionItem **at_extensions; /* Extensions */
} LDAPAttributeType;

typedef struct ldap_objectclass {
	char *oc_oid;		/* OID */
	char **oc_names;	/* Names */
	char *oc_desc;		/* Description */
	int  oc_obsolete;	/* Is obsolete? */
	char **oc_sup_oids;	/* OIDs of superior classes */
	int  oc_kind;		/* Kind, see below */
	char **oc_at_oids_must;	/* OIDs of required attribute types */
	char **oc_at_oids_may;	/* OIDs of optional attribute types */
	LDAPSchemaExtensionItem **oc_extensions; /* Extensions */
} LDAPObjectClass;
.ta
.fi
.RE
.PP
Some integer fields (those described with a question mark) have a
truth value, for these fields the possible values are:
.TP
.B LDAP_SCHEMA_NO
The answer to the question is no.
.TP
.B LDAP_SCHEMA_YES
The answer to the question is yes.
.LP
For attribute types, the following usages are possible:
.TP
.B LDAP_SCHEMA_USER_APPLICATIONS
the attribute type is non-operational.
.TP
.B LDAP_SCHEMA_DIRECTORY_OPERATION
the attribute type is operational and is pertinent to the directory
itself, i.e. it has the same value on all servers that master the
entry containing this attribute type.
.TP
.B LDAP_SCHEMA_DISTRIBUTED_OPERATION
the attribute type is operational and is pertinent to replication,
shadowing or other distributed directory aspect.  TBC.
.TP
.B LDAP_SCHEMA_DSA_OPERATION
the attribute type is operational and is pertinent to the directory
server itself, i.e. it may have different values for the same entry
when retrieved from different servers that master the entry.
.LP
Object classes can be of three kinds:
.TP
.B LDAP_SCHEMA_ABSTRACT
the object class is abstract, i.e. there cannot be entries of this
class alone.
.TP
.B LDAP_SCHEMA_STRUCTURAL
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.
.TP
.B LDAP_SCHEMA_AUXILIARY
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.
.LP
Routines
.B ldap_xxx2name()
return a canonical name for the definition.
.LP
Routines
.B ldap_xxx2str()
return a string representation in the format described by RFC 4512 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.
.LP
.B ldap_scherr2str()
returns a NUL-terminated string with a text description of the error
found.  This is a pointer to a static area, so it must not be freed by
the caller.  The argument
.IR code
comes from one of the parsing routines and can adopt the following
values:
.TP
.B LDAP_SCHERR_OUTOFMEM
Out of memory.
.TP
.B LDAP_SCHERR_UNEXPTOKEN
Unexpected token.
.TP
.B LDAP_SCHERR_NOLEFTPAREN
Missing opening parenthesis.
.TP
.B LDAP_SCHERR_NORIGHTPAREN
Missing closing parenthesis.
.TP
.B LDAP_SCHERR_NODIGIT
Expecting digit.
.TP
.B LDAP_SCHERR_BADNAME
Expecting a name.
.TP
.B LDAP_SCHERR_BADDESC
Bad description.
.TP
.B LDAP_SCHERR_BADSUP
Bad superiors.
.TP
.B LDAP_SCHERR_DUPOPT
Duplicate option.
.TP
.B LDAP_SCHERR_EMPTY
Unexpected end of data.

.SH SEE ALSO
.BR ldap (3)
.SH ACKNOWLEDGEMENTS
.lf 1 ./../Project
.\" Shared Project Acknowledgement Text
.B "OpenLDAP Software"
is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>.
.B "OpenLDAP Software"
is derived from the University of Michigan LDAP 3.3 Release.  
.lf 321 stdin

Filemanager

Name Type Size Permission Actions
ber_alloc_t.3 File 9.07 KB 0644
ber_bvarray_add.3 File 6.38 KB 0644
ber_bvarray_free.3 File 6.38 KB 0644
ber_bvdup.3 File 6.38 KB 0644
ber_bvecadd.3 File 6.38 KB 0644
ber_bvecfree.3 File 6.38 KB 0644
ber_bvfree.3 File 6.38 KB 0644
ber_bvstr.3 File 6.38 KB 0644
ber_bvstrdup.3 File 6.38 KB 0644
ber_dupbv.3 File 6.38 KB 0644
ber_first_element.3 File 12.37 KB 0644
ber_flush.3 File 9.07 KB 0644
ber_free.3 File 6.38 KB 0644
ber_get_bitstring.3 File 12.37 KB 0644
ber_get_boolean.3 File 12.37 KB 0644
ber_get_enum.3 File 12.37 KB 0644
ber_get_int.3 File 12.37 KB 0644
ber_get_next.3 File 12.37 KB 0644
ber_get_null.3 File 12.37 KB 0644
ber_get_stringa.3 File 12.37 KB 0644
ber_get_stringb.3 File 12.37 KB 0644
ber_next_element.3 File 12.37 KB 0644
ber_peek_tag.3 File 12.37 KB 0644
ber_printf.3 File 9.07 KB 0644
ber_put_enum.3 File 9.07 KB 0644
ber_put_int.3 File 9.07 KB 0644
ber_put_null.3 File 9.07 KB 0644
ber_put_ostring.3 File 9.07 KB 0644
ber_put_seq.3 File 9.07 KB 0644
ber_put_set.3 File 9.07 KB 0644
ber_put_string.3 File 9.07 KB 0644
ber_scanf.3 File 12.37 KB 0644
ber_skip_tag.3 File 12.37 KB 0644
ber_start_set.3 File 9.07 KB 0644
ber_str2bv.3 File 6.38 KB 0644
lber-decode.3 File 12.37 KB 0644
lber-encode.3 File 9.07 KB 0644
lber-memory.3 File 1.53 KB 0644
lber-sockbuf.3 File 5.72 KB 0644
lber-types.3 File 6.38 KB 0644
ld_errno.3 File 6.54 KB 0644
ldap.3 File 8.83 KB 0644
ldap_abandon.3 File 2.29 KB 0644
ldap_abandon_ext.3 File 2.29 KB 0644
ldap_add.3 File 2.65 KB 0644
ldap_add_ext.3 File 2.65 KB 0644
ldap_add_ext_s.3 File 2.65 KB 0644
ldap_add_s.3 File 2.65 KB 0644
ldap_attributetype2name.3 File 8.78 KB 0644
ldap_attributetype2str.3 File 8.78 KB 0644
ldap_attributetype_free.3 File 8.78 KB 0644
ldap_bind.3 File 11.75 KB 0644
ldap_bind_s.3 File 11.75 KB 0644
ldap_compare.3 File 2.72 KB 0644
ldap_compare_ext.3 File 2.72 KB 0644
ldap_compare_ext_s.3 File 2.72 KB 0644
ldap_compare_s.3 File 2.72 KB 0644
ldap_control_create.3 File 2.93 KB 0644
ldap_control_dup.3 File 2.93 KB 0644
ldap_control_find.3 File 2.93 KB 0644
ldap_control_free.3 File 2.93 KB 0644
ldap_controls.3 File 2.93 KB 0644
ldap_controls_dup.3 File 2.93 KB 0644
ldap_controls_free.3 File 2.93 KB 0644
ldap_count_entries.3 File 2.35 KB 0644
ldap_count_messages.3 File 2.58 KB 0644
ldap_count_references.3 File 2.29 KB 0644
ldap_count_values.3 File 2.73 KB 0644
ldap_count_values_len.3 File 2.73 KB 0644
ldap_dcedn2dn.3 File 6.61 KB 0644
ldap_delete.3 File 2.49 KB 0644
ldap_delete_ext.3 File 2.49 KB 0644
ldap_delete_ext_s.3 File 2.49 KB 0644
ldap_delete_s.3 File 2.49 KB 0644
ldap_destroy.3 File 3.54 KB 0644
ldap_dn2ad_canonical.3 File 6.61 KB 0644
ldap_dn2dcedn.3 File 6.61 KB 0644
ldap_dn2str.3 File 6.61 KB 0644
ldap_dn2ufn.3 File 6.61 KB 0644
ldap_dnfree.3 File 6.61 KB 0644
ldap_dup.3 File 3.54 KB 0644
ldap_err2string.3 File 6.54 KB 0644
ldap_errlist.3 File 6.54 KB 0644
ldap_error.3 File 6.54 KB 0644
ldap_explode_dn.3 File 6.61 KB 0644
ldap_explode_rdn.3 File 6.61 KB 0644
ldap_extended_operation.3 File 2.47 KB 0644
ldap_extended_operation_s.3 File 2.47 KB 0644
ldap_first_attribute.3 File 2.3 KB 0644
ldap_first_entry.3 File 2.35 KB 0644
ldap_first_message.3 File 2.58 KB 0644
ldap_first_reference.3 File 2.29 KB 0644
ldap_free_urldesc.3 File 3.02 KB 0644
ldap_get_dn.3 File 6.61 KB 0644
ldap_get_option.3 File 19.06 KB 0644
ldap_get_values.3 File 2.73 KB 0644
ldap_get_values_len.3 File 2.73 KB 0644
ldap_init.3 File 5.96 KB 0644
ldap_init_fd.3 File 5.96 KB 0644
ldap_initialize.3 File 5.96 KB 0644
ldap_install_tls.3 File 1.66 KB 0644
ldap_is_ldap_url.3 File 3.02 KB 0644
ldap_matchingrule2name.3 File 8.78 KB 0644
ldap_matchingrule2str.3 File 8.78 KB 0644
ldap_matchingrule_free.3 File 8.78 KB 0644
ldap_memalloc.3 File 1.55 KB 0644
ldap_memcalloc.3 File 1.55 KB 0644
ldap_memfree.3 File 1.55 KB 0644
ldap_memory.3 File 1.55 KB 0644
ldap_memrealloc.3 File 1.55 KB 0644
ldap_memvfree.3 File 1.55 KB 0644
ldap_modify.3 File 4.45 KB 0644
ldap_modify_ext.3 File 4.45 KB 0644
ldap_modify_ext_s.3 File 4.45 KB 0644
ldap_modify_s.3 File 4.45 KB 0644
ldap_modrdn.3 File 2.27 KB 0644
ldap_modrdn2.3 File 2.27 KB 0644
ldap_modrdn2_s.3 File 2.27 KB 0644
ldap_modrdn_s.3 File 2.27 KB 0644
ldap_mods_free.3 File 4.45 KB 0644
ldap_msgfree.3 File 4.41 KB 0644
ldap_msgid.3 File 4.41 KB 0644
ldap_msgtype.3 File 4.41 KB 0644
ldap_next_attribute.3 File 2.3 KB 0644
ldap_next_entry.3 File 2.35 KB 0644
ldap_next_message.3 File 2.58 KB 0644
ldap_next_reference.3 File 2.29 KB 0644
ldap_objectclass2name.3 File 8.78 KB 0644
ldap_objectclass2str.3 File 8.78 KB 0644
ldap_objectclass_free.3 File 8.78 KB 0644
ldap_open.3 File 5.96 KB 0644
ldap_parse_extended_result.3 File 3.94 KB 0644
ldap_parse_reference.3 File 2.3 KB 0644
ldap_parse_result.3 File 3.94 KB 0644
ldap_parse_sasl_bind_result.3 File 3.94 KB 0644
ldap_parse_sort_control.3 File 1.64 KB 0644
ldap_parse_vlv_control.3 File 2.29 KB 0644
ldap_perror.3 File 6.54 KB 0644
ldap_rename.3 File 2.63 KB 0644
ldap_rename_s.3 File 2.63 KB 0644
ldap_result.3 File 4.41 KB 0644
ldap_result2error.3 File 6.54 KB 0644
ldap_sasl_bind.3 File 11.75 KB 0644
ldap_sasl_bind_s.3 File 11.75 KB 0644
ldap_schema.3 File 8.78 KB 0644
ldap_scherr2str.3 File 8.78 KB 0644
ldap_search.3 File 5.11 KB 0644
ldap_search_ext.3 File 5.11 KB 0644
ldap_search_ext_s.3 File 5.11 KB 0644
ldap_search_s.3 File 5.11 KB 0644
ldap_search_st.3 File 5.11 KB 0644
ldap_set_option.3 File 19.06 KB 0644
ldap_set_rebind_proc.3 File 11.75 KB 0644
ldap_set_urllist_proc.3 File 5.96 KB 0644
ldap_simple_bind.3 File 11.75 KB 0644
ldap_simple_bind_s.3 File 11.75 KB 0644
ldap_sort.3 File 1.23 KB 0644
ldap_sort_entries.3 File 1.23 KB 0644
ldap_sort_strcasecmp.3 File 1.23 KB 0644
ldap_sort_values.3 File 1.23 KB 0644
ldap_start_tls.3 File 1.66 KB 0644
ldap_start_tls_s.3 File 1.66 KB 0644
ldap_str2attributetype.3 File 8.78 KB 0644
ldap_str2dn.3 File 6.61 KB 0644
ldap_str2matchingrule.3 File 8.78 KB 0644
ldap_str2objectclass.3 File 8.78 KB 0644
ldap_str2syntax.3 File 8.78 KB 0644
ldap_strdup.3 File 1.55 KB 0644
ldap_sync.3 File 9.51 KB 0644
ldap_syntax2name.3 File 8.78 KB 0644
ldap_syntax2str.3 File 8.78 KB 0644
ldap_syntax_free.3 File 8.78 KB 0644
ldap_tls.3 File 1.66 KB 0644
ldap_tls_inplace.3 File 1.66 KB 0644
ldap_unbind.3 File 11.75 KB 0644
ldap_unbind_ext.3 File 11.75 KB 0644
ldap_unbind_ext_s.3 File 11.75 KB 0644
ldap_unbind_s.3 File 11.75 KB 0644
ldap_url.3 File 3.02 KB 0644
ldap_url_parse.3 File 3.02 KB 0644
ldap_value_free.3 File 2.73 KB 0644
ldap_value_free_len.3 File 2.73 KB 0644