[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9fb98e3 lib/socket: Fix improper use of default interface speed via 8b36428 lib:socket: fix CID 1350009 - illegal memory accesses (BUFFER_SIZE_WARNING) from 92afa1b smbd: Simplify chroot option in smbd https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9fb98e3e056f059e2a5fcdd54a6a0d60ecdb01b7 Author: Anoop C SDate: Thu Feb 11 14:55:55 2016 +0530 lib/socket: Fix improper use of default interface speed _get_interfaces() function from interfaces.c uses if_speed variable to store interface speed and is initialized with a default value at start. But if_speed populated via one iteration for a specific IP address will be treated as the default value for next iteration which is wrong. Therefore change is to move the initialization cum declaration of if_speed inside iteration of IP addresses loop. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11734 Signed-off-by: Anoop C S Reviewed-by: Michael Adam Reviewed-by: Stefan Metzmacher Autobuild-User(master): Michael Adam Autobuild-Date(master): Sat Feb 13 16:22:22 CET 2016 on sn-devel-144 commit 8b36428b195f6e1d1063f1abccb718f2665d271f Author: Michael Adam Date: Wed Feb 3 11:41:23 2016 +0100 lib:socket: fix CID 1350009 - illegal memory accesses (BUFFER_SIZE_WARNING) BUG: https://bugzilla.samba.org/show_bug.cgi?id=11735 Pair-Programmed-With: Guenther Deschner Signed-off-by: Michael Adam Signed-off-by: Guenther Deschner Reviewed-by: Uri Simchoni --- Summary of changes: lib/socket/interfaces.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/lib/socket/interfaces.c b/lib/socket/interfaces.c index cf094f0..2cabf46 100644 --- a/lib/socket/interfaces.c +++ b/lib/socket/interfaces.c @@ -140,6 +140,11 @@ static void query_iface_speed_from_name(const char *name, uint64_t *speed) return; } + if (strlen(name) >= IF_NAMESIZE) { + DBG_ERR("Interface name too long."); + goto done; + } + strncpy(ifr.ifr_name, name, IF_NAMESIZE); ifr.ifr_data = (void *) @@ -184,7 +189,6 @@ static int _get_interfaces(TALLOC_CTX *mem_ctx, struct iface_struct **pifaces) int count; int total = 0; size_t copy_size; - uint64_t if_speed = 1000 * 1000 * 1000; /* 1GBit */ if (getifaddrs() < 0) { return -1; @@ -209,6 +213,7 @@ static int _get_interfaces(TALLOC_CTX *mem_ctx, struct iface_struct **pifaces) /* Loop through interfaces, looking for given IP address */ for (ifptr = iflist; ifptr != NULL; ifptr = ifptr->ifa_next) { + uint64_t if_speed = 1000 * 1000 * 1000; /* 1Gbps */ if (!ifptr->ifa_addr || !ifptr->ifa_netmask) { continue; -- Samba Shared Repository
autobuild[sn-devel-144]: intermittent test failure detected
The autobuild test system (on sn-devel-144) has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey.sn-devel-144/2016-02-13-2211/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey.sn-devel-144/2016-02-13-2211/samba.stderr http://git.samba.org/autobuild.flakey.sn-devel-144/2016-02-13-2211/samba.stdout The top commit at the time of the failure was: commit 9fb98e3e056f059e2a5fcdd54a6a0d60ecdb01b7 Author: Anoop C SDate: Thu Feb 11 14:55:55 2016 +0530 lib/socket: Fix improper use of default interface speed _get_interfaces() function from interfaces.c uses if_speed variable to store interface speed and is initialized with a default value at start. But if_speed populated via one iteration for a specific IP address will be treated as the default value for next iteration which is wrong. Therefore change is to move the initialization cum declaration of if_speed inside iteration of IP addresses loop. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11734 Signed-off-by: Anoop C S Reviewed-by: Michael Adam Reviewed-by: Stefan Metzmacher Autobuild-User(master): Michael Adam Autobuild-Date(master): Sat Feb 13 16:22:22 CET 2016 on sn-devel-144
autobuild[sn-devel-104]: intermittent test failure detected
The autobuild test system (on sn-devel-104) has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-02-14-0214/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-02-14-0214/samba.stderr http://git.samba.org/autobuild.flakey.sn-devel-104/2016-02-14-0214/samba.stdout The top commit at the time of the failure was: commit 9fb98e3e056f059e2a5fcdd54a6a0d60ecdb01b7 Author: Anoop C SDate: Thu Feb 11 14:55:55 2016 +0530 lib/socket: Fix improper use of default interface speed _get_interfaces() function from interfaces.c uses if_speed variable to store interface speed and is initialized with a default value at start. But if_speed populated via one iteration for a specific IP address will be treated as the default value for next iteration which is wrong. Therefore change is to move the initialization cum declaration of if_speed inside iteration of IP addresses loop. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11734 Signed-off-by: Anoop C S Reviewed-by: Michael Adam Reviewed-by: Stefan Metzmacher Autobuild-User(master): Michael Adam Autobuild-Date(master): Sat Feb 13 16:22:22 CET 2016 on sn-devel-144