metze/samba/wip.git
11 years agoTODO: Regression test to ensure that a tevent backend can cope with separate read...
Jeremy Allison [Thu, 14 Feb 2013 22:16:31 +0000 (14:16 -0800)]
TODO: Regression test to ensure that a tevent backend can cope with separate read/write events on a single fd.

This tests the multiplex fd changes to the epoll backend to
ensure they work correctly.

Signed-off-by: Jeremy Allison <jra@samba.org>
TODO: why (fde_wcount - fde_count < 256) ???
      if we get TEVENT_FD_WRITE we should not block
      we should also not read if we don't get TEVENT_FD_READ,
      because this will block

11 years agotevent: If epoll_ctl(..EPOLL_CTL_ADD,..) failes with EEXIST, merge the two fde's...
Jeremy Allison [Thu, 14 Feb 2013 21:52:41 +0000 (13:52 -0800)]
tevent: If epoll_ctl(..EPOLL_CTL_ADD,..) failes with EEXIST, merge the two fde's into one epoll event.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: preferr the write handler in there're two possible handlers registered with...
Stefan Metzmacher [Wed, 20 Feb 2013 10:50:56 +0000 (11:50 +0100)]
tevent: preferr the write handler in there're two possible handlers registered with epoll

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: In epoll_event_loop() ensure we trigger the right handler for a multiplexed...
Stefan Metzmacher [Wed, 20 Feb 2013 13:49:17 +0000 (14:49 +0100)]
tevent: In epoll_event_loop() ensure we trigger the right handler for a multiplexed fde event.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: Add utility function epoll_handle_hup_or_err()
Jeremy Allison [Thu, 14 Feb 2013 23:53:38 +0000 (15:53 -0800)]
tevent: Add utility function epoll_handle_hup_or_err()

We'll use this to handle the EPOLL_ADDITIONAL_FD_FLAG_GOT_ERROR
and EPOLL_ADDITIONAL_FD_FLAG_REPORT_ERROR flags with multiplexed
events in the event loop.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: handle EPOLL_ADDITIONAL_FD_FLAG_HAS_MPX in epoll_update_event()
Stefan Metzmacher [Wed, 20 Feb 2013 16:17:31 +0000 (17:17 +0100)]
tevent: handle EPOLL_ADDITIONAL_FD_FLAG_HAS_MPX in epoll_update_event()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: handle multiplexed fde's in epoll_event_fd_destructor()
Stefan Metzmacher [Wed, 20 Feb 2013 17:01:57 +0000 (18:01 +0100)]
tevent: handle multiplexed fde's in epoll_event_fd_destructor()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: Fix epoll_mod_event() to cope with modifying a multiplexed fde event.
Jeremy Allison [Thu, 14 Feb 2013 22:14:50 +0000 (14:14 -0800)]
tevent: Fix epoll_mod_event() to cope with modifying a multiplexed fde event.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: Fix up epoll_del_event to cope with deleting a multiplexed fde event.
Jeremy Allison [Fri, 15 Feb 2013 18:16:44 +0000 (10:16 -0800)]
tevent: Fix up epoll_del_event to cope with deleting a multiplexed fde event.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: handle multiplexed fde's in epoll_add_event()
Stefan Metzmacher [Wed, 20 Feb 2013 16:14:52 +0000 (17:14 +0100)]
tevent: handle multiplexed fde's in epoll_add_event()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: Start to fix the epoll backend to support 2 fd events on the same fd correctly.
Jeremy Allison [Thu, 14 Feb 2013 21:50:56 +0000 (13:50 -0800)]
tevent: Start to fix the epoll backend to support 2 fd events on the same fd correctly.

Add a utility function epoll_add_multiplex_fd() and
a new flag EPOLL_ADDITIONAL_FD_FLAG_HAS_MPX.

This will be called by epoll_add_event() to merge two
fde events with the same file descriptor.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoRevert "HACK tevent_standard no fallback"
Stefan Metzmacher [Wed, 20 Feb 2013 15:45:47 +0000 (16:45 +0100)]
Revert "HACK tevent_standard no fallback"

This reverts commit 6597a8f6fc9870cd02aa0650f4a0e3453d49f4cd.

