summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* lib/replace: replace all *printf function if we replace snprintf (bug #9390)Stefan Metzmacher2012-11-153-17/+34
| | | | | | | | | | | | | 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 (cherry picked from commit a15da3625850d97b3da1b02308c870f820007c52) The last 5 patches address bug #9390 - Solaris printf doesn't allow %s, NULL.
* libreplace: Fix symbol names for snprintf/asprintf/vasprintf.Jelmer Vernooij2012-11-151-6/+6
| | | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun May 13 05:16:28 CEST 2012 on sn-devel-104 (cherry picked from commit cf67da70c9a63c4dc63f287059321d6c36d1e19e)
* libreplace: fixed declaration of dprintf() on FreeBSD (cherry picked from ↵Andrew Tridgell2012-11-152-2/+12
| | | | commit a599319d0a389ff0c31dae8068cd7a78352aa9e7)
* libreplace: added replacements for dprintf() and vdprintf()Andrew Tridgell2012-11-152-1/+32
| | | | | | | these are very useful for writing files with formatted writes Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit d6fb64c51244529388b1f79ba8220ff608e1e4de)
* libreplace: some systems don't have memmem()Andrew Tridgell2012-11-154-0/+68
| | | | | added rep_memmem() and a testsuite (cherry picked from commit fef3c910da421e890925e5e61275fc457da87f6e)
* Fix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_sigJeremy Allison2011-08-023-4/+6
| | | | | | | | 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 (cherry picked from commit 0c67efdd68b9808542c090b9fd9920e4e37d85d0)
* libreplace: include sys/file.h only when availableBjörn Jacke2011-06-172-1/+3
| | | | thanks to Joachim Schmitz <schmitz@hp.com>. This fixes #7460.
* Fix our asn.1 parser to handle negative numbers.Jeremy Allison2011-05-261-0/+9
| | | | | | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue May 24 22:57:16 CEST 2011 on sn-devel-104 (cherry picked from commit e719dfd4dc178f001a5f804fb1ac4e587574415f) Fix bug #8163 (asn.1 library does not correctly read negative integers). (cherry picked from commit 859d13141cd831488b60e413f7141514ae4464b5)
* tdb_expand: limit the expansion with huge recordsSimo Sorce2011-05-181-5/+20
| | | | | | | | ldb can create huge records when saving indexes. Limit the tdb expansion to avoid consuming a lot of memory for no good reason if the record being saved is huge. Fix bug #7610 (winbindd_cache.tdb grows too large when scaled).
* Fix denial of service - memory corruption.Jeremy Allison2011-02-282-0/+15
| | | | | | | | | | | | | | | | | | | | | | | CVE-2011-0719 Fix bug #7949 (DoS in Winbind and smbd with many file descriptors open). All current released versions of Samba are vulnerable to a denial of service caused by memory corruption. Range checks on file descriptors being used in the FD_SET macro were not present allowing stack corruption. This can cause the Samba code to crash or to loop attempting to select on a bad file descriptor set. A connection to a file share, or a local account is needed to exploit this problem, either authenticated or unauthenticated (guest connection). Currently we do not believe this flaw is exploitable beyond a crash or causing the code to loop, but on the advice of our security reviewers we are releasing fixes in case an exploit is discovered at a later date. (cherry picked from commit c3ad6eb506623435d3d9ce62d6f34ed1c960d4be)
* Fix bso#3185, return false when EOF is encountered in param name.Holger Hetterich2010-12-131-1/+1
|
* s3: Fix the charset_pull routineVolker Lendecke2010-09-251-1/+1
| | | | | | In the push routine we do the SVAL, so we should do the SSVAL here. Fix bug #7531 (3.5.3 unusable on solaris 10).
* lib/replace: make sure IPV6_V6ONLY is available for IPv6 supportStefan Metzmacher2010-05-111-0/+8
| | | | | | | | | We rely on IPV6_V6ONLY being supported. See bug #7196. metze (cherry picked from commit 41cd6f992829c45c890f5daf78eb3019633f3620) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* lib/replace: add replacement for IPV6_V6ONLY on linux systems with broken ↵Stefan Metzmacher2010-05-112-0/+51
| | | | | | | | | | | headers This is needed on SLES8. See bug 7196. metze (cherry picked from commit e06cf3950252a46486aa046a4552ed6ebff175b3) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tsocket_bsd: Always use a real length for the sa_socklen, and keep it aroundAndrew Bartlett2010-05-111-68/+16
| | | | | | | | | | | | | The previous code assumed the OS would happily accept sizeof(struct sockaddr_storage). It seems some versions of Solaris do not like this. Andrew Bartlett (cherry picked from commit f1aa4c34bf0bd7d42627024af333963b741babea) Fix for bug #7354. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tsocket: only copy the specific part of sockaddr*Stefan Metzmacher2010-05-111-0/+5
| | | | | | | | | | This makes sure we fill the unspefic bytes with 0 and have zero termination for sockaddr_un. metze (cherry picked from commit 17c804a67593cdb4d8646b5be6b50fddf56b3e27) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tsocket: allow AF_UNIX sockaddrs smaller than sizeof(sockaddr_un)Stefan Metzmacher2010-05-111-4/+5
| | | | | | | | | | This is needed as getpeername() truncates the length to 2 if the peer socket has no name. metze (cherry picked from commit 4784c8c3bea98592486ca973d57c99671eb68cb2) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tsocket: Improve the tsocket_address_bsd_sockaddr documentation.Andreas Schneider2010-05-021-1/+3
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 1983256c70cf07b8c8afddd024ee5fd2522ee83c) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Spelling fixes for tsocket API documentation.Brad Hards2010-05-021-14/+14
| | | | | | | Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> (cherry picked from commit 319d3bf9d93ddfc1afbfb0c759f6d91906f915c1) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tsocket: Fix the description of tstream_writev_queue_send/recv (cherry ↵Kai Blin2010-05-021-6/+6
| | | | | | picked from commit 88099bcc93fabebe3d4548f8a5aa26b585886a1c) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tsocket: Fix description for tstream_readv_pdu_queue_send/recv (cherry ↵Kai Blin2010-05-021-7/+6
| | | | | | picked from commit 9184f524f0e5fe828b723200182969e0e3e8685d) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tsocket: Added complete doxygen documentation.Andreas Schneider2010-05-022-63/+834
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 574f77f89e78997844dd6e993f9bf53476555026) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tsocket: Added doxygen config file.Andreas Schneider2010-05-021-0/+1538
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 04f3f27f7e7a4e7ae3584fe9b7ed7c5f5d556ec7) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* lib/util: move TIME_T_MIN/MAX defines into header file (cherry picked from ↵Björn Jacke2010-04-122-14/+14
| | | | commit 571ee54b791b93ad46e09ed563ef4a5582dcf0c8)
* s3: signals are processed twice in child.Bo Yang2010-04-013-5/+36
| | | | | | | | Signed-off-by: Bo Yang <boyang@samba.org> (cherry picked from commit 8c8bb51de1ac2baa46ac0736fae12c034288e5d4) Fix bug #7206 (duplicate signal handler, signals are processed twice in child process).
* s3: Add tdb_data_equal (cherry picked from commit ↵Volker Lendecke2010-03-312-0/+9
| | | | ebc08b9938a4d266be16ca7e06d27813952cd00f)
* talloc_stack: reset stackframe pointers to NULLStefan Metzmacher2010-03-151-0/+2
| | | | | | | This makes it easier to debug the code in future. metze (cherry picked from commit d23581b4d7a4936002c1d2d748836aead9215120)
* talloc_stack: make sure we never let talloc_tos() return ts->talloc_stack[-1]Stefan Metzmacher2010-03-151-1/+1
| | | | | | | | | | | | In smbd there's a small gab between TALLOC_FREE(frame); before we call smbd_parent_loop() where we don't have a valid talloc stackframe. smbd_parent_loop() calls talloc_stackframe() only within the while(1) loop. As DEBUG(2,("waiting for connections")) uses talloc_tos() to construct the time header for the debug message we crash on some systems. metze (cherry picked from commit 10ed809a1a31be50ce09142eb99b3a243ae8b940)
* tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler()Stefan Metzmacher2010-02-181-2/+4
| | | | | metze (cherry picked from commit c42d9c4ec410e205091784cd97cbceb5572609d8)
* Fix commit d07cd37b993d3c9beded20323174633b806196b5Jeremy Allison2010-02-181-1/+4
| | | | | | | | | | | | | | | | Which was: tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD Metze, this has to have been wrong - you are throwing away the talloc_realloc pointer returned. Also no error checking. Please review. Thank goodness for gcc warnings :-). Jeremy. (cherry picked from commit 936828de71023d90aaec6c1dba84052246bbad11) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREADStefan Metzmacher2010-02-181-4/+6
| | | | | metze (cherry picked from commit d07cd37b993d3c9beded20323174633b806196b5)
* tsocket/bsd: set IPV6_V6ONLY on AF_INET6 socketsStefan Metzmacher2010-02-181-0/+36
| | | | | | | | | Some system already have this as default. It's easier to behave the same way on all systems and handle ipv6 and ipv4 sockets separate. metze (cherry picked from commit 1ffcb991a900b78c9175f6b093839fe96b1bd7d9)
* tsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote ↵Stefan Metzmacher2010-02-181-2/+53
| | | | | | | address if the local address is any metze (cherry picked from commit 8a0949dfc8d2ecf577dfc5ef38496421101b734e)
* tsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in ↵Stefan Metzmacher2010-02-181-1/+1
| | | | | | | | | | tstream_bsd_connect_send() This is needed because, we can't use sizeof(sockaddr_storage) for AF_UNIX sockets. Also some platforms require exact values for AF_INET and AF_INET6. metze (cherry picked from commit 6637b2f4b06fcee1e8e1b1782dd96e3273f8caac)
* tsocket/bsd: fix do_bind logic for AF_INETStefan Metzmacher2010-02-181-2/+2
| | | | | | | We want the explicit bind() when we don't use the any address. metze (cherry picked from commit 135543b4c300e2fc31ee4165ce630644e1aef455)
* socket_wrapper: also ignore AF_INET6 in swrap_setsockopt()Stefan Metzmacher2010-02-181-0/+4
| | | | | metze (cherry picked from commit 0b3e950731fe72a258a631e39ca1304d54663536)
* tdb: raise version to 1.2.1Simo Sorce2010-02-101-1/+1
| | | | | | | | after recent fixes we need to raise the version to 1.2.1 so that we can require also the right patched version. Original commit was 70534adee10fc6f5bba2d9304668dc6508e5de5a in master. source4/min_versions.m4 was copied from the master branch.
* util: added binsearch.h for binary array searchesAndrew Tridgell2010-02-091-0/+68
| | | | | | | | | | | | | | | This was moved from the schema_query code. It will now be used in more than one place, so best to make it a library macro. I think there are quite a few places that could benefit from this. (cherry picked from commit 71943e8858943718affb6a3c0ded2127f07057f0) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 448b8f35d7a7cff73d35304673302178f593c9d0) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 6b24639c08b764eb0205c63674e80b303b2be2ac) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tdb: fix an early release of the global lock that can cause data corruptionVolker Lendecke2010-02-041-5/+10
| | | | | | | | | | | | | | | | | | | | | | There was a bug in tdb where the tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1); (ending the transaction-"mutex") was done before the /* remove the recovery marker */ This means that when a transaction is committed there is a window where another opener of the file sees the transaction marker while the transaction committer is still fully functional and working on it. This led to transaction being rolled back by that second opener of the file while transaction_commit() gave no error to the caller. This patch moves the F_UNLCK to after the recovery marker was removed, closing this window. (cherry picked from commit 531059696e17d1ee538310d81af309c107d08e3e) Fix bug #7085.
* lib/popt: Fix typo in README.Karolin Seeger2010-01-251-1/+1
| | | | | Karolin (cherry picked from commit 463aa06442f1d6c7088c5d47f003b82e4293b70d)
* tdb: fix standalone 'make installdocs'Stefan Metzmacher2010-01-072-3/+4
| | | | | metze (cherry picked from commit c01f443ebca5e0b6f65fe8b3ab031da51dce2e89)
* tdb: create symbol links to shared libraries see ↵Brian Lu2010-01-071-0/+4
| | | | | | | https://bugzilla.samba.org/show_bug.cgi?id=6991 for details Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 0a3a6bb8f910df02cb429fdeacf0ab8d683e0b89)
* talloc: create symbol links to shared libraries see ↵Brian Lu2010-01-071-0/+5
| | | | | | | https://bugzilla.samba.org/show_bug.cgi?id=6991 for details Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit eff6022d51f578dfc48f1d66dd8ec1e860dfd7b3)
* tevent: create symbol links to shared libraries see ↵Brian Lu2010-01-071-0/+4
| | | | | | | https://bugzilla.samba.org/show_bug.cgi?id=6991 for details Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit f408d58d95f5ac10849742fdcdf7e6160196e8e0)
* tdb: Also build and install tdb manpages from standalone tdb.Jelmer Vernooij2010-01-077-3/+459
| | | | | | | (cherry picked from commit 0110990f01390c80b8db423ba7eed486883219de) (Version changed to 3.5) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Fix release script to work with recent git versionsSimo Sorce2009-12-201-1/+1
| | | | | | (cherry picked from commit 7f956869ff7a8e481afb9db0c52a0d74d809867a) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* talloc: Fix exports and increment talloc versionSimo Sorce2009-12-203-37/+40
| | | | | | (cherry picked from commit 6618a062a19660a718074f6e6155339451b7a5b6) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* talloc: Make abi checks in release scriptSimo Sorce2009-12-201-0/+10
| | | | | | | | Make always sure the exports and signature files are up to date before shipping a release. (cherry picked from commit 8fb483b2964f1222c013df42ba8be544269da612) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* talloc: Move release script under /script tooSimo Sorce2009-12-201-0/+0
| | | | | | (cherry picked from commit 8e6df560b74d7e9b94dd47625de56bc1dc0bc6d7) Signed-off-by: Stefan Metzmacher <metze@samba.org>
* talloc: Change the way mksysms workSimo Sorce2009-12-203-36/+29
| | | | | | | | | | | Make sure we always have a sorted (per file) export file. This way we can directly compare the real export and the check file w/o having to further sort things. Also return error code from abi_checks.sh if warnings were reported (cherry picked from commit 2d6d6bcb5de87ce0dbce13ff6bc775b953438b75) Signed-off-by: Stefan Metzmacher <metze@samba.org>