summaryrefslogtreecommitdiff
path: root/lib/replace/replace.c
AgeCommit message (Collapse)AuthorFilesLines
2015-10-01libreplace: Fix the build on SolarisVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-08-19replace: Fix bug 11455Volker Lendecke1-0/+1
Don't call rep_strtoull recursively Bug: https://bugzilla.samba.org/show_bug.cgi?id=11455 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Aug 19 11:22:38 CEST 2015 on sn-devel-104
2015-07-29lib: replace: Add strsep function (missing on Solaris).Jeremy Allison1-0/+20
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11359 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@wakeful.net> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jul 29 02:24:55 CEST 2015 on sn-devel-104
2015-06-22replace: Replace BSD strtoll by wrapping strtoll instead of strtoqFelix Janda1-6/+2
When it is detected that strtoll returns EINVAL not only in the case that the base is not supported, HAVE_BSD_STRTOLL is declared and strtoll is replaced. The current replacement code wraps strtoq in order to replace strtoll and errors out when strtoq is missing. In order to remove this possible error path, we can use strtoll instead of strtoq since the code is only used when it is known that strtoll exists. The fixes a compilation problem on linux systems using musl libc, which has a BSD-like strtoll but no strtoq. Signed-off-by: Felix Janda <felix.janda@posteo.de> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jun 22 12:49:10 CEST 2015 on sn-devel-104
2015-03-26replace: clean-up strlcpy and add note on return valueDavid Disseldorp1-4/+12
The existing implementation uses single line ifs, making the code hard to visually parse. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-28replace: fix typo in variable nameDavid Disseldorp1-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
2013-11-28replace: Don't run over dst in strlcatVolker Lendecke1-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>
2013-01-19heimdal_build: Try again to sort out the strerror_r messAndrew Bartlett1-1/+1
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-09replace: Fix compilation of rep_mkstempJesper Larsen1-1/+1
Commit 1fbc185 removed the variable 'p'. Use the equivalent variable 'template' instead. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jan 9 07:18:33 CET 2013 on sn-devel-104
2012-11-22lib/replace: Do not use STRERROR_R_PROTO_COMPATIBLE as only roken.h sets thisAndrew Bartlett1-1/+1
Currently, we put strerror_r into libreplace even on systems with strerror_r. Andrew Bartlett Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-14lib/replace: replace all *printf function if we replace snprintf (bug #9390)Stefan Metzmacher1-2/+2
This fixes segfaults in log level = 10 on Solaris. Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Jacke <bj@sernet.de> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Wed Nov 14 19:41:14 CET 2012 on sn-devel-104
2012-09-25replace: Avoid returning value in void setproctitle() replacement.Jelmer Vernooij1-1/+0
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Tue Sep 25 06:38:40 CEST 2012 on sn-devel-104
2012-09-24replace: Support setproctitle().Jelmer Vernooij1-0/+7
This uses the setproctitle() from libc, libsetproctitle or libbsd. If none is available it provides a dummy implementation.
2012-09-23lib/replace: Remove unused nap and therefore the SCO defineAndrew Bartlett1-10/+0
In any case, the Samba Team stopped supporting SCO systems a long time ago. Andrew Bartlett
2012-04-26replace: Fix use of mktempSimo Sorce1-2/+2
mktemp always returns the template, so checking for NULL doesn't cactch any error. Errors are reported by turning the template into an empty string. Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Thu Apr 26 16:14:24 CEST 2012 on sn-devel-104
2012-03-25replace: Avoid DEBUG(), which is not available in libreplace.Jelmer Vernooij1-1/+1
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Mar 25 00:13:59 CET 2012 on sn-devel-104
2012-03-24libreplace: Add usleep implementation.Jelmer Vernooij1-0/+14
2012-03-24replace: Work around socket wrapper.Jelmer Vernooij1-0/+1
It's fine to ignore socket wrapper here, as it doesn't deal with unix domain sockets.
2012-03-24replace: Add system/network.h for ucred struct.Jelmer Vernooij1-0/+1
2012-03-24libreplace: Add getpeereid implementation.Jelmer Vernooij1-0/+28
2012-03-24replace: Move memalign() from lib/util/system.c to libreplace.Jelmer Vernooij1-0/+32
2010-10-23lib/replace: fix rep_strtoull() prototypeStefan Metzmacher1-1/+1
metze
2010-10-22replace: use a wrapper around strtoll if it didn't behave as expectedMatthieu Patou1-2/+48
2010-09-10libreplace: clock_gettime sets errnoBjörn Jacke1-1/+2
2010-08-31libreplace: add clock_gettime replacement function for systems that don't ↵Björn Jacke1-0/+21
have it
2010-03-29s4-waf: use the libreplace strerror_r if neededAndrew Tridgell1-4/+9
2010-03-26libreplace: strerror_r() is needed by heimdal on solaris8Andrew Tridgell1-0/+8
2010-03-24libreplace: fixed declaration of dprintf() on FreeBSDAndrew Tridgell1-2/+2
2010-03-05replace: added get_current_dir_name()Andrew Tridgell1-0/+12
2010-02-22Spelling fixes for libreplace.Brad Hards1-1/+1
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-11libreplace: added replacements for dprintf() and vdprintf()Andrew Tridgell1-0/+31
these are very useful for writing files with formatted writes Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-23libreplace: Fix a C++ warningVolker Lendecke1-2/+2
2010-01-02libreplace: some systems don't have memmem()Andrew Tridgell1-0/+23
added rep_memmem() and a testsuite
2009-04-20Error out at runtime when seteuid/setresuid or setegid/setresgid are notJelmer Vernooij1-2/+4
available. This means it's possible to compile libreplace when these functions are not available and use it, as long as this particular function is not used.
2009-04-20Only define waitpid replacement if wait4 is available. (It isn't onJelmer Vernooij1-1/+1
Windows.)
2009-04-20Cope with the fact that only _mkdir() exists on Windows and that itJelmer Vernooij1-0/+4
doesn't take a mode argument.
2008-11-01Merge branch 'master' of /home/jelmer/samba3Jelmer Vernooij1-0/+52
Conflicts: lib/replace/README lib/replace/libreplace.m4 lib/replace/replace.c source3/include/proto.h source3/lib/system.c
2008-11-01Use dup2() replacement from libreplace.Jelmer Vernooij1-0/+9
2008-11-01Remove sys_chroot() - libreplace already provides an alternative.Jelmer Vernooij1-2/+0
2008-11-01Move sys_realpath() to libreplace.Jelmer Vernooij1-0/+11
2008-11-01Move sys_lchown() to libreplace.Jelmer Vernooij1-0/+8
2008-11-01Move sys_symlink() to libreplace.Jelmer Vernooij1-0/+8
2008-11-01Move sys_readlink() to libreplace.Jelmer Vernooij1-0/+7
2008-11-01Move sys_link to libreplace.Jelmer Vernooij1-0/+8
2008-11-01Move sys_chown() to rep_chown().Jelmer Vernooij1-0/+13
2008-09-17Move common libraries from root to lib/.Jelmer Vernooij1-0/+616