11 years agoHACK tevent_standard no fallback
Stefan Metzmacher [Wed, 20 Feb 2013 15:45:29 +0000 (16:45 +0100)]
HACK tevent_standard no fallback

11 years agoTODO-TESTING tevent: ignore EBADF from EPOLL_CTL_ADD/MOD
Stefan Metzmacher [Wed, 20 Feb 2013 12:34:07 +0000 (13:34 +0100)]
TODO-TESTING tevent: ignore EBADF from EPOLL_CTL_ADD/MOD

11 years agoRevert "HACK tevent_standard no fallback"
Stefan Metzmacher [Wed, 20 Feb 2013 15:45:47 +0000 (16:45 +0100)]
Revert "HACK tevent_standard no fallback"

This reverts commit 6597a8f6fc9870cd02aa0650f4a0e3453d49f4cd.

11 years agoHACK tevent_standard no fallback
Stefan Metzmacher [Wed, 20 Feb 2013 15:45:29 +0000 (16:45 +0100)]
HACK tevent_standard no fallback

11 years agoTODO-TESTING tevent: ignore EBADF from EPOLL_CTL_DEL
Stefan Metzmacher [Wed, 20 Feb 2013 12:33:19 +0000 (13:33 +0100)]
TODO-TESTING tevent: ignore EBADF from EPOLL_CTL_DEL

11 years agoRevert "HACK tevent_standard no fallback"
Stefan Metzmacher [Wed, 20 Feb 2013 15:45:47 +0000 (16:45 +0100)]
Revert "HACK tevent_standard no fallback"

This reverts commit 6597a8f6fc9870cd02aa0650f4a0e3453d49f4cd.

11 years agoHACK tevent_standard no fallback
Stefan Metzmacher [Wed, 20 Feb 2013 15:45:29 +0000 (16:45 +0100)]
HACK tevent_standard no fallback

11 years agotevent: unify handling of HAS_EVENT and REPORT_ERROR in epoll_{add,mod,del}_event()
Stefan Metzmacher [Wed, 20 Feb 2013 16:38:10 +0000 (17:38 +0100)]
tevent: unify handling of HAS_EVENT and REPORT_ERROR in epoll_{add,mod,del}_event()

epoll_{add,mod,del}_event() are only called via epoll_update_event()
and epoll_update_event() should not remove REPORT_ERROR itself.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: always go through epoll_change_event()
Stefan Metzmacher [Wed, 20 Feb 2013 10:26:00 +0000 (11:26 +0100)]
tevent: always go through epoll_change_event()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: s/epoll_change_event/epoll_update_event
Stefan Metzmacher [Wed, 20 Feb 2013 11:55:11 +0000 (12:55 +0100)]
tevent: s/epoll_change_event/epoll_update_event

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: the content of event is ignored by EPOLL_CTL_DEL
Stefan Metzmacher [Wed, 20 Feb 2013 16:15:52 +0000 (17:15 +0100)]
tevent: the content of event is ignored by EPOLL_CTL_DEL

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: use helper variables to hold the epoll_ctl() result
Stefan Metzmacher [Wed, 20 Feb 2013 12:12:27 +0000 (13:12 +0100)]
tevent: use helper variables to hold the epoll_ctl() result

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: remove unused if (epoll_ev->epoll_fd == -1) return; checks
Stefan Metzmacher [Wed, 20 Feb 2013 12:07:34 +0000 (13:07 +0100)]
tevent: remove unused if (epoll_ev->epoll_fd == -1) return; checks

We'll never leave epoll_check_reopen() with epoll_fd == -1.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: add std_event_loop_wait()
Stefan Metzmacher [Sun, 17 Feb 2013 15:41:41 +0000 (16:41 +0100)]
tevent: add std_event_loop_wait()

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>
11 years agotevent: don't call TALLOC_FREE(ev->additional_data) in std_fallback_to_poll()
Stefan Metzmacher [Sun, 17 Feb 2013 15:40:20 +0000 (16:40 +0100)]
tevent: don't call TALLOC_FREE(ev->additional_data) in std_fallback_to_poll()

