}
/*
- pull an array of samr_Password structutres from a result set.
+ pull an array of samr_Password structures from a result set.
*/
unsigned int samdb_result_hashes(TALLOC_CTX *mem_ctx, const struct ldb_message *msg,
const char *attr, struct samr_Password **hashes)
{
struct samr_Password *lmPwdHash, *ntPwdHash;
if (nt_pwd) {
- int num_nt;
+ unsigned int num_nt;
num_nt = samdb_result_hashes(mem_ctx, msg, "unicodePwd", &ntPwdHash);
if (num_nt == 0) {
*nt_pwd = NULL;
* authentication, that we never use the LM hash, even
* if we store it */
if (lp_lanman_auth(lp_ctx)) {
- int num_lm;
+ unsigned int num_lm;
num_lm = samdb_result_hashes(mem_ctx, msg, "dBCSPwd", &lmPwdHash);
if (num_lm == 0) {
*lm_pwd = NULL;
const struct ldb_message *msg,
const char *name, const char *value)
{
- int i;
+ unsigned int i;
struct ldb_message_element *el = ldb_msg_find_element(msg, name);
if (!el) {
add a samr_Password array to a message
*/
int samdb_msg_add_hashes(TALLOC_CTX *mem_ctx, struct ldb_message *msg,
- const char *attr_name, struct samr_Password *hashes, unsigned int count)
+ const char *attr_name, struct samr_Password *hashes,
+ unsigned int count)
{
struct ldb_val val;
- int i;
+ unsigned int i;
val.data = talloc_array_size(mem_ctx, 16, count);
val.length = count*16;
if (!val.data) {
int count;
time_t now = time(NULL);
NTTIME now_nt;
- int i;
+ unsigned int i;
/* we need to know the time to compute password age */
unix_to_nt_time(&now_nt, now);
struct ldb_dn *samdb_dns_domain_to_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char *dns_domain)
{
- int i;
+ unsigned int i;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
const char *binary_encoded;
const char **split_realm;
const char *attrs[] = { attr, NULL };
struct ldb_result *res = NULL;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
- int i;
+ unsigned int i;
struct ldb_message_element *el;
*r = NULL;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
struct ldb_message *msg;
struct ldb_message_element *el;
- int i;
+ unsigned int i;
msg = ldb_msg_new(tmp_ctx);
msg->dn = dn;
static const char *attrs[] = { "replUpToDateVector", NULL };
struct ldb_result *r;
const struct ldb_val *ouv_value;
- int ret, i;
+ unsigned int i;
+ int ret;
uint64_t highest_usn;
const struct GUID *our_invocation_id;
struct timeval now = timeval_current();
struct drsuapi_DsReplicaCursor **cursors, uint32_t *count)
{
struct drsuapi_DsReplicaCursor2 *v2;
- int ret, i;
+ unsigned int i;
+ int ret;
ret = dsdb_load_udv_v2(samdb, dn, mem_ctx, &v2, count);
if (ret != LDB_SUCCESS) {
*/
int dsdb_replace(struct ldb_context *ldb, struct ldb_message *msg, uint32_t dsdb_flags)
{
- int i;
+ unsigned int i;
/* mark all the message elements as LDB_FLAG_MOD_REPLACE */
for (i=0;i<msg->num_elements;i++) {