~ubuntu-branches/debian/experimental/389-ds-base/experimental

« back to all changes in this revision

Viewing changes to ldap/servers/slapd/slapi-plugin.h

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2014-07-08 15:50:11 UTC
  • mfrom: (0.2.2)
  • Revision ID: package-import@ubuntu.com-20140708155011-r66lvtioamqwaype
Tags: 1.3.2.19-1
* New upstream release.
* admin_scripts.diff: Updated to fix more bashisms.
* watch: Update the url.
* Install failedbinds.py and logregex.py scripts.
* init: Use status from init-functions.
* control: Update my email.

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
 */
199
199
#define SLAPI_ATTR_FLAG_NOEXPOSE        0x0800  /* the attr value is not exposed */
200
200
 
 
201
/**
 
202
 * Flag to indicate that the attribute value is LDAP_SCHEMA_DISTRIBUTED_OPERATION
 
203
 * If this is set, SLAPI_ATTR_FLAG_OPATTR must also be set
 
204
 *
 
205
 * \see slapi_value_set_flags()
 
206
 * \see slapi_values_set_flags()
 
207
*/
 
208
#define SLAPI_ATTR_FLAG_DISTRIBUTED_OPERATION   0x1000  /* USAGE distributedOperation */
 
209
 
 
210
/**
 
211
 * Flag to indicate that the attribute value is LDAP_SCHEMA_DSA_OPERATION
 
212
 * If this is set, SLAPI_ATTR_FLAG_OPATTR must also be set
 
213
 *
 
214
 * \see slapi_value_set_flags()
 
215
 * \see slapi_values_set_flags()
 
216
 */
 
217
#define SLAPI_ATTR_FLAG_DSA_OPERATION   0x2000  /* USAGE dSAOperation */
 
218
 
201
219
/* operation flags */
202
 
#define SLAPI_OP_FLAG_INTERNAL          0x00020 /* An operation generated by the core server or a plugin. */
203
 
#define SLAPI_OP_FLAG_NEVER_CHAIN       0x00800 /* Do not chain the operation */        
204
 
#define SLAPI_OP_FLAG_NO_ACCESS_CHECK   0x10000 /* Do not check for access control - bypass them */
205
 
#define SLAPI_OP_FLAG_BYPASS_REFERRALS  0x40000 /* Useful for performing internal operations on read-only replica */
 
220
#define SLAPI_OP_FLAG_INTERNAL          0x000020 /* An operation generated by the core server or a plugin. */
 
221
#define SLAPI_OP_FLAG_NEVER_CHAIN       0x000800 /* Do not chain the operation */
 
222
#define SLAPI_OP_FLAG_NO_ACCESS_CHECK   0x10000 /* Do not check for access control - bypass them */
 
223
#define SLAPI_OP_FLAG_BYPASS_REFERRALS  0x40000 /* Useful for performing internal operations on read-only replica */
206
224
 
207
225
#define SLAPI_OC_FLAG_REQUIRED  0x0001
208
226
#define SLAPI_OC_FLAG_ALLOWED   0x0002
1617
1635
 * \return \c 1 if the entry has any attribute values that violate the syntax rules
1618
1636
 *         imposed by the associated attribute type.  If the \c pb parameter was
1619
1637
 *         passed in, an error message describing the syntax violations will be
1620
 
 *         set in the #SLAPI_PB_RESULT_TEXT paramter.
 
1638
 *         set in the #SLAPI_PB_RESULT_TEXT parameter.
1621
1639
 * \warning The \c pb parameter can be \c NULL.  It is used to store an error
1622
 
 *         message with details of any syntax violations.  The \c pb paramter
 
1640
 *         message with details of any syntax violations.  The \c pb parameter
1623
1641
 *         is also used to check if the #SLAPI_IS_REPLICATED_OPERATION flag is
1624
1642
 *         set.   If that flag is present, no syntax checking is performed.
1625
1643
 */
1638
1656
 *         parameter was passed in, an error message will be set in the
1639
1657
 *         #SLAPI_PB_RESULT_TEXT parameter.
1640
1658
 * \warning The \c pb parameter can be \c NULL.  It is used to store an error
1641
 
 *         message with details of any syntax violations.  The \c pb paramter
 
1659
 *         message with details of any syntax violations.  The \c pb parameter
