diff options
author | Günther Deschner <gd@samba.org> | 2008-03-06 20:44:28 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-03-06 20:44:28 +0100 |
commit | ffd88c35db3c01c9d6c433e9ee4cda80d85b6527 (patch) | |
tree | 8d16ca0394612b9cb0edaf7dc45d9c732b7086b9 /source3/rpc_server | |
parent | 266af5887ee197984f1595dae61d461ed72bb71e (diff) | |
download | samba-ffd88c35db3c01c9d6c433e9ee4cda80d85b6527.tar.gz samba-ffd88c35db3c01c9d6c433e9ee4cda80d85b6527.tar.bz2 samba-ffd88c35db3c01c9d6c433e9ee4cda80d85b6527.zip |
Fix _dssetup_DsRoleGetPrimaryDomainInformation().
Guenther
(This used to be commit 5eb7b7a9db4bda40660df5ab67bfea99e75716f9)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_dssetup_nt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_dssetup_nt.c b/source3/rpc_server/srv_dssetup_nt.c index ea535a3375..2b18e6b2ae 100644 --- a/source3/rpc_server/srv_dssetup_nt.c +++ b/source3/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; |