summaryrefslogtreecommitdiffstats
path: root/lib/replace
Commit message (Collapse)AuthorAgeFilesLines
* lib: Fix CID 1034840 Resource leakVolker Lendecke2015-03-101-0/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* lib: Fix CID 1034839 Resource leakVolker Lendecke2015-03-101-0/+7
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* lib: Fix CID 1034838 Resource leakVolker Lendecke2015-03-101-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* libreplace: Fix CID 1034926 Destination buffer too smallVolker Lendecke2015-03-101-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* Add Solaris ports as a tevent backend.Jeremy Allison2015-02-152-0/+9
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Sun Feb 15 23:25:07 CET 2015 on sn-devel-104
* snprintf: Try to support %jVolker Lendecke2015-02-121-0/+4
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 12 23:34:33 CET 2015 on sn-devel-104
* wafsamba: move -fvisibility=hidden checks from lib/replace to wafsambaStefan Metzmacher2015-01-081-7/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: move '-fstack-protector' checks from lib/replace to wafsambaStefan Metzmacher2015-01-081-4/+0
| | | | | | | | | | | This moves the check to the end of the configure run, which means we no longer use this on configure checks, but only for the real build. This behavior is similar than our developer cflags. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: move WERROR_CFLAGS checks from lib/replace to wafsambaStefan Metzmacher2015-01-081-13/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* wafsamba: move compiler / cflags related stuff from lib/replace to wafsambaStefan Metzmacher2015-01-081-21/+0
| | | | | | | We should have this just in one central place. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* Don't use a nested function when testing for visibility attribute support.Jelmer Vernooij2014-11-101-2/+2
| | | | | | | | | | | | | | | Some compilers support __attribute__((visibility)), but not nested functions (e.g. http://www.cprover.org/goto-cc/) Change-Id: I01a5dd6f5f913664621c4090e2dca177527436bb Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749983 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749985 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749986 Signed-Off-By: Jelmer Vernooij <jelmer@debian.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Nov 10 08:29:19 CET 2014 on sn-devel-104
* replace: Fix includes of unistd.hMartin Schwenke2014-09-193-4/+9
| | | | | | | | This should always be conditional. system/passwd.h wants it too so that uid_t is defined. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* replace: Make EWOULDBLOCK always availableVolker Lendecke2014-09-172-0/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Look for system setproctitle before trying -lbsd.Jelmer Vernooij2014-08-311-2/+2
| | | | | | Change-Id: I390c186d7c1400287c6a18909a5d6587f2052243 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* replace: remove tabs.Jelmer Vernooij2014-08-311-4/+4
| | | | | | Change-Id: Ie87f3c8a60f6292b7d2302425c946f5befaf5fcc Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* replace: remove unused and duplicate imports.Jelmer Vernooij2014-08-311-2/+2
| | | | | | Change-Id: I6cfd2cf80efe19fa31bcd6b3881a1eb01f05d1b4 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* replace: Remove unused item returned by FAILED()Martin Schwenke2014-08-201-1/+1
| | | | | | | | | | | | | | | | | | The (return) value of FAILED() is a constant 1. However, it is never used, so the compiler complains when run with -Wall: lib/replace/test/os2_delete.c: In function ‘cleanup’: lib/replace/test/os2_delete.c:39:163: warning: right-hand operand of comma expression has no effect [-Wunused-value] FAILED("system"); So just get remove the ", 1" since it is the bit that does nothing and is never used. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Wed Aug 20 16:54:31 CEST 2014 on sn-devel-104
* replace:build: improve detection of srcdirMichael Adam2014-06-201-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* lib: tevent: make TEVENT_SIG_INCREMENT atomic.Jeremy Allison2014-06-072-0/+30
| | | | | | | | | | | | | | | | | | | | | | | On arm platforms incrementing a variable is not an atomic operation, so may be interrupted by signal processing (if a signal interrupts another signal handler). Use compiler built-ins to make this atomic. __sync_fetch_and_add() works on gcc, llvm, IBM xlC on AIX, and Intel icc (10.1 and above). atomic_add_32() works on Oracle Solaris. Based on an inital patch from kamei@osstech.co.jp. Bug #10640 - smbd is not responding - tevent_common_signal_handler() increments non-atomic variables https://bugzilla.samba.org/show_bug.cgi?id=10640 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* libreplace: Define PTHREAD_MUTEX_ROBUST along with pthread_mutexattr_setrobustVolker Lendecke2014-05-221-0/+8
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace-waf: Only check for _np functions if standard functions are not ↵Volker Lendecke2014-05-221-8/+14
| | | | | | | | available Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace: Add support for pthread_mutex_consistentVolker Lendecke2014-05-222-2/+17
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace: Add support for pthread_mutexattr_setrobustVolker Lendecke2014-05-222-0/+49
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace: only add PTHREAD CFLAGS and LDFLAGS globally if asked forStefan Metzmacher2014-05-221-2/+3
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace: Move thread checks from source3/wscriptVolker Lendecke2014-05-221-0/+32
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Remove special socket_wrapper code.Andreas Schneider2014-04-173-13/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* replace: Add socket_wrapper_enabled().Andreas Schneider2014-04-172-0/+6
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Remove special nss_wrapper codeAndreas Schneider2014-04-172-13/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* replace: Add nss_wrapper_hosts_enabled().Andreas Schneider2014-04-172-0/+6
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* replace: Add nss_wrapper_enabled().Andreas Schneider2014-04-172-0/+6
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Remove uid_wrapper related code.Andreas Schneider2014-04-171-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib: Change uid_wrapper to preloadable version.Andreas Schneider2014-04-173-33/+0
| | | | | | | This imports version 1.0.1 of uid_wrapper. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* replace: Add uid_wrapper_enabled().Andreas Schneider2014-04-173-0/+34
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* auth: Remove plaintext OSF1 password supportAndrew Bartlett2014-04-151-3/+0
| | | | | | | | The WAF build does not have the code to detect getprpwnam on which this is based, and so this is dead code. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf:lib/replace fix iconv checks on HP/UXChristian Ambach2014-02-131-1/+1
| | | | | | | | | | | | | | | | | we need to copy away the list of LDFLAGS to be tried before modifying it instead of just creating a new reference and then continuing with a modified list while it should have been reset back to the original value Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Feb 13 02:01:03 CET 2014 on sn-devel-104
* libreplace: free() deals fine with NULL pointersVolker Lendecke2014-01-241-6/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* waf:lib/replace gettext configure checksChristian Ambach2014-01-171-0/+9
| | | | | | | | | | | | | Make sure we only try to work with gettext if we found the prototypes and were able to link Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Fri Jan 17 19:30:33 CET 2014 on sn-devel-104
* waf:lib/replace fix gettext detectionChristian Ambach2014-01-031-0/+7
| | | | | | | | | | if the user has specified a path for gettext, add it to CFLAGS and LDFLAGS so we can find it during configure and build Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf:lib/replace change detection of gettextChristian Ambach2014-01-031-4/+5
| | | | | | | | | | | | convert this to an automatic check: if no option is given, try to find gettext and if found, use it if user has specified --with-gettext, then bail out if it could not be found in case of --without-gettext, skip all gettext related configure checks Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf:lib/replace fix up libintl related checksChristian Ambach2014-01-031-0/+1
| | | | | | | | | | | | on a default installation of AIX, libintl.a exists but libintl.h does not So check for the declarations of those functions as well to make sure that the build works. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf:lib/replace correct detection of libiconvChristian Ambach2014-01-031-1/+1
| | | | | | | | | | add -liconv as a complete command line argument, not all characters on their own Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf: Fix the FreeBSD build with libinotifyVolker Lendecke2014-01-061-1/+5
| | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jan 6 19:50:22 CET 2014 on sn-devel-104
* lib/replace remove orphaned codeChristian Ambach2013-12-042-349/+0
| | | | | | | | | | this is not compiled and used anymore Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Wed Dec 4 22:55:12 CET 2013 on sn-devel-104
* replace: fix typo in variable nameDavid Disseldorp2013-11-281-1/+1
| | | | | | | | | | | 13550a2b5eed57084a5d9671d9493a9a2e08d7e3 added a typo causing compilation failure. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Thu Nov 28 18:16:27 CET 2013 on sn-devel-104
* replace: Don't run over dst in strlcatVolker Lendecke2013-11-281-1/+1
| | | | | | | | | If "d" is not 0-terminated, the pure strlen will read beyond the end of the given bufsize. strlcat in libbsd deliberately avoids this, so we should do the same. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* replace: Fix developer build on BSD.Andreas Schneider2013-11-211-0/+1
| | | | | | | | | | This fixes bsd_attr_list() calling geteuid(). 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): Thu Nov 21 03:37:59 CET 2013 on sn-devel-104
* xattr: fix listing EAs on *BSD for non-root usersBjörn Jacke2013-11-081-0/+4
| | | | | | | | | | | | Thanks to Stefan Rompf for reporting. This fixes bug #10247 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Nov 8 20:43:30 CET 2013 on sn-devel-104
* waf: consolidate libintl related checksChristian Ambach2013-08-091-10/+36
| | | | | | | | | | | | | | consolidate the dealing with functions from libintl and the handling of checking if libiconv is required or not to a common place in lib/replace also add a new samba_intl subsystem that has dependencies on the appropriate set of libraries (libintl, libintl+libiconv or none) that can be used as a general dependency by code that depends on the internationalization libraries Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix bug 10025 - Lack of Sanity Checking in calls to malloc()/calloc().Bill Parker2013-07-171-0/+29
| | | | | | | | | | | | | In reviewing various files in Samba-4.0.7, I found a number of instances where malloc()/calloc() were called without the checking the return value for a value of NULL, which would indicate failure. (NB. The changes needed to ccan, iniparser, popt and heimdal will be reported upstream, not patched inside Samba). Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Source <idra@samba.org>
* Bug 8997: change libreplace GPL source to LGPLDavid Disseldorp2013-06-033-31/+43
| | | | | | | | | | | | | | | | | | | | | | | | libreplace currently includes socket.c and getifaddrs.c both of which are GPL licensed. Although not required, talloc and tdb build alongside this source, leading to some ambiguity regarding their LGPL licences. The following copyright holders have agreed to the GPL->LGPL change: lib/replace/getifaddrs.c Copyright (C) Andrew Tridgell 1998 Copyright (C) Jeremy Allison 2007 Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007 lib/replace/test/getifaddrs.c lib/replace/socket.c * Copyright (C) Michael Adam <obnox@samba.org> 2008 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Jun 3 18:06:18 CEST 2013 on sn-devel-104