summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-16 08:17:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:10 -0500
commitb906886e9e9739877fef4c381c46a9a9d61859ba (patch)
tree923e6ec17401a2f034ad38459b296dda8441ed11 /source3/utils
parent14ddce8b64b559e0db25e2b79dd16d8f3d9aff26 (diff)
downloadsamba-b906886e9e9739877fef4c381c46a9a9d61859ba.tar.gz
samba-b906886e9e9739877fef4c381c46a9a9d61859ba.tar.bz2
samba-b906886e9e9739877fef4c381c46a9a9d61859ba.zip
r20824: Send access to the trusted domain passwords through the pdb backend, so that
in the next step we can store them in LDAP to be replicated across DCs. Thanks to Michael Adam <ma@sernet.de> Volker (This used to be commit 3c879745cfc39be6128b63a88ecdbfa3d9ce6c2d)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 366f63dc5b..e29d0495d1 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -5604,9 +5604,7 @@ static int rpc_trustdom_establish(int argc, const char **argv)
* Store the password in secrets db
*/
- if (!secrets_store_trusted_domain_password(domain_name,
- opt_password,
- domain_sid)) {
+ if (!pdb_set_trusteddom_pw(domain_name, opt_password, domain_sid)) {
DEBUG(0, ("Storing password for trusted domain failed.\n"));
cli_shutdown(cli);
return -1;
@@ -5644,6 +5642,7 @@ static int rpc_trustdom_establish(int argc, const char **argv)
static int rpc_trustdom_revoke(int argc, const char **argv)
{
char* domain_name;
+ int rc = -1;
if (argc < 1) return -1;
@@ -5652,13 +5651,16 @@ static int rpc_trustdom_revoke(int argc, const char **argv)
strupper_m(domain_name);
/* delete password of the trust */
- if (!trusted_domain_password_delete(domain_name)) {
+ if (!pdb_del_trusteddom_pw(domain_name)) {
DEBUG(0, ("Failed to revoke relationship to the trusted domain %s\n",
domain_name));
- return -1;
+ goto done;
};
- return 0;
+ rc = 0;
+done:
+ SAFE_FREE(domain_name);
+ return rc;
}
/**
@@ -5744,9 +5746,7 @@ static NTSTATUS vampire_trusted_domain(struct rpc_pipe_client *pipe_hnd,
goto done;
}
- if (!secrets_store_trusted_domain_password(trusted_dom_name,
- cleartextpwd,
- &dom_sid)) {
+ if (!pdb_set_trusteddom_pw(trusted_dom_name, cleartextpwd, &dom_sid)) {
DEBUG(0, ("Storing password for trusted domain failed.\n"));
nt_status = NT_STATUS_UNSUCCESSFUL;
goto done;