The epoll backend has done the cleanup already.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: avoid any operation on epoll_ev after a epoll_panic()
Stefan Metzmacher [Fri, 15 Feb 2013 15:33:56 +0000 (16:33 +0100)]
tevent: avoid any operation on epoll_ev after a epoll_panic()

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>
11 years agotevent: add epoll_{create,ctl}_panic_fallback() for testing
Stefan Metzmacher [Fri, 15 Feb 2013 11:10:26 +0000 (12:10 +0100)]
tevent: add epoll_{create,ctl}_panic_fallback() for testing

This makes sure we only do random panics if a fallback handler
is registered.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: call epoll_panic() if EPOLL_CTL_DEL failed
Stefan Metzmacher [Fri, 15 Feb 2013 09:31:36 +0000 (10:31 +0100)]
tevent: call epoll_panic() if EPOLL_CTL_DEL failed

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: optimize adding new timer events
Stefan Metzmacher [Fri, 22 Feb 2013 11:45:39 +0000 (12:45 +0100)]
tevent: optimize adding new timer events

There're two cases:

1. Adding a timer with a zero timestamp.
   Such events were used before we had immediate events.
   It's likely that there're a lot of this events
   and we need to add new ones in fifo order.

2. Adding a timer with a real timestamp.
   As this timestamps typically get higher:-)
   it's better to traverse the existing list from
   the tail.

