summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-03-01tevent: the content of event is ignored by EPOLL_CTL_DELStefan Metzmacher1-2/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: call epoll_panic() if EPOLL_CTL_DEL failedStefan Metzmacher1-4/+11
Only ENOENT is ignored as it is no error. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: use helper variables to hold the epoll_ctl() resultStefan Metzmacher1-3/+9
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: remove unused if (epoll_ev->epoll_fd == -1) return; checksStefan Metzmacher1-9/+0
We'll never leave epoll_check_reopen() with epoll_fd == -1. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: add std_event_loop_wait()Stefan Metzmacher1-0/+17
We also need to fallback in tevent_loop_wait() otherwise we might miss events in the poll->fresh list. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: don't call TALLOC_FREE(ev->additional_data) in std_fallback_to_poll()Stefan Metzmacher1-1/+0
The epoll backend has done the cleanup already. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: avoid any operation on epoll_ev after a epoll_panic()Stefan Metzmacher1-11/+74
This calls TALLOC_FREE(ev->additional_data), which is epoll_ev within epoll_panic() before calling the fallback handler. In order to notice that a epoll_panic() happened, a caller can register a pointer to a bool variable under epoll_ev->panic_state. As epoll_check_reopen() can fail due to a epoll_panic(), we need to force the replay flag if we have called any event handler. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: add epoll_{create,ctl}_panic_fallback() for testingStefan Metzmacher1-5/+49
This makes sure we only do random panics if a fallback handler is registered. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: use DLIST_DEMOTE() before calling on fde handler after select() and ↵Stefan Metzmacher2-0/+2
poll() This makes sure we don't preferr events which are at the beginning of the list. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: debug a FATAL message on EBADF from the select backendStefan Metzmacher1-0/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: Fix multiple handler on the same fd bug in the tevent select backend.Jeremy Allison1-2/+6
When we're deciding what handlers to call in the select backend, we didn't take into account the fact that the same fd may have been added into the read FD_SET and the write FD_SET but with different handlers. We must match on both the file descriptor and the flags requested before calling the handler. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-01tevent: revalidate fde->flags after poll()Stefan Metzmacher1-0/+6
This is important to avoid races between threads if the poll_mt backend is used. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: ignore POLLNVAL from poll() and disable the eventStefan Metzmacher1-1/+44
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: traverse the ev->fd_event list instead of the poll_ev->fds arrayStefan Metzmacher1-26/+5
That has the same complexity but simplifies the code. It also seems to fix a real problem, which was found by the following test failure in Samba's autobuild, while removing the epoll support from the "standard" backend. [402/1555 in 19m8s] samba3.raw.composite(plugin_s4_dc) smbtorture 4.1.0pre1-DEVELOPERBUILD Using seed 1361531675 Testing savefile Testing parallel fetchfile with 10 ops waiting for completion maximum runtime exceeded for smbtorture - terminating UNEXPECTED(error): samba3.raw.composite.fetchfile (subunit.RemotedTestCase)(plugin_s4_dc) REASON: _StringException: _StringException: was started but never finished! UNEXPECTED(error): samba3.raw.composite.fetchfile(plugin_s4_dc) (subunit.RemotedTestCase) REASON: was started but never finished! Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: maintain a list of disabled events in the poll backendStefan Metzmacher1-7/+48
We need to avoid passing pollfd.events == 0, to poll(), as it will report POLLERR and POLLHUP events, but our caller does not expect the event handler to be called. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: merge poll_fresh_fde_destructor() into poll_event_fd_destructor()Stefan Metzmacher1-18/+6
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: use tevent_poll_event_add_fd_internal() in poll_event_add_fd()Stefan Metzmacher1-2/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: make sure we cleanup the array passed to poll() after deleting an eventStefan Metzmacher1-0/+30
If we don't cleanup the array passed to poll after an event was deleted, we may pass a bad file descriptor to poll(). This was found by the following test failure in Samba's autobuild, while removing the epoll support from the "standard" backend. [48/1555 in 4m37s] samba3.smbtorture_s3.plain(s3dc).LOCK4 UNEXPECTED(failure): samba3.smbtorture_s3.plain(s3dc).LOCK4.smbtorture(s3dc) REASON: _StringException: _StringException: using seed 1361530718 host=127.0.0.2 share=tmp user=metze myname=sn-devel-104 Running LOCK4 starting locktest4 Failed to create file: NT_STATUS_INVALID_HANDLE finished locktest4 TEST LOCK4 FAILED! LOCK4 took 190.492 secs Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: don't skip a fd event if the previous one was deleted during poll()Stefan Metzmacher1-2/+9
In a threaded environment it can happen that an tevent_fd is talloc_free'ed while the main thread sleeps in the poll() syscall. In such a case poll_event_fd_destructor() would set poll_ev->fdes[i] = NULL. We then skip the removed event, but before we also skipped the one that was located at the end of the array. We moved it to possition 'i', but the next loop uses 'i=i+1'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: remember the errno from select(), poll() and epoll_wait()Stefan Metzmacher3-5/+11
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: add trace points BEFORE_LOOP_ONCE and AFTER_LOOP_ONCEMichael Adam3-0/+18
The define TEVENT_HAS_LOOP_ONCE_TRACE_POINTS can be used to detect the new feature, without writing configure tests. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2013-03-01tevent: fix compiler warning in tevent_context_init_byname()Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: fix some compiler warnings in testsuite.cStefan Metzmacher1-1/+15
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: fix a comment typo in tevent_epoll.cMichael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-01tevent: fix --disable-python cause configure fails (bug #8718)Galen.Liu1-1/+1
When we disable python, it will cause build fail! so, the patch will fix it. Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: define TEVENT_NUM_SIGNALS based on configure checksStefan Metzmacher3-2/+46
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01lib/replace: add AC_CHECK_VALUEOF() macroStefan Metzmacher1-0/+15
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01wafsamba: add CHECK_VALUEOF() helperStefan Metzmacher1-1/+19
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01s3:lib/events: make use of tevent_common_loop_timer_delay()Stefan Metzmacher1-30/+6
This is critical as we also use tevent_common_add_timer(). And if the common code does internal changes, it may affects both tevent_common_add_timer() and tevent_common_loop_timer_delay() together! Without this we rely on a specific behavior and version of tevent. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-02-28Fix bug # 9666 - Broken filtering of link-local addresses.Timur Bakeyev1-13/+15
This patch should address the problem with Link Local addresses on FreeBSD and Linux. Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <rsharpe@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 28 20:56:57 CET 2013 on sn-devel-104
2013-02-28s3:pylibsmb: make sure we get tevent debug messagesStefan Metzmacher1-1/+8
Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Feb 28 14:34:24 CET 2013 on sn-devel-104
2013-02-28s3:lib/events: make use of samba_tevent_set_debug()Stefan Metzmacher1-36/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
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-28lib/util: add samba_tevent_set_debug()Stefan Metzmacher2-1/+14
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-28lib/util: allow samba_tevent_debug() to take a name as contextStefan Metzmacher1-5/+16
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-28auth/pycredentials: 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: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-28s3:lib/events: add missing TEVENT_TRACE_BEFORE/AFTER_WAIT handlingStefan Metzmacher1-0/+6
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-28s3:smbd: fix missing space in debug message in initial_break_processing()Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-02-28build: Do not force a specific perl from ${PERL} when running pod2manAndrew Bartlett1-1/+1
pod2man should have the right #!/usr/bin/perl line already, and forcing it may cause us to use the wrong perl. Essentially treat this like any other system binary, rather than forcing it to use the first perl we found. This essentially reverts e80f576db66ad04592ac436ed74ceb9b96452060. Current SLES11 does not seem to have the issue this was added to address. Andrew Bartlett Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Feb 28 02:14:25 CET 2013 on sn-devel-104
2013-02-28Fix bug #9039 'map untrusted to domain' treats WORKSTATION as bogus domain.Daniel Kobras1-1/+2
s3: never try to map global SAM name Do not treat the global SAM name as a BOGUS domain, and exempt local users from mapping, instead. This change reinstates the exact mapping behaviour of Samba 3.2 if parameter 'map untrusted to domain' is set. Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-27Make sure that domain joins work correctly when the DC disallows NTLM auth.Richard Sharpe2-4/+13
Signed-Off-By: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-By: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Feb 27 21:49:25 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-23Fix bug #9674 - Samba denies owner Read Control when there is a DENY entry ↵Richard Sharpe1-3/+3
while W2K08 does not. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Feb 23 19:28:15 CET 2013 on sn-devel-104
2013-02-22Make systemctl reference indirect in packaging/NetworkManager/30-winbind-systemdAlexander Bokovoy1-4/+4
Some distributions have clever dependency generators when building packages and generate dependencies for each executable called out in shell scripts. The end result is that a package built out of samba would contain explicit dependency to systemd even though it is usable without systemd. Making systemctl reference indirect avoids explicit dependency. Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Fri Feb 22 18:18:20 CET 2013 on sn-devel-104
2013-02-22s3-rpc_server: Make sure that fd is really closed on error.Andreas Schneider1-0/+6
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22lib-util: Don't leak file descriptor on error.Andreas Schneider1-0/+1
Reviewed-by: Alexander Bokovoy <ab@samba.org>