1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

17 Commits

Author SHA1 Message Date
Zentaro Kavanagh
8ec6d8a6f2 Add explicit dependency on samba-debug from libinterfaces and libserverrole.
Currently these dependencies are indirect via a SAMBA_SUBSYSTEM
which does not propagate private library information. This results
in these 2 libraries getting generated with no RPATH information
in the ELF header.

Additional discussion [1].

[1] -
https://lists.samba.org/archive/samba-technical/2017-January/118078.html

Signed-off-by: Zentaro Kavanagh <zentaro@google.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jan 23 08:26:43 CET 2017 on sn-devel-144
2017-01-23 08:26:43 +01:00
Andreas Schneider
383530c164 libsocket: Make sure ifr.ifr_name is null-terminated
Found by Coverity

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Dec  3 03:40:53 CET 2016 on sn-devel-144
2016-12-03 03:40:53 +01:00
Günther Deschner
2e2f81134c lib/socket/interfaces: Fix some uninitialied bytes.
Valgrind reports the following:

==26599== Syscall param ioctl(SIOCETHTOOL) points to uninitialised byte(s)
==26599==    at 0x7014707: ioctl (in /usr/lib64/libc-2.22.so)
==26599==    by 0x79D1585: query_iface_speed_from_name (interfaces.c:152)
==26599==    by 0x79D1BBA: _get_interfaces (interfaces.c:277)
==26599==    by 0x79D1E80: get_interfaces (interfaces.c:368)
==26599==    by 0x508A7E3: load_interfaces (interface.c:612)
==26599==    by 0x150B30: main (net.c:963)
==26599==  Address 0xffefff0d8 is on thread 1's stack
==26599==  in frame #1, created by query_iface_speed_from_name
(interfaces.c:130)
==26599==
==26599== Syscall param ioctl(SIOCETHTOOL) points to uninitialised byte(s)
==26599==    at 0x7014707: ioctl (in /usr/lib64/libc-2.22.so)
==26599==    by 0x79D15CC: query_iface_speed_from_name (interfaces.c:164)
==26599==    by 0x79D1BBA: _get_interfaces (interfaces.c:277)
==26599==    by 0x79D1E80: get_interfaces (interfaces.c:368)
==26599==    by 0x508A7E3: load_interfaces (interface.c:612)
==26599==    by 0x150B30: main (net.c:963)
==26599==  Address 0xffefff0d8 is on thread 1's stack
==26599==  in frame #1, created by query_iface_speed_from_name
(interfaces.c:130)

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-12 06:24:24 +01:00
Anoop C S
9fb98e3e05 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 <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sat Feb 13 16:22:22 CET 2016 on sn-devel-144
2016-02-13 16:22:22 +01:00
Michael Adam
8b36428b19 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 <gd@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-02-13 13:14:13 +01:00
Michael Adam
498383afef lib:socket: fix CID 1350010 - integer OVERFLOW_BEFORE_WIDEN
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Feb  4 00:35:11 CET 2016 on sn-devel-144
2016-02-04 00:35:10 +01:00
Anoop C S
549a9abc7e lib:socket: detect link speed with ethtool ioctl in get_interfaces (on linux)
Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-01-26 07:33:16 +01:00
Michael Adam
1862aa6c25 build: detect support for ethtool
Pair-Programmed-With: Anoop C S <anoopcs@redhat.com>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-01-26 07:33:16 +01:00
Michael Adam
64be8e73ff lib:socket: set defaults for linkspeed and capability in get_interfaces()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-01-26 07:33:16 +01:00
Michael Adam
235f37baa7 lib:socket: get interface index from kernel
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-01-26 07:33:16 +01:00
Michael Adam
d392e0a66d lib:socket: add linkspeed, capability and if_index to iface_struct
Pair-Programmed-With: Anoop C S <anoopcs@redhat.com>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-01-26 07:33:16 +01:00
Timur Bakeyev
8ac431a22e Fix bug # 9666 - Broken filtering of link-local addresses.
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-28 20:56:57 +01:00
Jeremy Allison
5df1c11539 Start to add truncate checks on all uses of strlcpy(). Reading lwn
has it's uses :-).

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 29 20:48:15 CEST 2012 on sn-devel-104
2012-03-29 20:48:15 +02:00
Jeremy Allison
744dd6bcbe Fix const warnings. 2011-10-14 13:48:53 -07:00
Matthieu Patou
abe5afc580 Fix bug with Samba not recognising an 6to4 IPv6 interface.
"The 6to4 interface has the flags IFF_POINTTOPOINT interface but no
ifa_dstaddr as it's not at the IPv6 level a point to point interface
(at least from my understanding), as we don't have a IFF_BROADCAST
flag set (I have the impression that this flag is only set on a
interface that has also an IPv4 address) the first test is not valid
also, which result in a skipped interface."
2011-10-14 13:45:48 -07:00
Andrew Bartlett
8a07ec7bab lib/socket: Remove outdated comment
The autoconf and waf tests for interfaces logic are in libreplace now.
2011-05-08 12:57:04 +02:00
Andrew Bartlett
f346a73785 lib/socket move interfaces code to the top level 2011-05-08 12:57:04 +02:00