1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-11 00:23:51 +03:00
Commit Graph

525 Commits

Author SHA1 Message Date
Stefan Metzmacher
89b7955733 libreplace(samba4): let LIBREPLACE depend on LIBREPLACE_NETWORK for now
This should fix the build on solaris.
Later this needs better fixing...

metze
2008-03-28 07:56:20 +01:00
Michael Adam
4ae4692bc6 libreplace: fix coverity ID 517 - untangle close from open in test/os2_delete.c
This is not a proper bug but the code is clearer now
and we are tracking failure of open separate from that of close.

Michael
2008-03-27 11:56:51 +01:00
Michael Adam
2d3c2f34f3 libreplace: replace.c does not need system/network.h anymore.
Michael
2008-03-18 17:50:23 +01:00
Michael Adam
94ac8a25be libreplace: move rep_socketpair() to its own module.
Prototype is now in system/network.h,
implementation in socketpair.c, and
check in socketpair.m4.

Now the last networking function has vanished from replace.c.

Michael
2008-03-18 17:21:18 +01:00
Gerald W. Carter
5757d8dfe9 Fix macro name (no 's' in ifr_addr).
Interface detection on Solaris still failing due to items pointed out here:
http://lists.samba.org/archive/samba-technical/2007-November/056701.html
(cherry picked from commit 37c87acc9d)
2008-03-18 16:40:46 +01:00
Volker Lendecke
effda48a26 Fix Coverity ID 554
(cherry picked from commit 471b1b0c58)
2008-03-18 16:40:46 +01:00
Volker Lendecke
8f58d39c0c Check the return value of fgets
(cherry picked from commit b8aaa9a69f)
2008-03-18 16:40:46 +01:00
Michael Adam
98ee8c8430 libreplace: remove duplicate entry of inet_ntoa from README.
Michael
2008-03-18 16:31:15 +01:00
Michael Adam
1f9ca7eed9 libreplace: remove trailing white spaces.
Michael
2008-03-18 16:30:15 +01:00
Michael Adam
974c0c45ad libreplace: replace inet_ntoa() when it is missing
...not only replace it when it is broken.

This moves the defintion of rep_inet_ntoa from replace.c
to inet_ntoa.c and adds configure checks for existence
of inet_ntoa(). Checks are moved to an include file of its own.

NOTE: The original rep_inet_ntoa in replace.c was wrapped
into a "#ifndef WITH_PTHREADS" but the prototype in replace.h
and the define in system/network.h were not. I removed that
ifndef since the inet_ntoa() function is usually not thread safe
anyways, since it returns a pointer to a static buffer.

So whoever calls inet_ntoa() should be aware that it is not
thread safe anyways.

Michael
2008-03-18 16:30:15 +01:00
Michael Adam
cca5d6626f libreplace: put inet_aton.c under LGPL instead of GPL.
Michael
2008-03-18 16:10:47 +01:00
Stefan Metzmacher
62bb177a6e libreplace: remove unused SOCKET_LIBS and NSL_LIBS
metze
2008-03-18 15:59:23 +01:00
Stefan Metzmacher
79037c3133 libreplace: for samba4 create LIBREPLACE_NETWORK as EXT_LIB
metze
2008-03-18 15:59:22 +01:00
Stefan Metzmacher
cef2e8d748 libreplace: use LIBREPLACE_NETWORK_LIBS within some configure checks
...instead of using SOCKET_LIBS and NSL_LIBS.

metze
2008-03-18 15:59:22 +01:00
Stefan Metzmacher
e7115dcc8a libreplace: combine SOCKET_LIBS and NSL_LIBS to LIBREPLACE_NETWORK_LIBS
But keep the old ones untill the callers are fixed.

metze
2008-03-18 15:59:22 +01:00
Volker Lendecke
842d144b4f Allocate one 0-byte in asprintf replacement when len==0
Some S3 code depends on this.
(cherry picked from commit dc3d5e1645)
2008-03-18 13:48:21 +01:00
Michael Adam
ff3af1703d libreplace: fix samba4 build (by not setting global LIBS).
This corrects the earlier fix of the standalone build, by setting
LIBS to the desired value only in configure.ac but not in getifaddrs.m4.

Not that this changes the standalone build in that it adds these libs
undconditionally and not only if they are needed by the getifaddrs
replacement functions.

Michael
2008-03-14 09:39:58 +01:00
Michael Adam
297c3bece0 libreplace: add -I$libreplacedir to CPPFLAGS for getifaddrs tests.
This is needed, otherwise $libreplacedir/system/network.h does not
find $libreplacedir/getaddrinfo.h on some systems (solaris, e.g.).

Michael
2008-03-14 09:04:25 +01:00
Michael Adam
bcb2f3a880 libreplace: add an inet_aton() function that calls inet_pton().
inet_aton() is even needed inside libreplace, in the implementation
of rep_getaddrinfo().

Michael
2008-03-14 09:02:36 +01:00
Michael Adam
0aff54a12e libreplace: add snprintf.c to test code for getifaddrs - needed on some systems.
Michael
2008-02-29 02:46:14 +01:00
Michael Adam
54cc0df4db libreplace: ifdef out ip6 code if unsupported.
Michael
2008-02-29 02:43:24 +01:00
Michael Adam
0cbb87453b libreplace: fix rep_freeifaddrs to not segfault on NULL input.
Michael
2008-02-29 02:23:29 +01:00
Michael Adam
523626908d libreplace: fix silly crashbug in getifaddrs_test().
Michael
2008-02-29 02:22:02 +01:00
Michael Adam
f8243cfc47 libreplace: add missing newline in output of getifaddrs test.
Michael
2008-02-29 01:49:30 +01:00
Michael Adam
29818a07de libreplace: add missing semicolon to getifaddrs.
Michael
2008-02-29 01:25:58 +01:00
Michael Adam
ee170c85e0 libreplace: try and fix rep_getifaddrs() for Tru64.
Don't fail when there is no address assigned to the interface.
Put NULL into the ifaddrs structure instead.

