[SCM] Samba Shared Repository - branch master updated
Andreas Schneider
asn at samba.org
Mon Oct 21 11:49:02 MDT 2013
The branch, master has been updated
via d286b17d idmap_autorid: fix traversal of ranges to correctly exclude mapping records.
via c690988 nsswitch: Fix short writes in winbind_write_sock
from 5ea154b s3-rpc_server: Refactor lsasd_create_sockets().
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d286b17d46984e85418ed4778890948df979a9f6
Author: Michael Adam <obnox at samba.org>
Date: Fri Oct 18 16:26:41 2013 +0200
idmap_autorid: fix traversal of ranges to correctly exclude mapping records.
When listing all ranges with "net idmap get ranges", the database records
of the form "S-1-5-10" --> "GID 100016" were treated here as rangee mapings,
resulting in an faulty printout like this: "RANGE 541346119: S-1-5-10".
This patch fixes this by adding a filter that checks the size of the
value datablob.
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Mon Oct 21 19:48:40 CEST 2013 on sn-devel-104
commit c6909887c26d4e827633acd50b11cf08c6aee0f7
Author: Volker Lendecke <vl at samba.org>
Date: Tue Oct 15 08:23:10 2013 +0000
nsswitch: Fix short writes in winbind_write_sock
We set the socket to nonblocking and don't handle EAGAIN right. We do
a poll anyway, so wait for writability, which should fix this.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10195
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
-----------------------------------------------------------------------
Summary of changes:
nsswitch/wb_common.c | 4 ++--
source3/winbindd/idmap_autorid_tdb.c | 8 ++++++++
2 files changed, 10 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index c56a76f..5fde8d0 100644
--- a/nsswitch/wb_common.c
+++ b/nsswitch/wb_common.c
@@ -395,9 +395,9 @@ static int winbind_write_sock(void *buffer, int count, int recursing,
call would not block by calling poll(). */
pfd.fd = fd;
- pfd.events = POLLIN|POLLHUP;
+ pfd.events = POLLIN|POLLOUT|POLLHUP;
- ret = poll(&pfd, 1, 0);
+ ret = poll(&pfd, 1, -1);
if (ret == -1) {
winbind_close_sock();
return -1; /* poll error */
diff --git a/source3/winbindd/idmap_autorid_tdb.c b/source3/winbindd/idmap_autorid_tdb.c
index bbfa5b0..7d3275e 100644
--- a/source3/winbindd/idmap_autorid_tdb.c
+++ b/source3/winbindd/idmap_autorid_tdb.c
@@ -962,6 +962,14 @@ static int idmap_autorid_visit_domain_range(struct db_record *rec,
}
value = dbwrap_record_get_value(rec);
+
+ if (value.dsize != sizeof(uint32_t)) {
+ /* it might be a mapping of a well known sid */
+ DEBUG(10, ("value size %u != sizeof(uint32_t) for sid '%s', "
+ "skipping.\n", (unsigned)value.dsize, vi->domsid));
+ goto done;
+ }
+
rangenum = IVAL(value.dptr, 0);
db = dbwrap_record_get_db(rec);
--
Samba Shared Repository
More information about the samba-cvs
mailing list