/*
* This function will workout the filtering parameter in order to be able to do
- * the adapted search when the incomming format is format_functional.
+ * the adapted search when the incoming format is format_functional.
* This boils down to defining the search_dn (passed as pointer to ldb_dn *) and the
* ldap filter request.
* Main input parameters are:
}
/* Subcase of CrackNames. It is possible to translate a LDAP-style DN
- * (FQDN_1779) into a canoical name without actually searching the
+ * (FQDN_1779) into a canonical name without actually searching the
* database */
static WERROR DsCrackNameOneSyntactical(TALLOC_CTX *mem_ctx,
DSDB_FLAG_NEXT_MODULE |
DSDB_FLAG_AS_SYSTEM |
DSDB_SEARCH_SHOW_RECYCLED, req);
- /* we sould be able to find the parent */
+ /* we should be able to find the parent */
if (ret != LDB_SUCCESS) {
DEBUG(10,("acl: failed to find object %s\n",
ldb_dn_get_linearized(req->op.rename.olddn)));
DSDB_FLAG_NEXT_MODULE |
DSDB_FLAG_AS_SYSTEM |
DSDB_SEARCH_SHOW_RECYCLED, req);
- /* we sould be able to find the parent */
+ /* we should be able to find the parent */
if (ret != LDB_SUCCESS) {
DEBUG(10,("acl: failed to find object %s\n",
ldb_dn_get_linearized(req->op.rename.olddn)));
}
/*
- replace any occurances of an attribute with a new, generated attribute tree
+ replace any occurrences of an attribute with a new, generated attribute tree
*/
static int anr_replace_subtrees(struct anr_context *ac,
struct ldb_parse_tree *tree,
*
* Build a JSON object containing all the attributes in an ldb_message.
* The attributes are keyed by attribute name, the values of "secret attributes"
- * are supressed.
+ * are suppressed.
*
* {
* "password":{
/*
* This next bit is like the merge stage of a
* mergesort, but instead of merging we only detect
- * absense or presence.
+ * absence or presence.
*/
i = 0;
j = 0;
/*
* We keep a track of the number of attributes that we
* add just for the need of the implementation
- * it will be usefull to track then entries that needs not to
+ * it will be useful to track then entries that needs not to
* be returned because there is no real change
*/
bool namereturned = false;
bool nameasked = false;
NTSTATUS status;
- /* Ajustment for the added attributes, it will reduce the number of
+ /* Adjustment for the added attributes, it will reduce the number of
* expected to be here attributes*/
unsigned int delta = 0;
const char **myaccept = NULL;
/*
* if objectGUID is asked and we are dealing for the referrals entries and
* the usn searched is 0 then we didn't count the objectGUID as an automatically
- * returned attribute, do to so we increament delta.
+ * returned attribute, do to so we increment delta.
*/
if (referral == true &&
ldb_attr_in_list(req->op.search.attrs, "objectGUID") &&
/*
* We expect to find the GUID in the object,
* if it turns out not to be the case sometime
- * well will uncomment the code bellow
+ * well will uncomment the code below
*/
SMB_ASSERT(guidfound == true);
/*
/* Skip the ldap(s):// so up to 8 chars,
* we don't care to be precise as the goal is to be in
* the name of DC, then we search the next '/'
- * as it will be the last char before the DN of the referal
+ * as it will be the last char before the DN of the referral
*/
if (strncmp(ares->referral, "ldap://", 7) == 0) {
tmp = ares->referral + 7;
}
/*
- * When outputing flags is used to say more results.
+ * When outputting flags is used to say more results.
* For the moment we didn't honnor the size info */
control->flags = 0;
/*
* The ldap_control_handler() decode_flag_request for
* LDB_CONTROL_NOTIFICATION_OID. This makes sure
- * notification_control->data is NULL when comming from
+ * notification_control->data is NULL when coming from
* the client.
*/
if (control->data == NULL) {
* @param ldb ldb context, to allow logging.
* @param es the encrypted secret
*
- * @return The gnutls algoritm number, or 0 if there is no match.
+ * @return The gnutls algorithm number, or 0 if there is no match.
*
*/
static int gnutls_get_algorithm(struct ldb_context *ldb,
* @brief Decrypt data encrypted using an aead algorithm.
*
* Decrypt the data in ed and insert it into ev. The data was encrypted
- * with one of the gnutls aead compatable algorithms.
+ * with one of the gnutls aead compatible algorithms.
*
* @param err Pointer to an error code, set to:
* LDB_SUCESS If the value was successfully decrypted
/*
- windows ldap searchs don't allow a baseDN with more
+ windows ldap searches don't allow a baseDN with more
than one extended component, or an extended
component and a string DN
return true;
}
-/* Inject the extended DN components, so the DN cn=Adminstrator,cn=users,dc=samba,dc=example,dc=com becomes
- <GUID=541203ae-f7d6-47ef-8390-bfcf019f9583>;<SID=S-1-5-21-4177067393-1453636373-93818737-500>;cn=Adminstrator,cn=users,dc=samba,dc=example,dc=com */
+/* Inject the extended DN components, so the DN cn=Administrator,cn=users,dc=samba,dc=example,dc=com becomes
+ <GUID=541203ae-f7d6-47ef-8390-bfcf019f9583>;<SID=S-1-5-21-4177067393-1453636373-93818737-500>;cn=Administrator,cn=users,dc=samba,dc=example,dc=com */
static int inject_extended_dn_out(struct ldb_reply *ares,
struct ldb_context *ldb,
}
/*
- * dsdb_module_search_dn() garantees exactly one result message
+ * dsdb_module_search_dn() guarantees exactly one result message
* on success.
*/
ret = extended_replace_dn(os, res->msgs[0]->dn);
if (is_delete && !ldb_dn_has_extended(os->dsdb_dn->dn)) {
/* NO need to figure this DN out, this element is
- * going to be deleted anyway, and becuase it's not
+ * going to be deleted anyway, and because it's not
* extended, we have enough information to do the
* delete */
talloc_free(os);
*
* Compare two parsed_dn structures, using GUID ordering.
* To avoid the overhead of parsing the DN's this function does a binary
- * compare first. The DN's tre only parsed if they are not equal at a binary
+ * compare first. The DN's are only parsed if they are not equal at a binary
* level.
*
* @param ctx talloc context that will own the parsed dsdb_dn
if (request->operation == LDB_ADD) {
/*
* Have just added a user, generate a groupChange
- * message indicating the user has been added to thier
+ * message indicating the user has been added to their
* new PrimaryGroup.
*/
}
ac->op_controls = talloc_steal(ac, ares->controls);
ac->op_response = talloc_steal(ac, ares->response);
- /* If we have modfies to make, this is the time to do them for modify and delete */
+ /* If we have modifies to make, this is the time to do them for modify and delete */
ret = la_queue_mod_request(ac);
if (ret != LDB_SUCCESS) {
"isCriticalSystemObject", false);
if (isCriticalSystemObject) {
/*
- * Following the explaination from Microsoft
+ * Following the explanation from Microsoft
* https://lists.samba.org/archive/cifs-protocol/2011-August/002046.html
* "I finished the investigation on this behavior.
* As per MS-ADTS 3.1.5.5.7.2 , when a tree deletion is performed ,
* every object in the tree will be checked to see if it has isCriticalSystemObject
* set to TRUE, including the root node on which the delete operation is performed
* But there is an exception if the root object is a SAM specific objects(3.1.1.5.2.3 MS-ADTS)
- * Its deletion is done through SAM manger and isCriticalSystemObject attribute is not checked
+ * Its deletion is done through SAM manager and isCriticalSystemObject attribute is not checked
* The root node of the tree delete in your case is CN=ARES,OU=Domain Controllers,DC=w2k8r2,DC=home,DC=matws,DC=net
* which is a SAM object with user class. Therefore the tree deletion is performed without any error
*/
status = dsdb_expand_nested_groups(ldb, &account_sid_blob,
true, /* We don't want to add the object's SID itself,
- it's not returend in this attribute */
+ it's not returned in this attribute */
filter,
mem_ctx, groupSIDs, num_groupSIDs);
partition_ctrl = ldb_request_get_control(req, DSDB_CONTROL_CURRENT_PARTITION_OID);
if (partition_ctrl && (ac->num_requests == 1 || ares->type == LDB_REPLY_ENTRY)) {
- /* If we didn't fan this request out to mulitple partitions,
+ /* If we didn't fan this request out to multiple partitions,
* or this is an individual search result, we can
* deterministically tell the caller what partition this was
* written to (repl_meta_data likes to know) */
return search_ret;
}
- /* now delete the object in the other partitions, if requried
+ /* now delete the object in the other partitions, if required
*/
if (search_ret == LDB_ERR_NO_SUCH_OBJECT) {
for (i=0; data->partitions && data->partitions[i]; i++) {
}
backend_dir = backend_path;
- /* Failure is quite reasonable, it might alredy exist */
+ /* Failure is quite reasonable, it might already exist */
mkdir(backend_dir, 0700);
}
/*
* the following ones are guessed depending on the technet2 article
- * but not reproducable on a w2k3 server
+ * but not reproducible on a w2k3 server
*/
/* sAMAccountName with "Digest" realm */
{
};
#endif
- /* Genrate a random password salt */
+ /* Generate a random password salt */
salt = generate_random_str_list(frame,
SHA_SALT_SIZE,
SHA_SALT_PERMITTED_CHARS);
return ldb_oom(ldb);
}
- /* determine the hashing algoritm and number of rounds*/
+ /* determine the hashing algorithm and number of rounds*/
if (!parse_scheme(scheme, &algorithm, &rounds)) {
ldb_asprintf_errstring(
ldb,
* OK, horrible semantics ahead.
*
* - We need to abort any existing transaction
- * - create a transaction arround the badPwdCount update
+ * - create a transaction around the badPwdCount update
* - re-open the transaction so the upper layer
* doesn't know what happened.
*
if (krb5_ret == ENOENT) {
/*
* If there is no old AES hash (perhaps an imported DB with
- * just unicodePwd) then we just wont have an old
+ * just unicodePwd) then we just won't have an old
* password to compare to if there is no NT hash
*/
break;
if (krb5_ret == ENOENT) {
/*
* If there is no old AES hash (perhaps an imported DB with
- * just unicodePwd) then we just wont have an old
+ * just unicodePwd) then we just won't have an old
* password to compare to if there is no NT hash
*/
return LDB_SUCCESS;
* we have the provision control or if the attribute is
* interSiteTopologyGenerator as this page explain:
* http://support.microsoft.com/kb/224815 this attribute is
- * periodicaly written by the DC responsible for the intersite
+ * periodically written by the DC responsible for the intersite
* generation in a given site
*
* Unchanged could be deleting or replacing an already-gone
if (rmd_is_provided) {
/* In this case the change_replmetadata control was supplied */
/* We check that it's the only attribute that is provided
- * (it's a rare case so it's better to keep the code simplier)
+ * (it's a rare case so it's better to keep the code simpler)
* We also check that the highest local_usn is bigger or the same as
* uSNChanged. */
uint64_t db_seq;
return ldb_next_request(module, down_req);
}
-/* After the rename is compleated, update the whenchanged etc */
+/* After the rename is completed, update the whenchanged etc */
static int replmd_rename_callback(struct ldb_request *req, struct ldb_reply *ares)
{
struct ldb_context *ldb;
*
* In case you missed the note at the top, this list is kept
* in case-insensitive sorted order. In the unlikely event you
- * need to add an attrbute, please add it in the RIGHT PLACE.
+ * need to add an attribute, please add it in the RIGHT PLACE.
*/
};
static const char * const all_attrs[] = {
ldb_dn_get_linearized(new_dn)) != 0) {
DBG_NOTICE("Failure to handle '%s' of object %s "
"after successful rename to %s. "
- "Error during tombstone modificaton was: %s\n",
+ "Error during tombstone modification was: %s\n",
re_delete ? "re-delete" : "delete",
ldb_dn_get_linearized(new_dn),
ldb_dn_get_linearized(old_dn),
ldb_errstring(ldb));
} else {
DBG_NOTICE("Failure to handle '%s' of object %s. "
- "Error during tombstone modificaton was: %s\n",
+ "Error during tombstone modification was: %s\n",
re_delete ? "re-delete" : "delete",
ldb_dn_get_linearized(new_dn),
ldb_errstring(ldb));
if (!remote_isDeleted) {
/*
- * Ensure any local ACL inheritence is applied from
+ * Ensure any local ACL inheritance is applied from
* the parent object.
*
* This is needed because descriptor is above
* repl_meta_data in the module stack, so this will
- * not be trigered 'naturally' by the flow of
+ * not be triggered 'naturally' by the flow of
* operations.
*/
ret = dsdb_module_schedule_sd_propagation(ar->module,
*
* This is needed because descriptor is above
* repl_meta_data in the module stack, so this will
- * not be trigered 'naturally' by the flow of
+ * not be triggered 'naturally' by the flow of
* operations.
*/
ret = dsdb_module_schedule_sd_propagation(ar->module,
*
* This is needed because descriptor is above
* repl_meta_data in the module stack, so this will
- * not be trigered 'naturally' by the flow of
+ * not be triggered 'naturally' by the flow of
* operations.
*/
ret = dsdb_module_schedule_sd_propagation(ar->module,
char *s = ldb_ldif_message_redacted_string(ldb, ar,
LDB_CHANGETYPE_MODIFY,
msg);
- DEBUG(4, ("DRS replication uptodate modify message:\n%s\n", s));
+ DEBUG(4, ("DRS replication up-to-date modify message:\n%s\n", s));
talloc_free(s);
}
* 'CN=g1_1527570609273,CN=Users,DC=samba,DC=example,DC=com':
* 0x0'
*
- * This is becaue isDeleted is a Boolean, so FALSE is a
+ * This is because isDeleted is a Boolean, so FALSE is a
* legitimate value (set by Samba's deletetest.py)
*/
attrs[0] = attr->lDAPDisplayName;
* 'CN=g1_1527570609273,CN=Users,DC=samba,DC=example,DC=com':
* 0x0'
*
- * This is becaue isDeleted is a Boolean, so FALSE is a
+ * This is because isDeleted is a Boolean, so FALSE is a
* legitimate value (set by Samba's deletetest.py)
*/
ldb_msg_remove_attr(msg, "isDeleted");
if (nridset.alloc_pool == nridset.prev_pool) {
/*
* if we are the RID Manager,
- * we can get a new pool localy.
+ * we can get a new pool locally.
* Otherwise we fail the operation and
* ask async for a new pool.
*/
nridset.alloc_pool == nridset.prev_pool) {
/*
* if we are the RID Manager,
- * we can get a new pool localy.
+ * we can get a new pool locally.
* Otherwise we fail the operation and
* ask async for a new pool.
*/
char *dn_string;
const char *no_attrs[] = { NULL };
struct ldb_result *res;
- struct ldb_extended_dn_control *edn;
+ struct ldb_extended_dn_control *ext_dn;
TALLOC_CTX *tmp_ctx = talloc_new(req);
struct ldb_context *ldb;
int edn_type = 0;
ldb = ldb_module_get_ctx(module);
- edn = talloc_get_type(edn_control->data, struct ldb_extended_dn_control);
- if (edn) {
- edn_type = edn->type;
+ ext_dn = talloc_get_type(edn_control->data, struct ldb_extended_dn_control);
+ if (ext_dn) {
+ edn_type = ext_dn->type;
}
el = ldb_msg_find_element(msg, attrname);
ldb_dn_get_extended_linearized(ac, attr_dn, 1),
ldb_errstring(ldb));
/*
- * Provide a meaninful error string but not
+ * Provide a meaningful error string but not
* confidential DB contents possibly in the
* original string
*/
talloc_steal(el->values, res->msgs[0]->dn);
if (edn_control) {
- struct ldb_extended_dn_control *edn;
+ struct ldb_extended_dn_control *ext_dn;
int edn_type = 0;
- edn = talloc_get_type(edn_control->data, struct ldb_extended_dn_control);
- if (edn != NULL) {
- edn_type = edn->type;
+ ext_dn = talloc_get_type(edn_control->data, struct ldb_extended_dn_control);
+ if (ext_dn != NULL) {
+ edn_type = ext_dn->type;
}
el->values[0].data = (uint8_t *)ldb_dn_get_extended_linearized(el->values,
res->msgs[0]->dn,
}
/* choose the highest of the 3 - see pdb_ldap.c for an
- * explaination */
+ * explanation */
rid = sambaNextRid;
if ((sambaNextUserRid != (uint32_t) -1) && (sambaNextUserRid > rid)) {
rid = sambaNextUserRid;
}
/*
- * normaly the DACL will prevent delete
+ * normally the DACL will prevent delete
* with LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS
* above us.
*/
return ldb_module_done(ac->req, ares->controls,
ares->response, ares->error);
}
- /* Only entries are interesting, and we handle the case of the parent seperatly */
+ /* Only entries are interesting, and we handle the case of the parent separately */
switch (ares->type) {
case LDB_REPLY_ENTRY:
* We update right now the last refresh timestamp so that if
* the schema partition hasn't change we don't keep on retrying.
* Otherwise if the timestamp was update only when the schema has
- * actually changed (and therefor completely reloaded) we would
+ * actually changed (and therefore completely reloaded) we would
* continue to hit the database to get the highest USN.
*/
/*
* minimal unit test of commit_failure_hr, that ensures
- * that all the expected conten is in the log entry.
+ * that all the expected content is in the log entry.
*/
static void test_commit_failure_hr(void **state)
{
}
/* Fix the DN so that the relative attribute names are in upper case so that the DN:
- cn=Adminstrator,cn=users,dc=samba,dc=example,dc=com becomes
- CN=Adminstrator,CN=users,DC=samba,DC=example,DC=com
+ cn=Administrator,cn=users,dc=samba,dc=example,dc=com becomes
+ CN=Administrator,CN=users,DC=samba,DC=example,DC=com
*/
int dsdb_fix_dn_rdncase(struct ldb_context *ldb, struct ldb_dn *dn)
{
}
}
- /* The caller may have requested simple privilages, for example if there isn't a local DB */
+ /* The caller may have requested simple privileges, for example if there isn't a local DB */
if (session_info_flags & AUTH_SESSION_INFO_SIMPLE_PRIVILEGES) {
/* Shortcuts to prevent recursion and avoid lookups */
if (ptoken->sids == NULL) {