summaryrefslogtreecommitdiff
path: root/source4/lib/replace/replace.c
AgeCommit message (Collapse)AuthorFilesLines
2008-09-14using NGROUPS_MAX instead of 32 for the max group value in rep_initgroups() ↵Yannick Bergeron1-1/+1
subroutine in lib/replace/replace.c (cherry picked from commit 13b1a232d2fe05ae3e924ea2503d05ff5084146e) (This used to be commit 0d2fb0e280e497094a4c95f8dca1383ee1cfa982)
2008-07-02Fix bug #5578, reported by sendel2000@hotbox.ru. Bad (non-Samba) use of ↵Jeremy Allison1-0/+3
strlcat gives error. Jeremy. (This used to be commit e633dc4ec2d72c3d34b5e096e0460e07e07ab514)
2008-05-07libreplace: always provide utime() and utimes()Stefan Metzmacher1-0/+27
I'd like to also provide futimes(), but it seems that some systems doesn't support a it at kernel level. If someone knows how to write a portable replacement for futimes() please tell me... metze (This used to be commit a9604fe4a323dccb537cf02ea7594437b4995803)
2008-04-17use uintptr_t instead of intptr_t where appropriateAndrew Tridgell1-1/+1
(This used to be commit d62f2bcc85c13605c133db250e0a86d2d6ccc481)
2008-03-18libreplace: replace.c does not need system/network.h anymore.Michael Adam1-1/+0
Michael (This used to be commit 2d3c2f34f33338ff422047dae9cc262522689328)
2008-03-18libreplace: move rep_socketpair() to its own module.Michael Adam1-22/+0
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 (This used to be commit 94ac8a25be15b55f66eff96fdddc2fdc71a43b1e)
2008-03-18libreplace: replace inet_ntoa() when it is missingMichael Adam1-14/+0
...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 (This used to be commit 974c0c45ad42644348e0b55454715b12158f1028)
2008-01-15Fix bug 5055Volker Lendecke1-1/+1
(lib/replace part of 8bcd2df841bae63e7d58c35d4728b7d853471697 metze) (This used to be commit 8db9e196506f530c780d93e16da590566d16a407)
2007-10-10r23798: updated old Temple Place FSF addresses to new URLAndrew Tridgell1-2/+1
(This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb)
2007-10-10r23795: more v2->v3 conversionAndrew Tridgell1-1/+1
(This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac)
2007-10-10r23363: Activate rep_pread and rep_pwrite in lib/replace/replace.h.Michael Adam1-0/+8
This fixes the build on a SuSE 6.1. :-) I guess this had been merely forgotten. But beware: The implementations of rep_pread and rep_pwrite are not thread safe. Michael (This used to be commit e4955c729fdf0bd299df4dadc4b33e09fe4d336e)
2007-10-10r22988: fixed 2 bugs in our unsetenv() replacement codeAndrew Tridgell1-11/+15
1) you must not free the memory, as it is possible the memory did not come from malloc (try it under valgrind to test) 2) the old code didn't cope with duplicate environment variables I hope this will fix some of the build farm errors on irix, and maybe solaris (This used to be commit ec6900171d066e927f004b621fb39cc7b8dcfd90)
2007-10-10r22152: merge from samba3:Stefan Metzmacher1-27/+0
remove netgr functions from libreplace they're not used in samba4 currently and samba3 has explicit configure checks for them. should fix bug #4496 metze (This used to be commit dd83a8dad8ad89a1485598fa6e11c9128d04e6d7)
2007-10-10r21797: remove the key directly from the environ arrayStefan Metzmacher1-25/+17
inspired by: http://cvs.linux-ha.org/viewcvs/viewcvs.cgi/linux-ha/replace/unsetenv.c?rev=1.4&view=auto metze (This used to be commit 8787525e518805f8445a376dc4964921598cb2e0)
2007-10-10r21793: add replacement for unsetenv()Stefan Metzmacher1-0/+34
metze (This used to be commit d6de7f2cda70cfd55f0f7fbb9f3b93a5a58c6f51)
2007-10-10r19395: Fix replacement function compilation.Jelmer Vernooij1-1/+1
(This used to be commit b79303f25180c777d9d09b2cdf852bf0a5eda70d)
2007-10-10r19393: Add replacement function for socketpair()Jelmer Vernooij1-0/+21
(This used to be commit 448a3ecc0184bfa063db1eb3ae6dc16b8b792792)
2007-10-10r18999: merge from samba3:Stefan Metzmacher1-1/+1
- make more usage of PRINTF_ATTRIBUTE() - vsyslog takes a 'const char *format' metze (This used to be commit cdcd4232d2f383f4d2f9ca1d049b7b3cc7b58359)
2007-10-10r18343: fixed setlinebuf() prototype, added test for it, and use it in twoAndrew Tridgell1-2/+2
places to avoid a #ifdef (This used to be commit 095b8057740a4bb207e24e4c63a2dcb53521a72f)
2007-10-10r18160: - pread and pwrite replacements need to be non-staticAndrew Tridgell1-22/+7
- replacing rename() is pointless - all platforms have it (and the #define of rename breaks some code) - use system/locale.h in snprintf.c - fix passwd.h for initgroups - stdlib is in replace.h, not needed elsewhere - fix the initgroups replacement - fix mapping of dl functions to rep_* (This used to be commit 57cd0ca176387d6a3acabf9fedeef4f2a3a3dad7)
2007-10-10r18140: and this reduces warnings about toupper()Andrew Tridgell1-0/+1
(This used to be commit 41419e54d5e79d08a71cd9c94585be3448b1e9fc)
2007-10-10r18139: irix needs system/network.h hereAndrew Tridgell1-0/+1
(This used to be commit f46ab799b41c0ec520739ec11979771316781ce4)
2007-10-10r18129: moved the system includes into libreplace - this gives much moreAndrew Tridgell1-14/+4
isolation of our portability environment from the main code, and also simplifies the includes system (no separate #ifdef _SAMBA_BUILD for tdb. ldb etc now) (This used to be commit 77d1a468e06290aba789e2f3affc769fc5159a21)
2007-10-10r18061: this should fix the libreplace build on us4 with gccAndrew Tridgell1-0/+8
(This used to be commit 71c0a0731c52458105974e9ad727b7ba403fd992)
2007-10-10r18056: includes needed for O_CREATAndrew Tridgell1-1/+3
(This used to be commit 0b80ee8b3b17d4914010c9a54d5c2dcb69738990)
2007-10-10r18052: discard_const_p() isn't part of the libreplace API, so we can't use itAndrew Tridgell1-1/+1
inside libreplace. (This used to be commit 5745ecdd826c387137a742f32ee3c8f60191a6a7)
2007-10-10r18044: timegm.c needs to be in a separate fileAndrew Tridgell1-32/+1
(This used to be commit 3ec1db7bd12cdc233c37f261073a33fc48ecd7ce)
2007-10-10r18040: Use only one strnlen implementationJelmer Vernooij1-14/+1
(This used to be commit 9a421425d242f6e0385414121c114c7c62ea1aaa)
2007-10-10r18031: Merge my replace fixes:Jelmer Vernooij1-44/+156
* libreplace can now build stand-alone * add stub testsuite for libreplace * make talloc/tdb/ldb use libreplace (This used to be commit fe7ca4b1454e01a33ed0d53791ebffdd349298b4)
2007-10-10r18018: Fix the build on OpenBSD. No license problem this time, I've written ↵Volker Lendecke1-1/+17
strnlen from scratch. Volker (This used to be commit 2a7cdf52e4113db30a7a8b180c68cec736f6c186)
2007-10-10r17992: reverted r17842Andrew Tridgell1-46/+0
This needs more consideration, as the patch removed the copyright notice and license from the timegm.c code. Volker, when you get a minute can you let me know what problem this patch fixed so I can find a different approach? (This used to be commit 5b9b9dd5303300778bb9e6d0479ab03fdd70c67d)
2007-10-10r17842: After talking to Simo, apply the next attempt to resolve the strnlenVolker Lendecke1-0/+46
problem. Timegm is the same. Simo says this is just a workaround, but it helps for now. Feel free to revert. Volker (This used to be commit fd166ca0c079d83081bc1d631fe40b965c7873d4)
2007-10-10r17841: Revert 17840, libldb.a defines strnlen. Sorry for the noiseVolker Lendecke1-14/+0
(This used to be commit 1de34590821b0c076bf8d48cbdae97f33275647e)
2007-10-10r17840: A step towards building on Solaris which appears not to have strnlen.Volker Lendecke1-0/+14
Volker (This used to be commit ebf75c6196afdd4bfa4f11bb1d45d385ab0babed)
2007-10-10r17763: moved setenv to ldb/replace/Andrew Tridgell1-19/+0
(This used to be commit ed2dbc4dfe4556831c809dab24e3833cd2018138)
2007-10-10r17750: these have moved to ldb/replace/ nowAndrew Tridgell1-44/+0
(This used to be commit ac178b52935d7629f8583092e833b74093ca70e1)
2007-10-10r16556: Add mkdtemp to libreplace. This is apparantly available on LinuxJames Peach1-0/+15
and BSD systems, but it's not everywhere. (This used to be commit b3d2512ed4fc8c378607bcc2dc241a1f77ab7197)
2007-10-10r16003: Tru64 doesn't have strtoll/strtoull but the size of 'long' is equal toStefan Metzmacher1-0/+4
the size of 'long long' so we can use strtol/strtoul Patch from Bjoern Jacke, thanks! (I only added the SIZEOF_LONG == SIZEOF_LONG_LONG) metze (This used to be commit 2bda7b63be1257210601dac3e2b1070f48d765b4)
2007-10-10r15953: our timegm() replacement still doesn't work, so grab the one fromAndrew Tridgell1-13/+0
Heimdal which does work. This should fix most of the rest of the failures on solaris (This used to be commit acfaa98b5ea686feb81350baf09b3f4480f96edc)
2007-10-10r15879: strtok_r() replacement, for solarisAndrew Tridgell1-0/+27
(This used to be commit df5bd916db3cfbd6c145177fd8992261f03a5cbc)
2007-10-10r15719: Fix build on systems (AIX) that don't have vsyslog or strcasestr, withJim McDonough1-0/+2
--enable-developer on. syslog() and toupper() required more includes. Someone more familiar with samba4 builds should verify this, please. (This used to be commit d28f49fc6d3b7ee1b7077e2d35b2aee54d2d1469)
2007-10-10r15573: Fix build of systems that have iconv headers in non-standard locationsJelmer Vernooij1-1/+0
Split of system/locale.h header from system/iconv.h Previously, iconv wasn't being used on these systems (This used to be commit aa6d66fda69779d1c2948a1aca85dbd5208f1cba)
2007-10-10r15382: Use grp.h in this block; it has been cleaned out of the other ↵Paul Green1-0/+3
headers that formerly included it for us. Paul (This used to be commit a4d706cf26382820b58940458f8873a4f8f79612)
2007-10-10r15321: Reduce the size of rewrite.m4 a bit moreJelmer Vernooij1-0/+1
(This used to be commit c83e4b166534278c335254aa8890a50635bbf1b7)
2007-10-10r11343: Remove dependency on DEBUG()Jelmer Vernooij1-5/+0
(This used to be commit 407b5e615f80ab2f7a3d10bafd9284de7f02fe60)
2007-10-10r10896: added a strcasestr() replacement functionAndrew Tridgell1-1/+15
(This used to be commit 4483d275e12006e5acc72ae143c0a01da01bd00d)
2007-10-10r10523: fixed timegm() to not depend on get_time_zone(), so it works in ↵Andrew Tridgell1-12/+2
lib/replace/ the old timegm() replacement was also broken (it returned the wrong value) (This used to be commit 342489a1d4d5cc4b16cf2e5ff7e671326f0cb3d5)
2007-10-10r10456: More SCons fixes:Jelmer Vernooij1-0/+22
- Add framework for fallback generating code - Move pread / pwrite replacement functions to libreplace - Support pidl builds correctly - Support asn1 builds correctly - Move OS-specific checks to lib/replace/SConscript (This used to be commit fbbfad0a1f7dedbf48e835a864f8285f283d72f3)
2007-10-10r10438: Move portability functions to lib/replace/; replace now simply ensuresJelmer Vernooij1-38/+35
that a given set of (working) POSIX functions are available (without prefixes to their names, etc). See lib/replace/README for a list. Functions that behave different from their POSIX specification (such as sys_select, sys_read, etc) have kept the sys_ prefix. (This used to be commit 29919a71059b29fa27a49b1f5b84bb8881de65fc)
2007-10-10r9374: HPUX is also missing setegid()Andrew Tridgell1-0/+11
(This used to be commit 57e6bd61395e82064c72510dcc326b11b7bdf7fd)