|
|
The branch, master has been updated
via 25a0750... s4-python: only install external python libs that are
missing
via 7d86257... s4-python: import a copy of the python dns library
via f3ca7a4... s4-dns: use samba.external to pull in the dns.resolver
library
via 8c7cf49... s4-python: allow us to have samba copies of python
libraries we depend on
via 2d30f4f... s4-dns-ex: use autoclose on the dns child pipe
via 5573d04... s4-messaging: use auto-close on the socket
from cb06eee... srv_pipe.c doesn't reference current_user anymore.
Remove it.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 25a0750b8184e434e30717bb47f0b36a00e41629
Author: Andrew Tridgell <tridge@xxxxxxxxx>
Date: Fri Mar 5 11:53:19 2010 +1100
s4-python: only install external python libs that are missing
commit 7d86257d54cb59d016a051b91bdee62ab2f8a0d5
Author: Andrew Tridgell <tridge@xxxxxxxxx>
Date: Fri Mar 5 11:45:40 2010 +1100
s4-python: import a copy of the python dns library
This library is not installed on enough systems for us to rely
on it being available. We use the system copy if possible, and
fallback to this local copy
Pair-Programmed-With: Andrew Bartlett <abartlet@xxxxxxxxx>
commit f3ca7a4696cadbb74f41dd71ef9336445682d406
Author: Andrew Tridgell <tridge@xxxxxxxxx>
Date: Fri Mar 5 11:45:10 2010 +1100
s4-dns: use samba.external to pull in the dns.resolver library
commit 8c7cf499abf880cd4915e1b831298feb8990245b
Author: Andrew Tridgell <tridge@xxxxxxxxx>
Date: Fri Mar 5 11:44:45 2010 +1100
s4-python: allow us to have samba copies of python libraries we depend on
For python libraries like dns.resolver it is useful to be able to install
a copy of the library with Samba. This set of functions allows us to do that
while using the locally installed version if it is available
Pair-Programmed-With: Andrew Bartlett <abartlet@xxxxxxxxx>
commit 2d30f4fb4fd39fb0949cd948559725917f95742f
Author: Andrew Tridgell <tridge@xxxxxxxxx>
Date: Fri Mar 5 10:43:34 2010 +1100
s4-dns-ex: use autoclose on the dns child pipe
I'm hoping this will fix an occasional segfault I've noticed where
epoll still calls events on a closed fde
Pair-Programmed-With: Andrew Bartlett <abartlet@xxxxxxxxx>
commit 5573d049414d75e9991d53627235cafefbe67470
Author: Andrew Tridgell <tridge@xxxxxxxxx>
Date: Fri Mar 5 10:42:41 2010 +1100
s4-messaging: use auto-close on the socket
-----------------------------------------------------------------------
Summary of changes:
source4/lib/messaging/messaging.c | 1 +
source4/libcli/resolve/dns_ex.c | 3 +-
source4/script/installmisc.sh | 10 +
source4/scripting/bin/samba_dnsupdate | 8 +-
source4/scripting/python/samba/external.py | 50 +
source4/scripting/python/samba_external/README | 4 +
.../python/samba_external/dnspython/ChangeLog | 1023 ++++++++++++++++++
.../python/samba_external/dnspython/LICENSE | 14 +
.../python/samba_external/dnspython/PKG-INFO | 28 +
.../python/samba_external/dnspython/README | 347 +++++++
.../scripting/python/samba_external/dnspython/TODO | 17 +
.../samba_external/dnspython/dns/__init__.py | 52 +
.../python/samba_external/dnspython/dns/dnssec.py | 72 ++
.../python/samba_external/dnspython/dns/e164.py | 79 ++
.../python/samba_external/dnspython/dns/edns.py | 142 +++
.../python/samba_external/dnspython/dns/entropy.py | 123 +++
.../samba_external/dnspython/dns/exception.py | 40 +
.../python/samba_external/dnspython/dns/flags.py | 106 ++
.../python/samba_external/dnspython/dns/inet.py | 108 ++
.../python/samba_external/dnspython/dns/ipv4.py | 36 +
.../python/samba_external/dnspython/dns/ipv6.py | 163 +++
.../python/samba_external/dnspython/dns/message.py | 1083 ++++++++++++++++++++
.../python/samba_external/dnspython/dns/name.py | 700 +++++++++++++
.../samba_external/dnspython/dns/namedict.py | 59 ++
.../python/samba_external/dnspython/dns/node.py | 172 ++++
.../python/samba_external/dnspython/dns/opcode.py | 104 ++
.../python/samba_external/dnspython/dns/query.py | 428 ++++++++
.../python/samba_external/dnspython/dns/rcode.py | 119 +++
.../python/samba_external/dnspython/dns/rdata.py | 456 ++++++++
.../samba_external/dnspython/dns/rdataclass.py | 114 ++
.../samba_external/dnspython/dns/rdataset.py | 329 ++++++
.../samba_external/dnspython/dns/rdatatype.py | 232 +++++
.../dnspython/dns/rdtypes/ANY/AFSDB.py | 51 +
.../dnspython/dns/rdtypes/ANY/CERT.py | 131 +++
.../dnspython/dns/rdtypes/ANY/CNAME.py | 24 +
.../dnspython/dns/rdtypes/ANY/DLV.py | 20 +
.../dnspython/dns/rdtypes/ANY/DNAME.py | 21 +
.../dnspython/dns/rdtypes/ANY/DNSKEY.py | 25 +
.../samba_external/dnspython/dns/rdtypes/ANY/DS.py | 20 +
.../dnspython/dns/rdtypes/ANY/GPOS.py | 156 +++
.../dnspython/dns/rdtypes/ANY/HINFO.py | 83 ++
.../dnspython/dns/rdtypes/ANY/HIP.py | 140 +++
.../dnspython/dns/rdtypes/ANY/ISDN.py | 96 ++
.../dnspython/dns/rdtypes/ANY/KEY.py | 20 +
.../dnspython/dns/rdtypes/ANY/LOC.py | 334 ++++++
.../samba_external/dnspython/dns/rdtypes/ANY/MX.py | 20 +
.../samba_external/dnspython/dns/rdtypes/ANY/NS.py | 20 +
.../dnspython/dns/rdtypes/ANY/NSEC.py | 141 +++
.../dnspython/dns/rdtypes/ANY/NSEC3.py | 182 ++++
.../dnspython/dns/rdtypes/ANY/NSEC3PARAM.py | 88 ++
.../dnspython/dns/rdtypes/ANY/NXT.py | 99 ++
.../dnspython/dns/rdtypes/ANY/PTR.py | 20 +
.../samba_external/dnspython/dns/rdtypes/ANY/RP.py | 86 ++
.../dnspython/dns/rdtypes/ANY/RRSIG.py | 20 +
.../samba_external/dnspython/dns/rdtypes/ANY/RT.py | 20 +
.../dnspython/dns/rdtypes/ANY/SIG.py | 26 +
.../dnspython/dns/rdtypes/ANY/SOA.py | 127 +++
.../dnspython/dns/rdtypes/ANY/SPF.py | 22 +
.../dnspython/dns/rdtypes/ANY/SSHFP.py | 77 ++
.../dnspython/dns/rdtypes/ANY/TXT.py | 20 +
.../dnspython/dns/rdtypes/ANY/X25.py | 62 ++
.../dnspython/dns/rdtypes/ANY/__init__.py | 48 +
.../samba_external/dnspython/dns/rdtypes/IN/A.py | 57 +
.../dnspython/dns/rdtypes/IN/AAAA.py | 58 ++
.../samba_external/dnspython/dns/rdtypes/IN/APL.py | 170 +++
.../dnspython/dns/rdtypes/IN/DHCID.py | 60 ++
.../dnspython/dns/rdtypes/IN/IPSECKEY.py | 159 +++
.../samba_external/dnspython/dns/rdtypes/IN/KX.py | 20 +
.../dnspython/dns/rdtypes/IN/NAPTR.py | 132 +++
.../dnspython/dns/rdtypes/IN/NSAP.py | 59 ++
.../dnspython/dns/rdtypes/IN/NSAP_PTR.py | 20 +
.../samba_external/dnspython/dns/rdtypes/IN/PX.py | 97 ++
.../samba_external/dnspython/dns/rdtypes/IN/SRV.py | 89 ++
.../samba_external/dnspython/dns/rdtypes/IN/WKS.py | 113 ++
.../dnspython/dns/rdtypes/IN/__init__.py | 30 +
.../dnspython/dns/rdtypes/__init__.py | 25 +
.../samba_external/dnspython/dns/rdtypes/dsbase.py | 92 ++
.../dnspython/dns/rdtypes/keybase.py | 149 +++
.../samba_external/dnspython/dns/rdtypes/mxbase.py | 105 ++
.../samba_external/dnspython/dns/rdtypes/nsbase.py | 82 ++
.../dnspython/dns/rdtypes/sigbase.py | 168 +++
.../dnspython/dns/rdtypes/txtbase.py | 87 ++
.../samba_external/dnspython/dns/renderer.py | 324 ++++++
.../samba_external/dnspython/dns/resolver.py | 761 ++++++++++++++
.../samba_external/dnspython/dns/reversename.py | 75 ++
.../python/samba_external/dnspython/dns/rrset.py | 175 ++++
.../python/samba_external/dnspython/dns/set.py | 263 +++++
.../samba_external/dnspython/dns/tokenizer.py | 547 ++++++++++
.../python/samba_external/dnspython/dns/tsig.py | 216 ++++
.../samba_external/dnspython/dns/tsigkeyring.py | 44 +
.../python/samba_external/dnspython/dns/ttl.py | 64 ++
.../python/samba_external/dnspython/dns/update.py | 241 +++++
.../python/samba_external/dnspython/dns/version.py | 34 +
.../python/samba_external/dnspython/dns/zone.py | 855 +++++++++++++++
.../samba_external/dnspython/examples/ddns.py | 51 +
.../samba_external/dnspython/examples/e164.py | 6 +
.../python/samba_external/dnspython/examples/mx.py | 7 +
.../samba_external/dnspython/examples/name.py | 13 +
.../samba_external/dnspython/examples/reverse.py | 40 +
.../dnspython/examples/reverse_name.py | 6 +
.../samba_external/dnspython/examples/xfr.py | 10 +
.../python/samba_external/dnspython/setup.py | 63 ++
.../python/samba_external/dnspython/tests/Makefile | 26 +
.../python/samba_external/dnspython/tests/bugs.py | 44 +
.../python/samba_external/dnspython/tests/example | 225 ++++
.../samba_external/dnspython/tests/example1.good | 121 +++
.../samba_external/dnspython/tests/example2.good | 121 +++
.../python/samba_external/dnspython/tests/flags.py | 59 ++
.../samba_external/dnspython/tests/message.py | 179 ++++
.../python/samba_external/dnspython/tests/name.py | 697 +++++++++++++
.../samba_external/dnspython/tests/namedict.py | 102 ++
.../samba_external/dnspython/tests/ntoaaton.py | 156 +++
.../dnspython/tests/rdtypeandclass.py | 123 +++
.../samba_external/dnspython/tests/resolver.py | 105 ++
.../python/samba_external/dnspython/tests/rrset.py | 54 +
.../python/samba_external/dnspython/tests/set.py | 208 ++++
.../samba_external/dnspython/tests/tokenizer.py | 190 ++++
.../samba_external/dnspython/tests/update.py | 114 ++
.../python/samba_external/dnspython/tests/zone.py | 389 +++++++
source4/scripting/python/samba_external/missing.py | 12 +
120 files changed, 16908 insertions(+), 5 deletions(-)
create mode 100644 source4/scripting/python/samba/external.py
create mode 100644 source4/scripting/python/samba_external/README
create mode 100644 source4/scripting/python/samba_external/dnspython/ChangeLog
create mode 100644 source4/scripting/python/samba_external/dnspython/LICENSE
create mode 100644 source4/scripting/python/samba_external/dnspython/PKG-INFO
create mode 100644 source4/scripting/python/samba_external/dnspython/README
create mode 100644 source4/scripting/python/samba_external/dnspython/TODO
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/__init__.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/dnssec.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/e164.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/edns.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/entropy.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/exception.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/flags.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/inet.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/ipv4.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/ipv6.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/message.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/name.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/namedict.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/node.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/opcode.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/query.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rcode.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdata.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdataclass.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdataset.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdatatype.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/AFSDB.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/CERT.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/CNAME.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/DLV.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/DNAME.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/DNSKEY.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/DS.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/GPOS.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/HINFO.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/HIP.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/ISDN.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/KEY.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/LOC.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/MX.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/NS.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/NSEC.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/NSEC3.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/NSEC3PARAM.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/NXT.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/PTR.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/RP.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/RRSIG.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/RT.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/SIG.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/SOA.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/SPF.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/SSHFP.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/TXT.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/X25.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/ANY/__init__.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/A.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/AAAA.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/APL.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/DHCID.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/IPSECKEY.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/KX.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/NAPTR.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/NSAP.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/NSAP_PTR.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/PX.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/SRV.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/WKS.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/IN/__init__.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/__init__.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/dsbase.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/keybase.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/mxbase.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/nsbase.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/sigbase.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rdtypes/txtbase.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/renderer.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/resolver.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/reversename.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/rrset.py
create mode 100644 source4/scripting/python/samba_external/dnspython/dns/set.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/tokenizer.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/tsig.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/tsigkeyring.py
create mode 100644 source4/scripting/python/samba_external/dnspython/dns/ttl.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/update.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/version.py
create mode 100644
source4/scripting/python/samba_external/dnspython/dns/zone.py
create mode 100755
source4/scripting/python/samba_external/dnspython/examples/ddns.py
create mode 100755
source4/scripting/python/samba_external/dnspython/examples/e164.py
create mode 100755
source4/scripting/python/samba_external/dnspython/examples/mx.py
create mode 100755
source4/scripting/python/samba_external/dnspython/examples/name.py
create mode 100755
source4/scripting/python/samba_external/dnspython/examples/reverse.py
create mode 100755
source4/scripting/python/samba_external/dnspython/examples/reverse_name.py
create mode 100755
source4/scripting/python/samba_external/dnspython/examples/xfr.py
create mode 100755 source4/scripting/python/samba_external/dnspython/setup.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/Makefile
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/bugs.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/example
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/example1.good
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/example2.good
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/flags.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/message.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/name.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/namedict.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/ntoaaton.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/rdtypeandclass.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/resolver.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/rrset.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/set.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/tokenizer.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/update.py
create mode 100644
source4/scripting/python/samba_external/dnspython/tests/zone.py
create mode 100755 source4/scripting/python/samba_external/missing.py
Changeset truncated at 500 lines:
diff --git a/source4/lib/messaging/messaging.c
b/source4/lib/messaging/messaging.c
index c507eb6..3850bcb 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -608,6 +608,7 @@ struct messaging_context *messaging_init(TALLOC_CTX
*mem_ctx,
msg->event.ev = ev;
msg->event.fde = event_add_fd(ev, msg, socket_get_fd(msg->sock),
EVENT_FD_READ, messaging_handler, msg);
+ tevent_fd_set_auto_close(msg->event.fde);
talloc_set_destructor(msg, messaging_destructor);
diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c
index 79ed783..423668d 100644
--- a/source4/libcli/resolve/dns_ex.c
+++ b/source4/libcli/resolve/dns_ex.c
@@ -67,7 +67,6 @@ static int dns_ex_destructor(struct dns_ex_state *state)
int status;
kill(state->child, SIGTERM);
- close(state->child_fd);
if (waitpid(state->child, &status, WNOHANG) == 0) {
kill(state->child, SIGKILL);
waitpid(state->child, &status, 0);
@@ -369,7 +368,6 @@ static void pipe_handler(struct tevent_context *ev, struct
tevent_fd *fde,
} else {
ret = -1;
}
- close(state->child_fd);
if (waitpid(state->child, &status, WNOHANG) == 0) {
kill(state->child, SIGKILL);
waitpid(state->child, &status, 0);
@@ -498,6 +496,7 @@ struct composite_context
*resolve_name_dns_ex_send(TALLOC_CTX *mem_ctx,
close(fd[1]);
return c;
}
+ tevent_fd_set_auto_close(state->fde);
state->child = fork();
if (state->child == (pid_t)-1) {
diff --git a/source4/script/installmisc.sh b/source4/script/installmisc.sh
index 73dbdd9..6aaf6be 100755
--- a/source4/script/installmisc.sh
+++ b/source4/script/installmisc.sh
@@ -81,4 +81,14 @@ cp setup/provision.smb.conf.member $SETUPDIR || exit 1
cp setup/provision.smb.conf.standalone $SETUPDIR || exit 1
cp setup/dns_update_list $SETUPDIR || exit 1
+echo "Installing external python libraries"
+mkdir -p $PYTHONDIR/samba_external || exit 1
+for p in $($PYTHON scripting/python/samba_external/missing.py);
+do
+ echo "Installing missing python library $p"
+ mkdir -p $PYTHONDIR/samba_external/$p
+ cp -r scripting/python/samba_external/$p/* $PYTHONDIR/samba_external/$p/ ||
exit 1
+done
+
+
exit 0
diff --git a/source4/scripting/bin/samba_dnsupdate
b/source4/scripting/bin/samba_dnsupdate
index d8ad200..2e9c469 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -21,7 +21,6 @@
import getopt
import os
import sys
-import dns.resolver
import tempfile
# ensure we get messages out immediately, so they get in the samba logs,
@@ -39,6 +38,9 @@ import ldb
from samba import glue
from samba.auth import system_session
from samba.samdb import SamDB
+import samba.external
+
+resolver = samba.external.samba_external_dns_resolver()
default_ttl = 900
@@ -141,8 +143,8 @@ def check_dns_name(d):
if opts.verbose:
print "Looking for DNS entry %s as %s" % (d, normalised_name)
try:
- ans = dns.resolver.query(normalised_name, d.type)
- except dns.resolver.NXDOMAIN:
+ ans = resolver.query(normalised_name, d.type)
+ except resolver.NXDOMAIN:
return False
if d.type == 'A':
# we need to be sure that our IP is there
diff --git a/source4/scripting/python/samba/external.py
b/source4/scripting/python/samba/external.py
new file mode 100644
index 0000000..eca910b
--- /dev/null
+++ b/source4/scripting/python/samba/external.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+
+# Unix SMB/CIFS implementation.
+# Copyright (C) Andrew Tridgell 2010
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+import sys, os
+
+def samba_find_external(directory):
+ '''insert into out module search path the path to an
+ external library'''
+ for p in sys.path:
+ dir = os.path.join(p, directory)
+ if os.path.isdir(dir):
+ sys.path.insert(0, dir)
+ return
+
+ # finally try in the local directory, to handle in-tree testing
+ dir = os.path.join("scripting/python", directory)
+ if os.path.isdir(dir):
+ sys.path.insert(0, dir)
+ return
+
+ print "Failed to find external python library %s" % directory
+ raise
+
+
+def samba_external_dns_resolver():
+ '''try and import the dns.resolver library, and if it fails
+ then use a local copy from the external directory'''
+
+ try:
+ import dns.resolver as dns
+ except:
+ samba_find_external("samba_external/dnspython")
+ import dns.resolver as dns
+ return dns
diff --git a/source4/scripting/python/samba_external/README
b/source4/scripting/python/samba_external/README
new file mode 100644
index 0000000..d6a4dec
--- /dev/null
+++ b/source4/scripting/python/samba_external/README
@@ -0,0 +1,4 @@
+This directory is for external python libraries that may not be
+installed on the local system. We always should try to use the
+system version of the library if possible, then use the Samba
+supplied copy if the system copy is unavailable
diff --git a/source4/scripting/python/samba_external/dnspython/ChangeLog
b/source4/scripting/python/samba_external/dnspython/ChangeLog
new file mode 100644
index 0000000..f5a74da
--- /dev/null
+++ b/source4/scripting/python/samba_external/dnspython/ChangeLog
@@ -0,0 +1,1023 @@
+2010-01-13 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/dnssec.py: Added RSASHA256 and RSASHA512 codepoints; added
+ other missing codepoints to _algorithm_by_text.
+
+2010-01-12 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * Escapes in masterfiles now work correctly. Previously they were
+ only working correctly when the text involved was part of a domain
+ name.
+
+ * dns/tokenizer.py: The tokenizer's get() method now returns Token
+ objects, not (type, text) tuples.
+
+2009-11-13 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * Support has been added for hmac-sha1, hmac-sha224, hmac-sha256,
+ hmac-sha384 and hmac-sha512. Thanks to Kevin Chen for a
+ thoughtful, high quality patch.
+
+ * dns/update.py (Update::present): A zero TTL was not added if
+ present() was called with a single rdata, causing _add() to be
+ unhappy. Thanks to Eugene Kim for reporting the problem and
+ submitting a patch.
+
+ * dns/entropy.py: Use os.urandom() if present. Don't seed until
+ someone wants randomness.
+
+2009-09-16 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/entropy.py: The entropy module needs locking in order to be
+ used safely in a multithreaded environment. Thanks to Beda Kosata
+ for reporting the problem.
+
+2009-07-27 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/query.py (xfr): The socket was not set to nonblocking mode.
+ Thanks to Erik Romijn for reporting this problem.
+
+2009-07-23 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/rdtypes/IN/SRV.py (SRV._cmp): SRV records were compared
+ incorrectly due to a cut-and-paste error. Thanks to Tommie
+ Gannert for reporting this bug.
+
+ * dns/e164.py (query): The resolver parameter was not used.
+ Thanks to MatÃas Bellone for reporting this bug.
+
+2009-06-23 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/entropy.py (EntropyPool.__init__): open /dev/random unbuffered;
+ there's no need to consume more randomness than we need. Thanks
+ to Brian Wellington for the patch.
+
+2009-06-19 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * (Version 1.7.1 released)
+
+2009-06-19 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * DLV.py was omitted from the kit
+
+ * Negative prerequisites were not handled correctly in _get_section().
+
+2009-06-19 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * (Version 1.7.0 released)
+
+2009-06-19 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * On Windows, the resolver set the domain incorrectly. Thanks
+ to Brandon Carpenter for reporting this bug.
+
+ * Added a to_digestable() method to rdata classes; it returns the
+ digestable form (i.e. DNSSEC canonical form) of the rdata. For
+ most rdata types this is the same uncompressed wire form. For
+ certain older DNS RR types, however, domain names in the rdata
+ are downcased.
+
+ * Added support for the HIP RR type.
+
+2009-06-18 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * Added support for the DLV RR type.
+
+ * Added various DNSSEC related constants (e.g. algorithm identifiers,
+ flag values).
+
+ * dns/tsig.py: Added support for BADTRUNC result code.
+
+ * dns/query.py (udp): When checking that addresses are the same,
+ use the binary form of the address in the comparison. This
+ ensures that we don't treat addresses as different if they have
+ equivalent but differing textual representations. E.g. "1:00::1"
+ and "1::1" represent the same address but are not textually equal.
+ Thanks to Kim Davies for reporting this bug.
+
+ * The resolver's query() method now has an optional 'source' parameter,
+ allowing the source IP address to be specified. Thanks to
+ Alexander Lind for suggesting the change and sending a patch.
+
+ * Added NSEC3 and NSEC3PARAM support.
+
+2009-06-17 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * Fixed NSEC.to_text(), which was only printing the last window.
+ Thanks to Brian Wellington for finding the problem and fixing it.
+
+2009-03-30 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/query.py (xfr): Allow UDP IXFRs. Use "one_rr_per_rrset" mode
when
+ doing IXFR.
+
+2009-03-30 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * Add "one_rr_per_rrset" mode switch to methods which parse
+ messages from wire format (e.g. dns.message.from_wire(),
+ dns.query.udp(), dns.query.tcp()). If set, each RR read is
+ placed in its own RRset (instead of being coalesced).
+
+2009-03-30 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * Added EDNS option support.
+
+2008-10-16 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/rdtypes/ANY/DS.py: The from_text() parser for DS RRs did not
+ allow multiple Base64 chunks. Thanks to Rakesh Banka for
+ finding this bug and submitting a patch.
+
+2008-10-08 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * Add entropy module.
+
+ * When validating TSIGs, we need to use the absolute name.
+
+2008-06-03 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/message.py (Message.set_rcode): The mask used preserved the
+ extended rcode, instead of everything else in ednsflags.
+
+ * dns/message.py (Message.use_edns): ednsflags was not kept
+ coherent with the specified edns version.
+
+2008-02-06 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/ipv6.py (inet_aton): We could raise an exception other than
+ dns.exception.SyntaxError in some cases.
+
+ * dns/tsig.py: Raise an exception when the peer has set a non-zero
+ TSIG error.
+
+2007-11-25 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * (Version 1.6.0 released)
+
+2007-11-25 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/query.py (_wait_for): if select() raises an exception due to
+ EINTR, we should just select() again.
+
+2007-06-13 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/inet.py: Added is_multicast().
+
+ * dns/query.py (udp): If the queried address is a multicast address,
then
+ don't check that the address of the response is the same as the
address
+ queried.
+
+2007-05-24 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/rdtypes/IN/NAPTR.py: NAPTR comparisons didn't compare the
+ preference field due to a typo.
+
+2007-02-07 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/resolver.py: Integrate code submitted by Paul Marks to
+ determine whether a Windows NIC is enabled. The way dnspython
+ used to do this does not work on Windows Vista.
+
+2006-12-10 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * (Version 1.5.0 released)
+
+2006-11-03 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/rdtypes/IN/DHCID.py: Added support for the DHCID RR type.
+
+2006-11-02 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/query.py (udp): Messages from unexpected sources can now be
+ ignored by setting ignore_unexpected to True.
+
+2006-10-31 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/query.py (udp): When raising UnexpectedSource, add more
+ detail about what went wrong to the exception.
+
+2006-09-22 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/message.py (Message.use_edns): add reasonable defaults for
+ the ednsflags, payload, and request_payload parameters.
+
+ * dns/message.py (Message.want_dnssec): add a convenience method for
+ enabling/disabling the "DNSSEC desired" flag in requests.
+
+ * dns/message.py (make_query): add "use_edns" and "want_dnssec"
+ parameters.
+
+2006-08-17 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/resolver.py (Resolver.read_resolv_conf): If /etc/resolv.conf
+ doesn't exist, just use the default resolver configuration (i.e.
+ the same thing we would have used if resolv.conf had existed and
+ been empty).
+
+2006-07-26 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/resolver.py (Resolver._config_win32_fromkey): fix
+ cut-and-paste error where we passed the wrong variable to
+ self._config_win32_search(). Thanks to David Arnold for finding
+ the bug and submitting a patch.
+
+2006-07-20 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/resolver.py (Answer): Add more support for the sequence
+ protocol, forwarding requests to the answer object's rrset.
+ E.g. "for a in answer" is equivalent to "for a in answer.rrset",
+ "answer[i]" is equivalent to "answer.rrset[i]", and
+ "answer[i:j]" is equivalent to "answer.rrset[i:j]".
+
+2006-07-19 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/query.py (xfr): Add IXFR support.
+
+2006-06-22 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/rdtypes/IN/IPSECKEY.py: Added support for the IPSECKEY RR type.
+
+2006-06-21 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/rdtypes/ANY/SPF.py: Added support for the SPF RR type.
+
+2006-06-02 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * (Version 1.4.0 released)
+
+2006-04-25 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/rrset.py (RRset.to_rdataset): Added a convenience method
+ to convert an rrset into an rdataset.
+
+2006-03-27 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * Added dns.e164.query(). This function can be used to look for
+ NAPTR RRs for a specified number in several domains, e.g.:
+
+ dns.e164.query('16505551212',
+ ['e164.dnspython.org.', 'e164.arpa.'])
+
+2006-03-26 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/resolver.py (Resolver.query): The resolver deleted from
+ a list while iterating it, which makes the iterator unhappy.
+
+2006-03-17 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/resolver.py (Resolver.query): The resolver needlessly
+ delayed responses for successful queries.
+
+2006-01-18 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/rdata.py: added a validate() method to the rdata class. If
+ you change an rdata by assigning to its fields, it is a good
+ idea to call validate() when you are done making changes.
+ For example, if 'r' is an MX record and then you execute:
+
+ r.preference = 100000 # invalid, because > 65535
+ r.validate()
+
+ The validation will fail and an exception will be raised.
+
+2006-01-11 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/ttl.py: TTLs are now bounds checked to be within the closed
+ interval [0, 2^31 - 1].
+
+ * The BIND 8 TTL syntax is now accepted in the SOA refresh, retry,
+ expire, and minimum fields, and in the original_ttl field of
+ SIG and RRSIG records.
+
+2006-01-04 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/resolver.py: The windows registry irritatingly changes the
+ list element delimiter in between ' ' and ',' (and vice-versa)
+ in various versions of windows. We now cope by always looking
+ for either one (' ' first).
+
+2005-12-27 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/e164.py: Added routines to convert between E.164 numbers and
+ their ENUM domain name equivalents.
+
+ * dns/reversename.py: Added routines to convert between IPv4 and
+ IPv6 addresses and their DNS reverse-map equivalents.
+
+2005-12-18 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/rdtypes/ANY/LOC.py (_tuple_to_float): The sign was lost when
+ converting a tuple into a float, which broke conversions of
+ south latitudes and west longitudes.
+
+2005-11-17 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/zone.py: The 'origin' parameter to from_text() and from_file()
+ is now optional. If not specified, dnspython will use the
+ first $ORIGIN in the text as the zone's origin.
+
+ * dns/zone.py: Sanity checks of the zone's origin node can now
+ be disabled.
+
+2005-11-12 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * dns/name.py: Preliminary Unicode support has been added for
+ domain names. Running dns.name.from_text() on a Unicode string
+ will now encode each label using the IDN ACE encoding. The
+ to_unicode() method may be used to convert a dns.name.Name with
+ IDN ACE labels back into a Unicode string. This functionality
+ requires Python 2.3 or greater.
+
+2005-10-31 Bob Halley <halley@xxxxxxxxxxxxx>
+
+ * (Version 1.3.5 released)
+
+2005-10-12 Bob Halley <halley@xxxxxxxxxxxxx>
+
--
Samba Shared Repository
|
|