1642
1660
 *         is also used to check if the #SLAPI_IS_REPLICATED_OPERATION flag is
1643
1661
 *         set.   If that flag is present, no syntax checking is performed.
1644
1662
 */
1657
1675
 * \return \c 1 if the mods are adding any new attribute values that violate the
1658
1676
 *         syntax rules imposed by the associated attribute type.  If the \c pb
1659
1677
 *         parameter was passed in, an error message describing the syntax violations
1660
 
 *         will be set in the #SLAPI_PB_RESULT_TEXT paramter.
 
1678
 *         will be set in the #SLAPI_PB_RESULT_TEXT parameter.
1661
1679
 * \warning The \c pb parameter can be \c NULL.  It is used to store an error
1662
 
 *         message with details of any syntax violations.  The \c pb paramter
 
1680
 *         message with details of any syntax violations.  The \c pb parameter
1663
1681
 *         is also used to check if the #SLAPI_IS_REPLICATED_OPERATION flag is
1664
1682
 *         set.   If that flag is present, no syntax checking is performed.
1665
1683
 */
1913
1931
void slapi_entry_attr_set_long(Slapi_Entry* e, const char *type, long l);
1914
1932
 
1915
1933
/**
 
1934
 * Replaces the value or values of an attribute in an entry with a specified long long
 
1935
 * data type value.
 
1936
 *
 
1937
 * \param e Entry in which you want to set the value.
 
1938
 * \param type Attribute type in which you want to set the value.
 
1939
 * \param l Long Long integer value that you want to assign to the attribute.
 
1940
 */
 
1941
void slapi_entry_attr_set_longlong( Slapi_Entry* e, const char *type, long long l);
 
1942
 
 
1943
/**
1916
1944
 * Replaces the value or values of an attribute in an entry with a specified unsigned
1917
1945
 * long data type value.
1918
1946
 *
1951
1979
int slapi_entry_has_children(const Slapi_Entry *e);
1952
1980
 
1953
1981
/**
 
1982
 * This function determines if the specified entry has child entries
 
1983
 * including the tombstoned descendents.
 
1984
 *
 
1985
 * \param e Entry that you want to test for child entries.
 
1986
 * \param include_tombstone If non-zero, check tombstone_subordinates, too.
 
1987
 * \return \c 1 if the entry you supply has child entries.
 
1988
 * \return \c 0 if the entry you supply has child entries.
 
1989
 */
 
1990
int slapi_entry_has_children_ext(const Slapi_Entry *e, int include_tombstone);
 
1991
 
 
1992
/**
1954
1993
 * This function determines if an entry is the root DSE.
1955
1994
 *
1956
1995
 * The root DSE is a special entry that contains information about the Directory
2910
2949
int slapi_sdn_scope_test_ext( const Slapi_DN *dn, const Slapi_DN *base, int scope, int flags );
2911
2950
 
2912
2951
/**
2913
 
 * Retreives the RDN from a given DN.
 
2952
 * Retrieves the RDN from a given DN.
2914
2953
 *
2915
2954
 * This function takes the DN stored in the \c Slapi_DN structure pointed to
2916
2955
 * by \c sdn and fills in it's RDN within the \c Slapi_RDN structure pointed
3098
3137
 * \see slapi_rdn_set_rdn()
3099
3138
 */
3100
3139
void slapi_rdn_set_dn(Slapi_RDN *rdn,const char *dn);
 
3140
void slapi_rdn_set_dn_ext(Slapi_RDN *rdn,const char *dn, int skip_tombstone);
3101
3141
Slapi_RDN *slapi_rdn_new_all_dn(const char *dn);
3102
3142
int slapi_rdn_init_all_dn(Slapi_RDN *rdn, const char *dn);
3103
3143
int slapi_rdn_init_all_sdn(Slapi_RDN *rdn, const Slapi_DN *sdn);
 
3144
int slapi_rdn_init_all_sdn_ext(Slapi_RDN *rdn, const Slapi_DN *sdn, int is_tombstone);
3104
3145
 
3105
3146
/**
3106
3147
 * Sets the RDN value in a \c Slapi_RDN structure from a \c Slapi_DN.
3535
3576
 */
