summaryrefslogtreecommitdiffstats
path: root/source/lib
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2009-06-29 09:42:35 -0400
committerKarolin Seeger <kseeger@samba.org>2009-07-27 15:55:10 +0200
commitc0b807920e9b93776231935db4ff00d2c2f2a3a0 (patch)
treedd99f10d8b7535d6488bf9988f4d95b48a18bdc3 /source/lib
parent17d1f1c54ef5782f269e1c9a94987842ec18fd6e (diff)
downloadsamba-c0b807920e9b93776231935db4ff00d2c2f2a3a0.tar.gz
samba-c0b807920e9b93776231935db4ff00d2c2f2a3a0.tar.xz
samba-c0b807920e9b93776231935db4ff00d2c2f2a3a0.zip
Don't require "Modify property" perms to unjoin (bug #6481) "net ads leave" stopped working when "modify properties" permissions were not granted (meaning you had to be allowed to disable the account that you were about to delete).
Libnetapi should not delete machine accounts, as this does not happen on win32. The WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag really means "disable" (both in practice and docs). However, to keep the functionality in "net ads leave", we will still try to do the delete. If this fails, we try to do the disable. Additionally, it is possible in windows to not disable or delete the account, but just tell the local machine that it is no longer in the account. libnet can now do this as well. Don't use ads realm name for non-ads case. #6481 Also check that the connection to ads worked. (cherry picked from commit 6f9ed71a87e4ed5665ee8999ebf987e2165629c6)
Diffstat (limited to 'source/lib')
-rw-r--r--source/lib/netapi/joindomain.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/lib/netapi/joindomain.c b/source/lib/netapi/joindomain.c
index d15e2e733c2..93c2eed8ee1 100644
--- a/source/lib/netapi/joindomain.c
+++ b/source/lib/netapi/joindomain.c
@@ -207,6 +207,7 @@ WERROR NetUnjoinDomain_l(struct libnetapi_ctx *mem_ctx,
u->in.domain_name = domain;
u->in.unjoin_flags = r->in.unjoin_flags;
+ u->in.delete_machine_account = false;
u->in.modify_config = true;
u->in.debug = true;