summaryrefslogtreecommitdiff
path: root/source4/rpc_server/samr/dcesrv_samr.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-05-26 07:32:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:19 -0500
commitd66c2b477d9cfb3cf68127214c92b4b3bcb8aa22 (patch)
tree52cd9596ed2adbfa25f546c613c6512f4bc29ac2 /source4/rpc_server/samr/dcesrv_samr.c
parent766ce9a057f954478deede1e4635ef9596894d34 (diff)
downloadsamba-d66c2b477d9cfb3cf68127214c92b4b3bcb8aa22.tar.gz
samba-d66c2b477d9cfb3cf68127214c92b4b3bcb8aa22.tar.bz2
samba-d66c2b477d9cfb3cf68127214c92b4b3bcb8aa22.zip
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)
Diffstat (limited to 'source4/rpc_server/samr/dcesrv_samr.c')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index da89688d8f..322ef3a11c 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -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;