3536
3577
char * slapi_rdn_get_value(const char *rdn);
3537
3578
 
 
3579
/**
 
3580
 * Check if the rdn is multivalued or not
 
3581
 *
 
3582
 * \param rdn A pointer to rdn to exam.
 
3583
 * \return 1, if the rdn is multi valued.
 
3584
 *         0, if the rdn is simgle valued.
 
3585
 */
 
3586
int slapi_rdn_is_multivalued(Slapi_RDN *rdn);
 
3587
 
 
3588
/**
 
3589
 * Check if the rdn is a conflict rdn or not
 
3590
 *
 
3591
 * \param rdn A pointer to rdn to exam.
 
3592
 * \return 1, if the rdn is a conflict rdn
 
3593
 *         0, if the rdn is not a conflict rdn
 
3594
 */
 
3595
int slapi_rdn_is_conflict(Slapi_RDN *rdn);
 
3596
 
3538
3597
/*
3539
3598
 * utility routines for dealing with DNs
3540
3599
 */
4062
4121
 *        \arg #SLAPI_TYPE_CMP_EXACT
4063
4122
 *        \arg #SLAPI_TYPE_CMP_BASE
4064
4123
 *        \arg #SLAPI_TYPE_CMP_SUBTYPE
 
4124
 *        \arg #SLAPI_TYPE_CMP_SUBTYPES
4065
4125
 * \return \c 0 if the type names are equal.
4066
4126
 * \return A non-zero value if the type names are not equal.
4067
4127
 * \see slapi_attr_type2plugin()
4094
4154
#define SLAPI_TYPE_CMP_SUBTYPE  2
4095
4155
 
4096
4156
/**
 
4157
 * Compare types including subtypes in the both args.
 
4158
 *
 
4159
 * \see slapi_attr_type_cmp()
 
4160
 */
 
4161
#define SLAPI_TYPE_CMP_SUBTYPES 3
 
4162
 
 
4163
/**
4097
4164
 * Compare two attribute names to determine if they represent the same value.
4098
4165
 *
4099
4166
 * \param t1 Pointer to the first attribute you want to compare.
4534
4601
 *        the value.
4535
4602
 * \param vfrom Pointer to the \c Slapi_Value structure from which to
4536
4603
 *        get the value.
4537
 
 * \return Pointer to the \c Slapi_Value structure passed as the \c value paramter.
 
4604
 * \return Pointer to the \c Slapi_Value structure passed as the \c value parameter.
4538
4605
 * \return \c NULL if the \c value parameter was \c NULL.
4539
4606
 * \warning The \c vfrom parameter must not be \c NULL.
4540
4607
 * \warning If the pointer to the \c Slapi_Value structure is \c NULL,
7136
7203
   corresponds to pb_search_ctrls */
7137
7204
#define SLAPI_SEARCH_CTRLS                      198
7138
7205
 
 
7206
/* plugin be/betxn operations */
 
7207
#define SLAPI_PLUGIN_ADD_OP                     199
 
7208
#define SLAPI_PLUGIN_MOD_OP                     200
 
7209
#define SLAPI_PLUGIN_MODRDN_OP                  201
 
7210
#define SLAPI_PLUGIN_DEL_OP                     202
 
7211
 
7139
7212
#define SLAPI_RESULT_CODE                       881
7140
7213
#define SLAPI_RESULT_TEXT                       882
7141
7214
#define SLAPI_RESULT_MATCHED                    883
7756
7829
 */
7757
7830
void slapi_free_pw_scheme(PWScheme *pass_scheme);
7758
7831
 
 
7832
/** Check if rdn is a slecial rdn/dn or not.
 
7833
 * 
 
7834
 * \param rdn rdn/dn to check
 
7835
 * \param flags specify the type: RDN_IS_TOMBSTONE or RDN_IS_CONFLICT or 0
 
7836
 *
 
7837
 * \return 1 if rdn matches the flag. 
 
7838
 *   If flag is IS_TOMBSTONE, returns 1 if rdn is a tombstone rdn/dn.
 
7839
 *   If flag is IS_CONFLICT, returns 1 if rdn is a conflict rdn/dn.
 
7840
 * \return 0 otherwise
 
7841
 */
 
7842
#define RDN_IS_TOMBSTONE 0x1
 
7843
#define RDN_IS_CONFLICT  0x2
 
7844
int slapi_is_special_rdn(const char *rdn, int flag);
 
7845
 
7759
7846
#ifdef __cplusplus
7760
7847
}
7761
7848
#endif