mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r1335: NT_STATUS_INTERNAL_DB_CORRUPTION
should cause DEBUG(0,(...));
metze
(This used to be commit 80851e6778
)
This commit is contained in:
parent
92ca39eff6
commit
b82881591c
@ -235,7 +235,7 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret > 1) {
|
if (ret > 1) {
|
||||||
DEBUG(1,("Found %d records matching user [%s]\n", ret, username));
|
DEBUG(0,("Found %d records matching user [%s]\n", ret, username));
|
||||||
samdb_close(sam_ctx);
|
samdb_close(sam_ctx);
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret_domain > 1) {
|
if (ret_domain > 1) {
|
||||||
DEBUG(1,("Found %d records matching domain [%s]\n",
|
DEBUG(0,("Found %d records matching domain [%s]\n",
|
||||||
ret_domain, domain_sid));
|
ret_domain, domain_sid));
|
||||||
samdb_close(sam_ctx);
|
samdb_close(sam_ctx);
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
|
@ -199,7 +199,7 @@ static NTSTATUS netr_ServerAuthenticate3(struct dcesrv_call_state *dce_call, TAL
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (num_records > 1) {
|
if (num_records > 1) {
|
||||||
DEBUG(1,("Found %d records matching user [%s]\n", num_records, r->in.account_name));
|
DEBUG(0,("Found %d records matching user [%s]\n", num_records, r->in.account_name));
|
||||||
samdb_close(sam_ctx);
|
samdb_close(sam_ctx);
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
@ -390,7 +390,7 @@ static NTSTATUS netr_ServerPasswordSet(struct dcesrv_call_state *dce_call, TALLO
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (num_records > 1) {
|
if (num_records > 1) {
|
||||||
DEBUG(1,("Found %d records matching user [%s]\n", num_records,
|
DEBUG(0,("Found %d records matching user [%s]\n", num_records,
|
||||||
pipe_state->account_name));
|
pipe_state->account_name));
|
||||||
samdb_close(sam_ctx);
|
samdb_close(sam_ctx);
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
@ -399,7 +399,7 @@ static NTSTATUS netr_ServerPasswordSet(struct dcesrv_call_state *dce_call, TALLO
|
|||||||
domain_sid = samdb_result_sid_prefix(mem_ctx, msgs[0], "objectSid");
|
domain_sid = samdb_result_sid_prefix(mem_ctx, msgs[0], "objectSid");
|
||||||
if (!domain_sid) {
|
if (!domain_sid) {
|
||||||
samdb_close(sam_ctx);
|
samdb_close(sam_ctx);
|
||||||
DEBUG(1,("no objectSid in user record\n"));
|
DEBUG(0,("no objectSid in user record\n"));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,7 +417,7 @@ static NTSTATUS netr_ServerPasswordSet(struct dcesrv_call_state *dce_call, TALLO
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (num_records_domain > 1) {
|
if (num_records_domain > 1) {
|
||||||
DEBUG(1,("Found %d records matching domain [%s]\n",
|
DEBUG(0,("Found %d records matching domain [%s]\n",
|
||||||
num_records_domain, domain_sid));
|
num_records_domain, domain_sid));
|
||||||
samdb_close(sam_ctx);
|
samdb_close(sam_ctx);
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
|
@ -98,7 +98,7 @@ NTSTATUS schannel_store_session_key(TALLOC_CTX *mem_ctx,
|
|||||||
ret = ldb_add(ldb, &msg);
|
ret = ldb_add(ldb, &msg);
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DEBUG(1,("Unable to add %s to session key db - %s\n", msg.dn, ldb_errstring(ldb)));
|
DEBUG(0,("Unable to add %s to session key db - %s\n", msg.dn, ldb_errstring(ldb)));
|
||||||
ldb_close(ldb);
|
ldb_close(ldb);
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ static NTSTATUS samr_LookupDomain(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
|||||||
|
|
||||||
sid = dom_sid_parse_talloc(mem_ctx, sidstr);
|
sid = dom_sid_parse_talloc(mem_ctx, sidstr);
|
||||||
if (sid == NULL) {
|
if (sid == NULL) {
|
||||||
DEBUG(1,("samdb: Invalid sid '%s' for domain %s\n",
|
DEBUG(0,("samdb: Invalid sid '%s' for domain %s\n",
|
||||||
sidstr, r->in.domain->name));
|
sidstr, r->in.domain->name));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
@ -238,7 +238,7 @@ static NTSTATUS samr_EnumDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
|||||||
mem_ctx, NULL, &domains,
|
mem_ctx, NULL, &domains,
|
||||||
"name", "(objectclass=domain)");
|
"name", "(objectclass=domain)");
|
||||||
if (count == -1) {
|
if (count == -1) {
|
||||||
DEBUG(1,("samdb: no domains found in EnumDomains\n"));
|
DEBUG(0,("samdb: no domains found in EnumDomains\n"));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -513,7 +513,7 @@ static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLO
|
|||||||
ret = samdb_copy_template(d_state->sam_ctx, mem_ctx, &msg,
|
ret = samdb_copy_template(d_state->sam_ctx, mem_ctx, &msg,
|
||||||
"(&(name=TemplateGroup)(objectclass=groupTemplate))");
|
"(&(name=TemplateGroup)(objectclass=groupTemplate))");
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DEBUG(1,("Failed to load TemplateGroup from samdb\n"));
|
DEBUG(0,("Failed to load TemplateGroup from samdb\n"));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -554,7 +554,7 @@ static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLO
|
|||||||
/* create the group */
|
/* create the group */
|
||||||
ret = samdb_add(d_state->sam_ctx, mem_ctx, &msg);
|
ret = samdb_add(d_state->sam_ctx, mem_ctx, &msg);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DEBUG(1,("Failed to create group record %s\n", msg.dn));
|
DEBUG(0,("Failed to create group record %s\n", msg.dn));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -660,7 +660,7 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
|||||||
ret = samdb_copy_template(d_state->sam_ctx, mem_ctx, &msg,
|
ret = samdb_copy_template(d_state->sam_ctx, mem_ctx, &msg,
|
||||||
"(&(name=TemplateUser)(objectclass=userTemplate))");
|
"(&(name=TemplateUser)(objectclass=userTemplate))");
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DEBUG(1,("Failed to load TemplateUser from samdb\n"));
|
DEBUG(0,("Failed to load TemplateUser from samdb\n"));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -671,7 +671,7 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
|||||||
ret = samdb_copy_template(d_state->sam_ctx, mem_ctx, &msg,
|
ret = samdb_copy_template(d_state->sam_ctx, mem_ctx, &msg,
|
||||||
"(&(name=TemplateMemberServer)(objectclass=userTemplate))");
|
"(&(name=TemplateMemberServer)(objectclass=userTemplate))");
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DEBUG(1,("Failed to load TemplateMemberServer from samdb\n"));
|
DEBUG(0,("Failed to load TemplateMemberServer from samdb\n"));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -683,7 +683,7 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
|||||||
ret = samdb_copy_template(d_state->sam_ctx, mem_ctx, &msg,
|
ret = samdb_copy_template(d_state->sam_ctx, mem_ctx, &msg,
|
||||||
"(&(name=TemplateDomainController)(objectclass=userTemplate))");
|
"(&(name=TemplateDomainController)(objectclass=userTemplate))");
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DEBUG(1,("Failed to load TemplateDomainController from samdb\n"));
|
DEBUG(0,("Failed to load TemplateDomainController from samdb\n"));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -695,7 +695,7 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
|||||||
ret = samdb_copy_template(d_state->sam_ctx, mem_ctx, &msg,
|
ret = samdb_copy_template(d_state->sam_ctx, mem_ctx, &msg,
|
||||||
"(&(name=TemplateTrustingDomain)(objectclass=userTemplate))");
|
"(&(name=TemplateTrustingDomain)(objectclass=userTemplate))");
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DEBUG(1,("Failed to load TemplateTrustingDomain from samdb\n"));
|
DEBUG(0,("Failed to load TemplateTrustingDomain from samdb\n"));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -738,7 +738,7 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
|||||||
/* create the user */
|
/* create the user */
|
||||||
ret = samdb_add(d_state->sam_ctx, mem_ctx, &msg);
|
ret = samdb_add(d_state->sam_ctx, mem_ctx, &msg);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DEBUG(1,("Failed to create user record %s\n", msg.dn));
|
DEBUG(0,("Failed to create user record %s\n", msg.dn));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1050,13 +1050,13 @@ static NTSTATUS samr_OpenGroup(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
|
|||||||
return NT_STATUS_NO_SUCH_GROUP;
|
return NT_STATUS_NO_SUCH_GROUP;
|
||||||
}
|
}
|
||||||
if (ret != 1) {
|
if (ret != 1) {
|
||||||
DEBUG(1,("Found %d records matching sid %s\n", ret, sidstr));
|
DEBUG(0,("Found %d records matching sid %s\n", ret, sidstr));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
groupname = samdb_result_string(msgs[0], "sAMAccountName", NULL);
|
groupname = samdb_result_string(msgs[0], "sAMAccountName", NULL);
|
||||||
if (groupname == NULL) {
|
if (groupname == NULL) {
|
||||||
DEBUG(1,("sAMAccountName field missing for sid %s\n", sidstr));
|
DEBUG(0,("sAMAccountName field missing for sid %s\n", sidstr));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1429,13 +1429,13 @@ static NTSTATUS samr_OpenUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
|
|||||||
return NT_STATUS_NO_SUCH_USER;
|
return NT_STATUS_NO_SUCH_USER;
|
||||||
}
|
}
|
||||||
if (ret != 1) {
|
if (ret != 1) {
|
||||||
DEBUG(1,("Found %d records matching sid %s\n", ret, sidstr));
|
DEBUG(0,("Found %d records matching sid %s\n", ret, sidstr));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
account_name = samdb_result_string(msgs[0], "sAMAccountName", NULL);
|
account_name = samdb_result_string(msgs[0], "sAMAccountName", NULL);
|
||||||
if (account_name == NULL) {
|
if (account_name == NULL) {
|
||||||
DEBUG(1,("sAMAccountName field missing for sid %s\n", sidstr));
|
DEBUG(0,("sAMAccountName field missing for sid %s\n", sidstr));
|
||||||
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
return NT_STATUS_INTERNAL_DB_CORRUPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user