Michael
2008-02-29 00:06:55 +01:00
Michael Adam
a2a506ff0e libreplace: use the new getifaddrs test also for autoconf.
Michael
2008-02-28 23:01:15 +01:00
Michael Adam
9d2bab09aa libreplace: add extended getifaddrs test that prints out the interfaces.
Michael
2008-02-28 23:01:15 +01:00
Michael Adam
ff311e6132 libreplace: standalone build: use -I$srcdir instead of -I.
Michael
2008-02-27 10:34:09 +01:00
Michael Adam
e7c1d6513b libreplace: fix standalone build - add necessary libs.
The libs needed for getifaddrs replacements have to be added
to LIBS and used for the testsuite target.

Michael
2008-02-27 01:41:30 +01:00
Michael Adam
cd95c702ed libreplace: fix standalone build on some systems.
getifaddr tests include system/network.h, which does not
find getaddrinfo.h without "-I.".

Michael
2008-02-27 01:29:12 +01:00
Michael Adam
900d17acb9 libreplace: Add tests for connect and gethostbyname.
Provide dummy replacements when a function isnt found.
The functions are also searched for in certain libraries,
and variables SOCKET_LIBS and NSL_LIBS are set accordingly.

One purpose of this is to fix the getifaddrs tests on
systems where e.g. the socket calls require special libs
for linking.

Michael
2008-02-26 16:41:09 +01:00
Michael Adam
8a26a6e8f1 Fix build on VOS: socklen_t is needed for rep_inet_ntop: move it up.
Michael
2008-02-26 12:01:39 +01:00
Michael Adam
a83db886e5 libreplace: don't use socketwrapper for getifaddrs() implementations.
Michael
(cherry picked from commit 85eec1d1d6)
2008-02-22 14:33:51 +01:00
Michael Adam
0440bcfe63 libreplace: Fix comment originating from old samba source.
Michael
2008-02-22 10:42:22 +01:00
Michael Adam
e00c6513e0 libreplace: fix creation of conftest files for getifaddrs tests.
Add missing includes of replace.c and defines of SOCKET_WRAPPER_NOT_REPLACE.

Michael
(cherry picked from commit 26e6ebc709)
2008-02-22 00:41:02 +01:00
Michael Adam
744d5ba7ad Fix linked list of ifaddrs in implementations of rep_getifaddrs.
Produce proper list instead of one-node-loop.

Michael
(cherry picked from commit ec9f4f5066)
2008-02-22 00:40:53 +01:00
Michael Adam
5bd613a2cd Add missing initalizations of lastif in rep_getifaddr implementations.
Michael
(cherry picked from commit 65710e752f)
2008-02-22 00:40:33 +01:00
Michael Adam
4da2d999a2 libreplace: fix compile errors in getifaddrs.c
Michael
(cherry picked from commit 22cdd4cb50)
2008-02-21 18:30:22 +01:00
Michael Adam
0d4522a06d Try and fix getifaddrs check on irix: dont't try to include config.h
The missing header file is judged "catastrophic" on irix.

Michael
(cherry picked from commit 5778c90819)
2008-02-21 18:18:11 +01:00
Jelmer Vernooij
53c70b5f77 Support dlopen(NULL, ...) on HPUX. 2008-02-20 20:05:51 +01:00
Michael Adam
83387ecccf libreplace: change samba_cv_ to libreplace_cv_ in libreplace.m4.
Michael
2008-02-20 12:53:20 +01:00
Michael Adam
00c173bfba libreplace: change samba_cv_ to libreplace_cv_ in system/config.m4.
Michael
2008-02-20 12:53:20 +01:00
Michael Adam
d3b3d3ec9f libreplace: change samba_cv_ to libreplace_cv_ in getpass.m4.
Michael
2008-02-20 12:53:20 +01:00
Michael Adam
acab9def2a libreplace: change samba_cv_ to libreplace_cv_ in getifaddrs.m4
Michael
2008-02-20 12:53:19 +01:00
Volker Lendecke
e8f3653414 NetBSD does not support AI_ADDRCONFIG
(cherry picked from commit fb3f7f4046)
2008-02-20 10:21:58 +01:00
Volker Lendecke
4c77550d80 NetBSD needs LD_LIBRARY_PATH
(cherry picked from commit d64b19e77a)
2008-02-20 10:21:57 +01:00
Michael Adam
d10cbb533c Remove relict SAMBA_CONFIGURE_CPPFLAGS from lib/replace.
Michael
2008-02-19 17:25:42 +01:00
Stefan Metzmacher
d2ac8be28d libreplace: getpwent_r/getgrent_r on IRIX are similar to solaris but use size_t
metze
(cherry picked from commit 2f46091511)
2008-01-22 12:24:05 +01:00
Jeremy Allison
9cff25cce1 Fix bug #5121 (unix passwd sync not working on a streams based
system).
Jeremy.

(lib/replace part of 545cd2139c metze)
2008-01-15 14:27:12 +01:00