This is not completely optimal, but it should be better
than before.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: use DLIST_DEMOTE() before calling on fde handler after select() and poll()
Stefan Metzmacher [Thu, 21 Feb 2013 14:44:30 +0000 (15:44 +0100)]
tevent: use DLIST_DEMOTE() before calling on fde handler after select() and 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>
11 years agotevent: detect bad file descriptors reported via POLLNVAL
Stefan Metzmacher [Fri, 22 Feb 2013 20:45:11 +0000 (21:45 +0100)]
tevent: detect bad file descriptors reported via POLLNVAL

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: traverse the ev->fd_event list instead of the poll_ev->fds array
Stefan Metzmacher [Thu, 21 Feb 2013 14:41:17 +0000 (15:41 +0100)]
tevent: traverse the ev->fd_event list instead of the poll_ev->fds array

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>
11 years agotevent: make sure we cleanup the array passed to poll() after deleting an event
Stefan Metzmacher [Thu, 21 Feb 2013 13:41:24 +0000 (14:41 +0100)]
tevent: make sure we cleanup the array passed to poll() after deleting an event

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>
11 years agotevent: don't skip a fd event if the previous one was deleted during poll()
Stefan Metzmacher [Sun, 17 Feb 2013 22:21:28 +0000 (23:21 +0100)]
tevent: don't skip a fd event if the previous one was deleted during poll()

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>
11 years agotevent: remember the errno from select(), poll() and epoll_wait()
Stefan Metzmacher [Fri, 15 Feb 2013 10:24:59 +0000 (11:24 +0100)]
tevent: remember the errno from select(), poll() and epoll_wait()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: fix compiler warning in tevent_context_init_byname()
Stefan Metzmacher [Sun, 17 Feb 2013 15:36:25 +0000 (16:36 +0100)]
tevent: fix compiler warning in tevent_context_init_byname()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: fix some compiler warnings in testsuite.c
Stefan Metzmacher [Fri, 22 Feb 2013 20:48:11 +0000 (21:48 +0100)]
tevent: fix some compiler warnings in testsuite.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: fix --disable-python cause configure fails (bug #8718)
Galen.Liu [Mon, 4 Feb 2013 06:43:01 +0000 (07:43 +0100)]
tevent: fix --disable-python cause configure fails (bug #8718)

When we disable python, it will cause build fail!
so, the patch will fix it.

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotevent: define TEVENT_NUM_SIGNALS based on configure checks
Stefan Metzmacher [Fri, 22 Feb 2013 13:26:16 +0000 (14:26 +0100)]
tevent: define TEVENT_NUM_SIGNALS based on configure checks

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agolib/replace: add AC_CHECK_VALUEOF() macro
Stefan Metzmacher [Fri, 22 Feb 2013 13:53:07 +0000 (14:53 +0100)]
lib/replace: add AC_CHECK_VALUEOF() macro

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agowafsamba: add CHECK_VALUEOF() helper
Stefan Metzmacher [Fri, 22 Feb 2013 13:20:07 +0000 (14:20 +0100)]
wafsamba: add CHECK_VALUEOF() helper

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:pylibsmb: make sure we get tevent debug messages
Stefan Metzmacher [Thu, 21 Feb 2013 07:29:18 +0000 (08:29 +0100)]
s3:pylibsmb: make sure we get tevent debug messages

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:lib/events: make use of samba_tevent_set_debug()
Stefan Metzmacher [Thu, 21 Feb 2013 07:39:05 +0000 (08:39 +0100)]
s3:lib/events: make use of samba_tevent_set_debug()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos4:lib/events: make use of samba_tevent_set_debug()
Stefan Metzmacher [Thu, 21 Feb 2013 07:35:50 +0000 (08:35 +0100)]
s4:lib/events: make use of samba_tevent_set_debug()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agolib/util: add samba_tevent_set_debug()
Stefan Metzmacher [Thu, 21 Feb 2013 08:00:56 +0000 (09:00 +0100)]
lib/util: add samba_tevent_set_debug()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agolib/util: allow samba_tevent_debug() to take a name as context
Stefan Metzmacher [Thu, 21 Feb 2013 07:23:42 +0000 (08:23 +0100)]
lib/util: allow samba_tevent_debug() to take a name as context

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agoauth/pycredentials: make use of samba_tevent_context_init()
Stefan Metzmacher [Thu, 21 Feb 2013 07:32:35 +0000 (08:32 +0100)]
auth/pycredentials: make use of samba_tevent_context_init()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos4:pyregistry: make use of samba_tevent_context_init()
Stefan Metzmacher [Thu, 21 Feb 2013 07:31:41 +0000 (08:31 +0100)]
s4:pyregistry: make use of samba_tevent_context_init()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos4:pygensec: make use of samba_tevent_context_init()
Stefan Metzmacher [Thu, 21 Feb 2013 07:30:51 +0000 (08:30 +0100)]
s4:pygensec: make use of samba_tevent_context_init()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agoFix bug #9674 - Samba denies owner Read Control when there is a DENY entry while...
Richard Sharpe [Sat, 23 Feb 2013 16:41:27 +0000 (08:41 -0800)]
Fix bug #9674 - Samba denies owner Read Control when there is a DENY entry 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

11 years agoMake systemctl reference indirect in packaging/NetworkManager/30-winbind-systemd
Alexander Bokovoy [Fri, 22 Feb 2013 10:07:19 +0000 (12:07 +0200)]
Make systemctl reference indirect in packaging/NetworkManager/30-winbind-systemd

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

11 years agos3-rpc_server: Make sure that fd is really closed on error.
Andreas Schneider [Wed, 20 Feb 2013 09:52:37 +0000 (10:52 +0100)]
s3-rpc_server: Make sure that fd is really closed on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agolib-util: Don't leak file descriptor on error.
Andreas Schneider [Wed, 20 Feb 2013 09:48:05 +0000 (10:48 +0100)]
lib-util: Don't leak file descriptor on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos3-vfs: Don't leak file descriptor on error.
Andreas Schneider [Wed, 20 Feb 2013 09:45:06 +0000 (10:45 +0100)]
s3-vfs: Don't leak file descriptor on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos4-lib: Don't leak plugin handle on error.
Andreas Schneider [Wed, 20 Feb 2013 09:42:54 +0000 (10:42 +0100)]
s4-lib: Don't leak plugin handle on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos3-libsmb: Don't leak memory on error.
Andreas Schneider [Wed, 20 Feb 2013 09:38:13 +0000 (10:38 +0100)]
s3-libsmb: Don't leak memory on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agondrdump: Don't leak plugin handle on error.
Andreas Schneider [Wed, 20 Feb 2013 09:36:52 +0000 (10:36 +0100)]
ndrdump: Don't leak plugin handle on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agosmbpasswd: Don't leak memory.
Andreas Schneider [Wed, 20 Feb 2013 09:25:55 +0000 (10:25 +0100)]
smbpasswd: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agosmbget: Fix file descriptor leak.
Andreas Schneider [Wed, 20 Feb 2013 09:23:45 +0000 (10:23 +0100)]
smbget: Fix file descriptor leak.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos4-policy: Fix memory leaks in push_recursive().
Andreas Schneider [Wed, 20 Feb 2013 09:22:00 +0000 (10:22 +0100)]
s4-policy: Fix memory leaks in push_recursive().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos4-cifsdd: Don't leak memory.
Andreas Schneider [Wed, 20 Feb 2013 09:09:20 +0000 (10:09 +0100)]
s4-cifsdd: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos4-registry: Don't leak file descriptor.
Andreas Schneider [Wed, 20 Feb 2013 09:10:15 +0000 (10:10 +0100)]
s4-registry: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos4-registry: Don't leak memory on error.
Andreas Schneider [Wed, 20 Feb 2013 09:03:13 +0000 (10:03 +0100)]
s4-registry: Don't leak memory on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agowinbind: Don't leak centry memory.
Andreas Schneider [Wed, 20 Feb 2013 08:51:43 +0000 (09:51 +0100)]
winbind: Don't leak centry memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos4-client: Don't leak memory.
Andreas Schneider [Wed, 20 Feb 2013 08:48:59 +0000 (09:48 +0100)]
s4-client: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos3-torture: Don't leak memory.
Andreas Schneider [Wed, 20 Feb 2013 08:47:19 +0000 (09:47 +0100)]
s3-torture: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agowbinfo: Fix several memory leaks.
Andreas Schneider [Wed, 20 Feb 2013 08:43:44 +0000 (09:43 +0100)]
wbinfo: Fix several memory leaks.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agowinbind: Don't leak memory on return.
Andreas Schneider [Wed, 20 Feb 2013 08:41:55 +0000 (09:41 +0100)]
winbind: Don't leak memory on return.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos3-smbd: Don't leak subcntarr array.
Andreas Schneider [Wed, 20 Feb 2013 08:31:17 +0000 (09:31 +0100)]
s3-smbd: Don't leak subcntarr array.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agotorture: Don't leak file resource handle in spoolss test.
Andreas Schneider [Wed, 20 Feb 2013 08:26:02 +0000 (09:26 +0100)]
torture: Don't leak file resource handle in spoolss test.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos3-vfs: Don't leak file descriptor.
Andreas Schneider [Wed, 20 Feb 2013 08:16:25 +0000 (09:16 +0100)]
s3-vfs: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos3-param: Don't leak file descriptor.
Andreas Schneider [Wed, 20 Feb 2013 08:15:26 +0000 (09:15 +0100)]
s3-param: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos3-lsasd: Don't leak file descriptors.
Andreas Schneider [Wed, 20 Feb 2013 08:11:48 +0000 (09:11 +0100)]
s3-lsasd: Don't leak file descriptors.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos3-spoolss: Don't leak memory.
Andreas Schneider [Wed, 20 Feb 2013 08:06:51 +0000 (09:06 +0100)]
s3-spoolss: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos3-net: Don't leak username.
Andreas Schneider [Wed, 20 Feb 2013 08:03:17 +0000 (09:03 +0100)]
s3-net: Don't leak username.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos4-client: Don't leak file descriptor.
Andreas Schneider [Wed, 20 Feb 2013 08:23:37 +0000 (09:23 +0100)]
s4-client: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos4-client: Don't leak resource handle.
Andreas Schneider [Wed, 20 Feb 2013 07:58:02 +0000 (08:58 +0100)]
s4-client: Don't leak resource handle.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agotorture: Make sure we don't overrun the buffer.
Andreas Schneider [Tue, 19 Feb 2013 17:19:12 +0000 (18:19 +0100)]
torture: Make sure we don't overrun the buffer.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agotorture: Fix memcmp of short buffer.
Andreas Schneider [Tue, 19 Feb 2013 15:02:01 +0000 (16:02 +0100)]
torture: Fix memcmp of short buffer.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agotorture: Fix array access in spoolss test.
Andreas Schneider [Tue, 19 Feb 2013 08:32:30 +0000 (09:32 +0100)]
torture: Fix array access in spoolss test.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agopdb: Fix array overrun by one.
Andreas Schneider [Tue, 19 Feb 2013 08:23:53 +0000 (09:23 +0100)]
pdb: Fix array overrun by one.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos4-libcli: Check return value of smbcli_request_setup().
Andreas Schneider [Tue, 19 Feb 2013 08:00:51 +0000 (09:00 +0100)]
s4-libcli: Check return value of smbcli_request_setup().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agopyauth: Check return value of lpcfg_from_py_object().
Andreas Schneider [Tue, 19 Feb 2013 07:58:00 +0000 (08:58 +0100)]
pyauth: Check return value of lpcfg_from_py_object().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agondrdump: Check return value of ndr_pull_init_blob().
Andreas Schneider [Tue, 19 Feb 2013 07:56:22 +0000 (08:56 +0100)]
ndrdump: Check return value of ndr_pull_init_blob().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos4-libcli: Check return code of smbcli_request_setup().
Andreas Schneider [Mon, 18 Feb 2013 17:00:38 +0000 (18:00 +0100)]
s4-libcli: Check return code of smbcli_request_setup().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agolibrpc: Add NULL check for ndr functions for epm bindings.
Andreas Schneider [Mon, 18 Feb 2013 16:32:28 +0000 (17:32 +0100)]
librpc: Add NULL check for ndr functions for epm bindings.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos3-tldap: Make sure we don't deref a null pointer.
Andreas Schneider [Mon, 18 Feb 2013 16:30:19 +0000 (17:30 +0100)]
s3-tldap: Make sure we don't deref a null pointer.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agos4-libcli: Add null check for ndr functions in rap.
Andreas Schneider [Mon, 18 Feb 2013 16:26:14 +0000 (17:26 +0100)]
s4-libcli: Add null check for ndr functions in rap.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agonmbd: Fix request data data processing.
Andreas Schneider [Mon, 18 Feb 2013 16:21:31 +0000 (17:21 +0100)]
nmbd: Fix request data data processing.

answers->rdata is an array and will never be NULL.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agotorture: Fix samsync domain_name checks.
Andreas Schneider [Mon, 18 Feb 2013 16:17:19 +0000 (17:17 +0100)]
torture: Fix samsync domain_name checks.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agolibsmb: Fix possible null pointer dereference.
Andreas Schneider [Mon, 18 Feb 2013 16:11:15 +0000 (17:11 +0100)]
libsmb: Fix possible null pointer dereference.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agondr: Comparing an array to null is always true.
Andreas Schneider [Mon, 18 Feb 2013 16:08:21 +0000 (17:08 +0100)]
ndr: Comparing an array to null is always true.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agowinbind: Correctly cast name to messaging_send_buf().
Andreas Schneider [Mon, 18 Feb 2013 15:24:38 +0000 (16:24 +0100)]
winbind: Correctly cast name to messaging_send_buf().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agowinbind: Use uint8_t type and use const where needed.
Andreas Schneider [Mon, 18 Feb 2013 14:48:24 +0000 (15:48 +0100)]
winbind: Use uint8_t type and use const where needed.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agomessages: Use uint8_t type.
Andreas Schneider [Mon, 18 Feb 2013 14:46:52 +0000 (15:46 +0100)]
messages: Use uint8_t type.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agowinbind: Make domain_name const in wcache_ndr_key().
Andreas Schneider [Mon, 18 Feb 2013 14:44:20 +0000 (15:44 +0100)]
winbind: Make domain_name const in wcache_ndr_key().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
11 years agobuild: use -fstack-protector if available
Björn Jacke [Tue, 19 Feb 2013 18:09:25 +0000 (19:09 +0100)]
build: use -fstack-protector if available

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Matthieu Patou <mat@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Feb 22 15:38:21 CET 2013 on sn-devel-104

11 years agoRevert "wafbuild: use -Wstack-protector if available"
Björn Jacke [Tue, 19 Feb 2013 18:07:34 +0000 (19:07 +0100)]
Revert "wafbuild: use -Wstack-protector if available"

This reverts commit e6643fbf48afccd0acedb65fbe24d3ce84d44c40.

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Matthieu Patou <mat@samba.org>