summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-16 22:55:29 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-05-18 16:12:08 +0200
commitc6cc22adc059aeb6de50305b8a40d513d8f05bbc (patch)
treeb7d03da48987b9af6060f6f35fb069a3d25d7578 /source4/scripting/python
parentc47b078ec339343732da21212e04a5b7cf548e8c (diff)
downloadsamba-c6cc22adc059aeb6de50305b8a40d513d8f05bbc.tar.gz
samba-c6cc22adc059aeb6de50305b8a40d513d8f05bbc.tar.bz2
samba-c6cc22adc059aeb6de50305b8a40d513d8f05bbc.zip
s4-libnet: Remove libnet_Join and create libnet_Join_member
libnet_Join conflicts with a function in the source3 netapi of the same name, and the ability to join as a DC via this particular method is unused. Andrew Bartlett
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/netcmd/join.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/source4/scripting/python/samba/netcmd/join.py b/source4/scripting/python/samba/netcmd/join.py
index 70b750191a..820709c9e3 100644
--- a/source4/scripting/python/samba/netcmd/join.py
+++ b/source4/scripting/python/samba/netcmd/join.py
@@ -59,7 +59,13 @@ class cmd_join(Command):
role = role.upper()
if role is None or role == "MEMBER":
- secure_channel_type = SEC_CHAN_WKSTA
+ (join_password, sid, domain_name) = net.join_member(domain,
+ netbios_name,
+ LIBNET_JOIN_AUTOMATIC)
+
+ self.outf.write("Joined domain %s (%s)\n" % (domain_name, sid))
+ return
+
elif role == "DC":
join_DC(server=server, creds=creds, lp=lp, domain=domain,
site=site, netbios_name=netbios_name, targetdir=targetdir)
@@ -70,10 +76,3 @@ class cmd_join(Command):
return
else:
raise CommandError("Invalid role %s (possible values: MEMBER, BDC, RODC)" % role)
-
- (join_password, sid, domain_name) = net.join(domain,
- netbios_name,
- secure_channel_type,
- LIBNET_JOIN_AUTOMATIC)
-
- self.outf.write("Joined domain %s (%s)\n" % (domain_name, sid))