samba/samba-3.2.0pre2-msrpc.diff
Guenther Deschner f4feb7336e Fix libnetconf, libnetapi and msrpc DSSETUP call
Do better release numbers for subpackages.

Guenther
2008-03-18 18:58:07 +00:00

34 lines
1.0 KiB
Diff

commit 5eb7b7a9db4bda40660df5ab67bfea99e75716f9
Author: Günther Deschner <gd@samba.org>
Date: Thu Mar 6 20:44:28 2008 +0100
Fix _dssetup_DsRoleGetPrimaryDomainInformation().
Guenther
diff --git a/source/rpc_server/srv_dssetup_nt.c b/source/rpc_server/srv_dssetup_nt.c
index ea535a3..2b18e6b 100644
--- a/source/rpc_server/srv_dssetup_nt.c
+++ b/source/rpc_server/srv_dssetup_nt.c
@@ -35,7 +35,7 @@ static WERROR fill_dsrole_dominfo_basic(TALLOC_CTX *ctx,
struct dssetup_DsRolePrimaryDomInfoBasic **info)
{
struct dssetup_DsRolePrimaryDomInfoBasic *basic = NULL;
- fstring dnsdomain;
+ char *dnsdomain = NULL;
DEBUG(10,("fill_dsrole_dominfo_basic: enter\n"));
@@ -71,7 +71,10 @@ static WERROR fill_dsrole_dominfo_basic(TALLOC_CTX *ctx,
/* fill in some additional fields if we are a member of an AD domain */
if (lp_security() == SEC_ADS) {
- fstrcpy(dnsdomain, lp_realm());
+ dnsdomain = talloc_strdup(ctx, lp_realm());
+ if (!dnsdomain) {
+ return WERR_NOMEM;
+ }
strlower_m(dnsdomain);
basic->dns_domain = dnsdomain;