summaryrefslogtreecommitdiff
path: root/source4
AgeCommit message (Collapse)AuthorFilesLines
2013-03-12scripting: No longer install samba_upgradeprovisionAndrew Bartlett1-1/+1
This tool is an important part of the toolkit a Samba Team member can use to assist a user with the upgrade of a very old Samba 4.0 AD DC installation. However, like all powerful tools, it has sharp edges, and these need to have more protection added before we recommend the tool be used. The WHATSNEW already indicated that this tool should not be used but a large number of users have run it, and due to lack of testing in the past, some have run into bugs. While this tool can be run in debug modes, by default it simply fixes the database following a series of internal rule. This does a good job much of the time, but does not request permission in the way that dbcheck does, and will create extra objects for things like the DNS partitions. By removing this from the installed binaries, we provide another signal that it should not be used right now, until these matters are fixed and some clear documentation on how to safely use the tool can be written. Andrew Bartlett Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Mar 12 02:51:23 CET 2013 on sn-devel-104
2013-03-09s4-dns: dlz_bind9: Check result to avoid segfaultStefan Gohmann1-1/+1
We saw this issue in a customer environment with many CNF objects. I wasn't able to reproduce it, but I got the following core dump: (gdb) directory samba4-4.0.0~rc6/source4/dns_server/ Source directories searched: /root/samba4-4.0.0~rc6/source4/dns_server:$cdir:$cwd (gdb) bt #0 0xb4b0bc13 in dlz_lookup_types (state=0x9648e48, zone=0xb659b9a8 "xxxxxx.xxxxx.de", name=0xb659bda8 "client9173", lookup=0xb6db7588, types=0x0) at ../source4/dns_server/dlz_bind9.c:830 #1 0xb4b0bdb8 in dlz_lookup (zone=0xb659b9a8 "xxxxxx.xxxxx.de", name=0xb659bda8 "client9173", dbdata=0x9648e48, lookup=0xb6db7588) at ../source4/dns_server/dlz_bind9.c:875 #2 0x080b43d8 in dlopen_dlz_lookup () #3 0xb7701755 in findnode () from /usr/lib/libdns.so.81 #4 0xb7701d22 in find () from /usr/lib/libdns.so.81 #5 0xb7639e5f in dns_db_find () from /usr/lib/libdns.so.81 #6 0x08075476 in query_find () #7 0x0807acb9 in ns_query_start () #8 0x08060712 in client_request () #9 0xb743022b in run () from /usr/lib/libisc.so.81 #10 0xb7216955 in start_thread () from /lib/i686/cmov/libpthread.so.0 #11 0xb706c1de in clone () from /lib/i686/cmov/libc.so.6 (gdb) f 0 #0 0xb4b0bc13 in dlz_lookup_types (state=0x9648e48, zone=0xb659b9a8 "xxxxxx.xxxxx.de", name=0xb659bda8 "client9173", lookup=0xb6db7588, types=0x0) at ../source4/dns_server/dlz_bind9.c:830 830 el = ldb_msg_find_element(res->msgs[0], "dnsRecord"); (gdb) p res->msgs $1 = (struct ldb_message **) 0x0 (gdb) p res->count $2 = 0 (gdb) Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-06Make sure to set umask() before calling mkstemp().Andreas Schneider1-0/+3
Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Mar 6 01:16:34 CET 2013 on sn-devel-104
2013-03-05s4-libregistry: Improve NULL handling of name.Andreas Schneider1-3/+4
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05dsdb: Check for pointers before we deference them.Andreas Schneider1-7/+7
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05gensec: recv_handler can't be NULL at that point.Andreas Schneider1-1/+1
We probably want to segfault here if it is NULL. Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05s4-libregistry: Fix path check and improve while loops.Andreas Schneider1-6/+6
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05s4-libregistry: Make sure we don't dereference a NULL pointer.Andreas Schneider1-1/+3
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05s4-client: Make sure entry is a valid string.Andreas Schneider1-2/+8
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-04s4-lib/socket: Return the original EMSGSIZE when sendto() and setsockopt() ↵Andrew Bartlett1-1/+1
both fail This ensures that should we be unable to increase the socket size, we return an error that the application layer above might expect and be able to make as reasonable response to (such as switching to a stream-based transport). This fixes up c692bb02b039ae8fef6ba968fd13b36ad7d62a72. As suggested by metze in https://bugzilla.samba.org/show_bug.cgi?id=9697#c4 Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04selftest: Remove output directories to save disk spaceAndrew Bartlett1-7/+11
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04samba_upgradeprovision: Do not reset every DN when changing an SDAndrew Bartlett1-22/+8
SD propogation is handled by an LDB module, we do not need to touch each and every DN to make it happen. Now that we do not need to put this via a hash, the dnToRecalculate list is changed to be a list of Dn objects, not strings so that: if dn in listWellknown is handled using a schema comparison (avoiding different case forms tripping it up). Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04samba_upgradeprovision: do not maintain dnNotToRecalculate as a listAndrew Bartlett1-5/+3
We only need a boolean indication, not the actual values. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04samba_upgradeprovision: only run rebuild_sd in --full modeAndrew Bartlett1-20/+17
This is a potentially destructive routine, and should not be run by default. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04samba_upgradeprovision: Remove alwaysRecalculate, this is too dangerousAndrew Bartlett1-4/+1
I am unclear on why this was added, but the idea that we ever always reset data in the directory is not reasonable to me, so I am removing it. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04samba_upgradeprovision: Remove unused checkKeepAttributeOldMtdAndrew Bartlett1-73/+6
lastProvisionUSNs is never None, instead the code requries the administrator to populate this attribute in the directory. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04scripting: Rework samba.upgradehelpers.get_diff_sddls to be get_diff_sdsAndrew Bartlett1-11/+10
This moves the SDDL conversion inside the get_diff_sds function and prepares for removing inherited ACEs from the SD before comparison. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04samba_upgradeprovision: Remove auto-detection of pre-alpha9 databasesAndrew Bartlett1-5/+6
These are incredibly rare, and administrators running such databases not only ask the Samba Team for help personally, they can read --help. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04selftest: Rename samba4.blackbox.upgradeprovision.py to ↵Andrew Bartlett1-1/+1
samba4.blackbox.upgradeprovision.current This name matches the other upgradeprovision tests for older saved provisions. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04selftest: Add ldapcmp to ensure upgradeprovision of a fresh DB is a no-opAndrew Bartlett1-1/+33
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-04selftest: Add in a provision from 4.0.0 to run tests againstAndrew Bartlett21-0/+80210
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-02Handle EMSGSIZE on UNIX domain sockets.Landon Fuller1-9/+26
On some systems (eg, FreeBSD) the default SO_SNDBUF for UNIX domain sockets is to small, and EMSGSIZE is returned. Other systems provide a larger default send buffer, but there is still no guarantee that the buffer will be sized appropriately. This patch modifies the sendto() path to attempt to resize the SO_SNDBUF dynamically upon an EMSGSIZE failure, and then retry the send. This fixes local DCE/RPC errors on FreeBSD, eg: https://lists.samba.org/archive/samba-technical/2013-January/089881.html Signed-Off-By: Landon Fuller <landonf@bikemonkey.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 23:34:03 CET 2013 on sn-devel-104
2013-03-02Remove incomplete check for IPv6 link-local addresses.Landon Fuller1-3/+1
This has been superceded by a check for link-local addresses in get_interfaces() Signed-Off-By: Landon Fuller <landonf@bikemonkey.org> Reviewed-By: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 08:38:54 CET 2013 on sn-devel-104
2013-03-02Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij118-31388/+5
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104
2013-03-02build: Rename samba_python waf node to avoid duplicate nameAndrew Bartlett1-1/+1
This makes it clearer when debuging build issues. Andrew Bartlett
2013-02-28s4:lib/events: make use of samba_tevent_set_debug()Stefan Metzmacher1-35/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-28s4:pyregistry: make use of samba_tevent_context_init()Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-28s4:pygensec: make use of samba_tevent_context_init()Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-28s4:winbindd: fix spacing and line length in cmd_getpwnam_recv_domain()Michael Adam1-1/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 28 03:54:41 CET 2013 on sn-devel-104
2013-02-27s4:winbindd: do not drop the workgroup name in the getgrgid callMichael Adam1-1/+11
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Feb 27 05:44:39 CET 2013 on sn-devel-104
2013-02-27s4:winbindd: do not drop the workgroup name in the getgrnam and getgrent calls.Michael Adam1-1/+11
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-22s4-lib: Don't leak plugin handle on error.Andreas Schneider1-0/+1
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-policy: Fix memory leaks in push_recursive().Andreas Schneider1-14/+26
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-cifsdd: Don't leak memory.Andreas Schneider1-0/+6
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-registry: Don't leak file descriptor.Andreas Schneider1-2/+1
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-registry: Don't leak memory on error.Andreas Schneider1-0/+7
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-client: Don't leak memory.Andreas Schneider1-0/+2
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22torture: Don't leak file resource handle in spoolss test.Andreas Schneider1-0/+1
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-client: Don't leak file descriptor.Andreas Schneider1-0/+7
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-client: Don't leak resource handle.Andreas Schneider1-0/+2
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22torture: Make sure we don't overrun the buffer.Andreas Schneider1-1/+1
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22torture: Fix memcmp of short buffer.Andreas Schneider1-2/+2
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22torture: Fix array access in spoolss test.Andreas Schneider1-2/+2
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-libcli: Check return value of smbcli_request_setup().Andreas Schneider3-0/+15
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22pyauth: Check return value of lpcfg_from_py_object().Andreas Schneider1-0/+4
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-libcli: Check return code of smbcli_request_setup().Andreas Schneider1-0/+3
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s4-libcli: Add null check for ndr functions in rap.Andreas Schneider1-0/+8
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22torture: Fix samsync domain_name checks.Andreas Schneider1-4/+45
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22dsdb-descriptor: Avoid segfault copying an SD without an owner or groupAndrew Bartlett1-4/+12
This is an unusual SD, but it does exist is some very old upgraded databases. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Feb 22 11:06:17 CET 2013 on sn-devel-104
2013-02-22dsdb-descriptor: Spell out security descriptor flags as constantsAndrew Bartlett2-2/+2
Reviewed-by: Stefan Metzmacher <metze@samba.org>