1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

r901: w2k3 completely ignores the domain name argument to GetDomPwInfo,

always returning the info for the primary domain. I noticed this
because WinXP sends the wrong information in this field (it sends
\\server_name) and gets away with it
(This used to be commit e128bcca562960afe75bf14dd775113e1dd7b213)
This commit is contained in:
Andrew Tridgell 2004-05-26 07:32:30 +00:00 committed by Gerald (Jerry) Carter
parent 766ce9a057
commit d66c2b477d

View File

@ -1990,6 +1990,9 @@ static NTSTATUS samr_RemoveMultipleMembersFromAlias(struct dcesrv_call_state *dc
samr_GetDomPwInfo
this fetches the default password properties for a domain
note that w2k3 completely ignores the domain name in this call, and
always returns the information for the servers primary domain
*/
static NTSTATUS samr_GetDomPwInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct samr_GetDomPwInfo *r)
@ -1999,10 +2002,6 @@ static NTSTATUS samr_GetDomPwInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX
const char * const attrs[] = {"minPwdLength", "pwdProperties", NULL };
void *sam_ctx;
if (r->in.name == NULL || r->in.name->name == NULL) {
return NT_STATUS_NO_SUCH_DOMAIN;
}
sam_ctx = samdb_connect();
if (sam_ctx == NULL) {
return NT_STATUS_INVALID_SYSTEM_SERVICE;
@ -2011,7 +2010,7 @@ static NTSTATUS samr_GetDomPwInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX
ret = samdb_search(sam_ctx,
mem_ctx, NULL, &msgs, attrs,
"(&(name=%s)(objectclass=domain))",
r->in.name->name);
lp_workgroup());
if (ret <= 0) {
samdb_close(sam_ctx);
return NT_STATUS_NO_SUCH_DOMAIN;