summaryrefslogtreecommitdiff
path: root/lib/replace/system
AgeCommit message (Collapse)AuthorFilesLines
2021-04-22lib:replace: Remove NIS supportAndreas Schneider1-55/+0
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-12-16CI: add samba-no-opathRalph Boehme1-0/+4
Add a job that builds with O_PATH undefined. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-08-03ldap_server: fix hurd buildSamuel Thibault1-0/+7
There is no hardcoded IOV_MAX iov limitation on GNU/Hurd. We however do not want unbound allocation, so define it to a reasonable amount. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Aug 3 09:39:02 UTC 2020 on sn-devel-184
2019-12-18lib/replace: prefer <sys/xattr.h> over <attr/xattr.h>Ralph Boehme1-3/+3
This prevents the following compile error that may happens if "system/filesys.h" is included before "system/capability.h" on Ubuntu 16.04: [1802/4407] Compiling source3/lib/system.c In file included from ../../lib/replace/system/filesys.h:112:0, from ../../source3/include/vfs.h:29, from ../../source3/include/smb.h:150, from ../../source3/include/includes.h:284, from ../../source3/lib/system.c:23: /usr/include/x86_64-linux-gnu/sys/xattr.h:32:3: error: expected identifier before numeric constant XATTR_CREATE = 1, /* set value, fail if attr already exists. */ ^ The above error is from compiling a source tree which includes a change that adds an include "system/filesys.h" to the top of "source3/include/vfs.h". "source3/lib/system.c" has the following includes: #include "includes.h" #include "system/syslog.h" #include "system/capability.h" #include "system/passwd.h" #include "system/filesys.h" #include "../lib/util/setid.h" The first include of "includes.h" pulls in "vfs.h" which will pull in "system/filesys.h" with the mentioned change. "system/filesys.h" pulls in <attr/xattr.h> which has this define #define XATTR_CREATE 0x1 Later in "source3/lib/system.c" "system/capability.h" is included which includes <sys/xattr.h> on Ubuntu 16.04 (not in later versions of glibc). This defines the XATTR_* values as an enum: enum { XATTR_CREATE = 1, /* set value, fail if attr already exists. */ XATTR_REPLACE = 2 /* set value, fail if attr does not exist. */ }; The previous define of XATTR_CREATE as 1 makes this enum { 1 = 1, /* set value, fail if attr already exists. */ 2 = 2 /* set value, fail if attr does not exist. */ }; which is invalid C. The compiler error diagnostic is a bit confusing, as it prints the original enum from the include file. See also: <https://bugs.freedesktop.org/show_bug.cgi?id=78741> <https://bugs.launchpad.net/ubuntu/+source/attr/+bug/1288091> <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756097> Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Björn Baumbach <bb@samba.org>
2019-12-12lib/replace: work around an API conflict between ncurses and XFS xattr APIRalph Boehme1-6/+4
Compile error: [4530/4693] Compiling source3/utils/regedit_list.c In file included from ../../source3/utils/regedit_list.h:24, from ../../source3/utils/regedit_list.c:20: /usr/include/curses.h:611:28: error: conflicting types for ‘attr_get’ 611 | extern NCURSES_EXPORT(int) attr_get (attr_t *, NCURSES_PAIRS_T *, void *); /* generated */ | ^~~~~~~~ compilation terminated due to -Wfatal-errors. Both ncurses and XFS xattr API provide a get_attr() function. As a workaround avoid including <sys|attr/attributes.h> if <attr|sys/xattr.h> is present. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Dec 12 20:22:51 UTC 2019 on sn-devel-184
2019-12-06replace: ensure UTIME_NOW and UTIME_OMIT are always availableRalph Boehme1-0/+7
BUG: https://bugzilla.samba.org/show_bug.cgi?id=7771 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-10-04lib/replace: Remove libaio supportVolker Lendecke1-32/+0
io_uring is the way to go these days, libaio was never really useful for Samba 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): Fri Oct 4 18:18:41 UTC 2019 on sn-devel-184
2019-06-18lib/replace: Remove #undef TCP_NODELAYAndrew Bartlett1-28/+0
A duplicate define warning is better than not defining this at all. Similar to a patch Torsten Werner submitted to the Samba Bugzilla in 2005. Not tested on HP-UX reverts fc84e916f628b4fb6f6667ad45d0ced0e9134b23 that was still present in the new copy of nis.h created in c29d087e1ea4c92717ef86e372fe80f410580fdc BUG: https://bugzilla.samba.org/show_bug.cgi?id=2406 BUG: https://bugzilla.samba.org/show_bug.cgi?id=2140 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jun 18 06:47:05 UTC 2019 on sn-devel-184
2019-02-17replace: remove needless vxfs header file checkBjörn Jacke1-8/+0
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
2019-01-29replace: only include <sys/capability.h> with HAVE_POSIX_CAPABILITIESStefan Metzmacher1-0/+2
On FreeBSD <sys/capability.h> is a legacy wrapper to <sys/capsicum.h>, which implements something different. With FreeBSD 12 including <sys/capability.h> generates a compiler warning/error. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2018-12-16replace: Fix checking for config.h #define in gssapi.hAndreas Schneider1-4/+4
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-12-16replace: Fix checking for config.h #define in readline.hAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-11-28replace: Use #ifdef instead of #if for config.h definitionsAndreas Schneider4-10/+10
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-07-24replace: add checks for atomic_thread_fence(memory_order_seq_cst) and add ↵Stefan Metzmacher1-0/+27
possible fallbacks This implements a full memory barrier. On ubuntu amd64 with results in an 'mfence' instruction. This is required to syncronization between threads, where there's typically only one write of a memory that should be synced between all threads with the barrier. Much more details can be found here: https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/_005f_005fatomic-Builtins.html#g_t_005f_005fatomic-Builtins https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/_005f_005fsync-Builtins.html#g_t_005f_005fsync-Builtins The main one we use seems to be in C11 via stdatomic.h, the oldest fallback is __sync_synchronize(), which is available since 2005 in gcc. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2018-07-03build: bundle and reduce huge number of EA function testsBjörn Jacke1-23/+4
It's sufficient to check for one basic function of an EA implementation and a use a single ifdef for each group of EA functions. This makes more sense than checking for each EA function on each platform. Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Jul 3 13:24:51 CEST 2018 on sn-devel-144
2018-02-21replace: remove some duplicate checksBjörn Jacke1-8/+0
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-01-22include: Create system/nis.h in libreplaceAndreas Schneider1-0/+83
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13238 Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2017-11-24lib/replace: apply readline -Wstrict-prototypes workaroundUri Simchoni1-0/+3
clang -Wstrict-prototypes has issues with readline > 6.3. Fix suggested by Timur I. Bakeyev <timur@freebsd.org> cf. https://lists.gnu.org/archive/html/bug-readline/2014-04/msg00018.html cf. https://lists.samba.org/archive/samba-technical/2017-November/123923.html Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Nov 24 05:16:10 CET 2017 on sn-devel-144
2017-06-13libbreplace: compatibility fix for AIXGuillaume Xavier Taillon1-1/+9
Adds macros for preprocessor compares and replaces an incomptatible compare with one of the new macros. This fixes a comptability bug on AIX. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11621 Signed-off-by: Guillaume Xavier Taillon <gtaillon@ca.ibm.com> Reviewed-by: Björn Jacke <bjacke@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Tue Jun 13 09:11:56 CEST 2017 on sn-devel-144
2016-12-09replace: make sure we have a SCOPE_DELIMITER defineBjörn Jacke1-0/+4
Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-01replace: Include libgen.h if availableAmitay Isaacs1-0/+4
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Dec 1 18:08:54 CET 2016 on sn-devel-144
2016-04-02lib:replace: Missing semicolon on function definition.Jeremy Allison1-1/+1
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Sat Apr 2 06:04:13 CEST 2016 on sn-devel-144
2015-06-12lib/replace: fix PTHREAD_MUTEX_ROBUST fallback to PTHREAD_MUTEX_ROBUST_NP on ↵Stefan Metzmacher1-6/+3
solaris 11 Without this we got the following defines in config.h: #define HAVE_DECL_PTHREAD_MUTEXATTR_SETROBUST_NP 1 #define HAVE_DECL_PTHREAD_MUTEX_CONSISTENT_NP 1 #define HAVE_PTHREAD_MUTEXATTR_SETROBUST 1 #define HAVE_PTHREAD_MUTEX_CONSISTENT 1 #define HAVE_ROBUST_MUTEXES 1 #define USE_TDB_MUTEX_LOCKING 1 And the build failed with PTHREAD_MUTEX_ROBUST being unknown. Note that PTHREAD_MUTEX_ROBUST and PTHREAD_MUTEX_ROBUST_NP are enum values while they're defines on solaris 11 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11319 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-02-15Add Solaris ports as a tevent backend.Jeremy Allison1-0/+4
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
2014-09-19replace: Fix includes of unistd.hMartin Schwenke3-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>
2014-05-22libreplace: Define PTHREAD_MUTEX_ROBUST along with pthread_mutexattr_setrobustVolker Lendecke1-0/+8
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22libreplace: Add support for pthread_mutex_consistentVolker Lendecke1-0/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22libreplace: Add support for pthread_mutexattr_setrobustVolker Lendecke1-0/+35
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-17Remove special socket_wrapper code.Andreas Schneider1-9/+0
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17Remove special nss_wrapper codeAndreas Schneider1-12/+0
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17lib: Change uid_wrapper to preloadable version.Andreas Schneider3-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>
2014-04-15auth: Remove plaintext OSF1 password supportAndrew Bartlett1-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>
2013-05-28build: Remove autoconf build systemAndrew Bartlett1-145/+0
We are now confident that that waf build system meets enough of our needs that we will work to improve it, rather than maintain two build systems. Andrew Bartlett Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-15lib/replace: Include sys/ucontext.h if available.Jeremy Allison1-0/+4
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03replace: Remove deprecated getpass() support.Andreas Schneider1-11/+0
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2012-06-16attr: Look for attr/attributes.h too.Jelmer Vernooij1-0/+2
Fixes finding of ATTR_ROOT on GNU/kFreeBSD. Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Sat Jun 16 18:54:27 CEST 2012 on sn-devel-104
2012-06-03librepace: put #defines after #include "sys/xattr.h"Andrew Bartlett1-0/+8
This avoids redefining the system xattr functions, which should fix MacOS. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sun Jun 3 09:46:44 CEST 2012 on sn-devel-104
2012-06-02lib/replace: Merge remaining xattr test details from lib/utilAndrew Bartlett1-8/+8
I prefer the longer XATTR_ADDITIONAL_OPTIONS define and the NULL rather than 0 values in the getxattr test. Andrew Bartlett
2012-06-02lib/replace: xattr wrappers in lib/replace rather than source3/lib/system.cAndrew Bartlett1-0/+56
This also moves all the still-used configure tests etc. The unused OSF API is also removed at this time. Andrew Bartlett
2012-05-23Introduce system MIT krb5 build with --with-system-mitkrb5 option.Alexander Bokovoy1-1/+1
System MIT krb5 build also enabled by specifying --without-ad-dc When --with-system-mitkrb5 (or --withou-ad-dc) option is passed to top level configure in WAF build we are trying to detect and use system-wide MIT krb5 libraries. As result, Samba 4 DC functionality will be disabled due to the fact that it is currently impossible to implement embedded KDC server with MIT krb5. Thus, --with-system-mitkrb5/--without-ad-dc build will only produce * Samba 4 client libraries and their Python bindings * Samba 3 server (smbd, nmbd, winbindd from source3/) * Samba 3 client libraries In addition, Samba 4 DC server-specific tests will not be compiled into smbtorture. This in particular affects spoolss_win, spoolss_notify, and remote_pac rpc tests.
2012-04-25lib/replace: split out GSSAPI from lib/replace/system/kerberos.h into ↵Alexander Bokovoy2-16/+55
lib/replace/system/gssapi.h With waf build include directories are defined by dependencies specified to subsystems. Without proper dependency <gssapi/gssapi.h> cannot be found for embedded Heimdal builds when there are no system-wide gssapi/gssapi.h available. Split out GSSAPI header includes in a separate replacement header and use that explicitly where needed. Autobuild-User: Alexander Bokovoy <ab@samba.org> Autobuild-Date: Wed Apr 25 00:18:33 CEST 2012 on sn-devel-104
2012-04-18replace: added ENOATTR define if undefinedAndrew Tridgell1-0/+8
this fixes the build of the tdb xattr wrapper code on systems without xattr headers Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-01-31Fix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 and master.Ira Cooper1-0/+2
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Jan 31 23:28:09 CET 2012 on sn-devel-104
2011-10-27replace: Add don't include unistd.h directly and add uid_wrapper.Andreas Schneider2-0/+24
2011-10-27Include uid_wrapper correctly.Andreas Schneider1-0/+11
2011-09-08lib/replace: include <sys/uio.h> in "system/filesys.h" in order to have ↵Stefan Metzmacher1-0/+4
struct iovec This is needed on some platforms, e.g. NetBSD5. metze
2011-08-01Fix bug 7462 - Non-standard SA_RESETHAND is used in ↵Jeremy Allison1-4/+0
...lib/tevent/tevent_signal.c Make SA_RESETHAND conditional on its existance. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Aug 1 22:03:45 CEST 2011 on sn-devel-104
2011-05-31replace: remove waring if IOV_MAX is not definedBjörn Jacke1-2/+0
as discussed on samba-techincal we currelty don't rely on it and we don't want to flood this warning message during compile. Autobuild-User: Björn Jacke <bj@sernet.de> Autobuild-Date: Tue May 31 18:36:53 CEST 2011 on sn-devel-104
2011-05-30replace: fix build issues on GNU Hurd (#7998)Björn Jacke1-1/+1
Patch from Samuel Thibault <sthibault@debian.org> to fix Debian Bug 610678 resp. BSO #7998. IOV_MAX and UIO_MAXIOV are not defined on GNU Hurd. Autobuild-User: Björn Jacke <bj@sernet.de> Autobuild-Date: Mon May 30 00:53:59 CEST 2011 on sn-devel-104
2011-05-10lib/replace: fix an #if HAVE_GSSAPI_GSSAPI_EXT_H to be an #ifdefMichael Adam1-1/+1