summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Fix bug 5805: don't close stdout"Karolin Seeger2008-11-171-3/+1
| | | | This reverts commit a937de4a626a8084e852bf7d345441bab15963cd.
* Revert "Correctly fix smbclient to terminate on eof from server."Karolin Seeger2008-11-171-12/+1
| | | | This reverts commit 28fa519a80bfcd30737a51ad157d134322c1fed9.
* Revert "OS/X does not have rl_done in readline.h"Karolin Seeger2008-11-171-8/+0
| | | | This reverts commit 829e29c95ad6c1b5744dcffb4586ff7c875e3831.
* Revert "Fix some missing error handlings"Karolin Seeger2008-11-171-5/+0
| | | | This reverts commit 4ac937db865d9fc56cb49838a361dd697d06efc7.
* Revert "Fixed "declaration shadows global declaration" warnings."Karolin Seeger2008-11-171-19/+19
| | | | This reverts commit fa3096b975de2c7fd747ca9f344e36c911e27a9c.
* Revert "Now it's working, back port the aync fix for parsing large cups ↵Karolin Seeger2008-11-171-10/+0
| | | | | | printer lists." This reverts commit f5f7ed4041ef986a5ce208d59bbf39d34373ce71.
* Revert "Fix bug 5826 - Directory/Filenames get truncated when 3.2.0 client ↵Karolin Seeger2008-11-171-15/+1
| | | | | | acesses old server." This reverts commit f3b0e219f1a7660ff275db701935eecbe053fa25.
* Revert "Unify the logic in pull_ascii_base_talloc() and ↵Karolin Seeger2008-11-171-27/+7
| | | | | | pull_ucs2_base_talloc()." This reverts commit 01fd94981e322da59ac2c00055220c89de135ebe.
* Revert "Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles."Karolin Seeger2008-11-171-11/+0
| | | | This reverts commit 042e50f8709cfbe45d5b184cb3c4fe1b16bdc3b0.
* Revert "Remove the requirement for ldap call made as root. Add in security"Karolin Seeger2008-11-171-0/+7
| | | | This reverts commit b339f17132b18edad52b4c2f6b348e4b8d789bcb.
* Remove the requirement for ldap call made as root. Add in securityJeremy Allison2008-10-231-7/+0
| | | | | | checks for all SAMR calls. Jeremy. (cherry picked from commit b848f96d747fb41c074dd073f24f186539257d71)
* Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.Jeremy Allison2008-10-231-0/+11
| | | | | Jeremy. (cherry picked from commit 82ec832f7edffe2fcfd1bb067e092c159bed2973)
* Unify the logic in pull_ascii_base_talloc() and pull_ucs2_base_talloc().Jeremy Allison2008-10-211-7/+27
| | | | | Jeremy. (cherry picked from commit 5109bd33719a4bb1534cb0e012c92ec778fb26df)
* Fix bug 5826 - Directory/Filenames get truncated when 3.2.0 client acesses ↵Jeremy Allison2008-10-211-1/+15
| | | | | | | | | | | old server. Karolin this is a show-stopper for 3.2.5. There was some code in pull_ucs2_base_talloc() to cope with this case which hadn't been added to pull_ascii_base_talloc(). The older Samba returns non unicode names which is why you are seeing this codepath being executed. Jeremy. (cherry picked from commit 09fa53d927436310ae3c17096d42e2fa4de1dd2e)
* Now it's working, back port the aync fix for parsing large cups printer lists.Jeremy Allison2008-10-151-0/+10
| | | | | Jeremy. (cherry picked from commit 48ee5a66d18b805d03f93c85e98a41374d82cfb9)
* Fixed "declaration shadows global declaration" warnings.Tim Prouty2008-10-151-19/+19
| | | | | | | | | | | The patch simply uses a more descriptive variable name for tcp_seq. lib/socket_wrapper/socket_wrapper.c:753: warning: declaration of 'tcp_seq' shadows a global declaration /usr/include/netinet/tcp.h:40: warning: shadowed declaration is here lib/socket_wrapper/socket_wrapper.c: In function `swrap_marshall_packet': lib/socket_wrapper/socket_wrapper.c:919: warning: declaration of 'tcp_seq' shadows a global declaration /usr/include/netinet/tcp.h:40: warning: shadowed declaration is here (cherry picked from commit 03cbea1d653c716b16347c831aa56dca0eb297ab)
* Fix some missing error handlingsVolker Lendecke2008-10-061-0/+5
| | | | (cherry picked from commit 1709a099c82e9b06771b3aa562c5488a71f10c62)
* OS/X does not have rl_done in readline.hVolker Lendecke2008-10-061-0/+8
| | | | (cherry picked from commit af055bb8d89a14ed572f76b5f8fe492e0ed98e12)
* Correctly fix smbclient to terminate on eof from server.Jeremy Allison2008-10-061-1/+12
| | | | | Jeremy. (cherry picked from commit 4dc2eb7f42bad6812d21bf4577e2901b04a5ca83)
* Fix bug 5805: don't close stdoutDerrell Lipman2008-10-061-1/+3
| | | | | | | | | - When calling setup_logging multiple times, the code was closing the debug file descriptor before opening or assigning the new one. We don't, however, want to close the debug file descriptor if it is stdout. Derrell (cherry picked from commit 7142872d2c6e0be42307671afa31016f6940007d)
* Remove unecessary msync.Jeremy Allison2008-09-081-4/+0
| | | | | Jeremy. (cherry picked from commit d7eab4b20af47401d281dd672e012d4eb96e5f4a)
* Cleanup of DC enumeration in get_dcs()Steven Danneman2008-09-081-5/+16
| | | | | | | | | | | | This is a fix for a few small inefficiencies/bugs in the get_dcs() path. * because the third add_one_dc_unique() loop was outside the ADS check all DCs returned from the non-sitename lookup were being tacked onto the dc_name_ip list twice. * add_one_dc_unique() now checks if the given IP address already exists before adding it to the list, making the returned list actually unique * added more thorough doxygen comment headers (cherry picked from commit edd234e7a22dab105256f90df36d86f168dcea4c)
* The msync manpage reports that msync *must* be called before munmap. Failure ↵Simo Sorce2008-09-082-2/+8
| | | | | | to do so may result in lost data. Fix an ifdef check, I really think we meant to check HAVE_MMAP here. (cherry picked from commit bfced01a92ae1a4913c0c9aba27e7b43e06f9032)
* Deal with systems that don't initialize birthtime correctly.Jeremy Allison2008-09-011-4/+10
| | | | | | Pointed out by SATOH Fumiyasu <fumiyas@osstech.jp>. Jeremy. (cherry picked from commit 4876e4ffe9f5142bf90dc14b105436eaca35d3f4)
* Add st_birthtime and friends for accurate create times on systems that ↵Jeremy Allison2008-09-011-10/+30
| | | | | | | | support it (*BSD and MacOSX). This really needs to be in 3.2.x. Should have done this ages ago, sorry. Jeremy. (cherry picked from commit 0cba30073410ba499834ac26dee3f81a75c8de4f)
* Fix bug 5698 - mixup of TALLOC/malloc. Spotted by Douglas Wegscheid ↵Jeremy Allison2008-08-281-2/+3
| | | | | | | <Douglas_E_Wegscheid@whirlpool.com>. Jeremy. (cherry picked from commit 02e260ab5254c9691846f7009f685e1b11032f80)
* Fix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 ↵Jeremy Allison2008-08-281-2/+5
| | | | | | | | address reported by Ted Percival <ted@midg3t.net>. Jeremy. (cherry picked from commit 4ac537d1b78c915fe25c219958312cf22f3cba80)
* ldb: Fix permissions of new ldg files.samba-3.2.3Karolin Seeger2008-08-271-1/+1
| | | | | | | | This one fixes together with 2eaf4ed62 bug #5715 and CVE-2008-3789. Thanks to Steve Langasek <vorlon@debian.org> for reporting! Karolin
* Revert "Fix bug 5697 nmbd spins in reload_interfaces when only loopback has ↵Karolin Seeger2008-08-271-5/+2
| | | | | | an IPv4 address" This reverts commit 435c10268bb6987ab7e8206cd6c45bd9961c5632.
* Revert "Fix bug 5698 - mixup of TALLOC/malloc. Spotted by Douglas Wegscheid ↵Karolin Seeger2008-08-271-3/+2
| | | | | | <Douglas_E_Wegscheid@whirlpool.com>." This reverts commit 3c205320cd1eb19ed275572f975487e92c611f13.
* Fix bug 5698 - mixup of TALLOC/malloc. Spotted by Douglas Wegscheid ↵Jeremy Allison2008-08-221-2/+3
| | | | | | | <Douglas_E_Wegscheid@whirlpool.com>. Jeremy. (cherry picked from commit 02e260ab5254c9691846f7009f685e1b11032f80)
* Fix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 ↵Jeremy Allison2008-08-211-2/+5
| | | | | | | | address reported by Ted Percival <ted@midg3t.net>. Jeremy. (cherry picked from commit 4ac537d1b78c915fe25c219958312cf22f3cba80)
* I think the problem with these functions is that lookup_usergroupsHerb Lewis2008-08-181-17/+17
| | | | | | | | | should never include the user SID. The comment for the function in winbindd/winbindd_ads.c says /* Lookup groups a user is a member of. */ The following patch makes the wbinfo calls return the correct data before and after a login. (cherry picked from commit ecf96a26bfe18899133d68032b0cda00177d57d0)
* netapi: add c++ guard.Günther Deschner2008-08-131-1/+9
| | | | | Guenther (cherry picked from commit 5ea69915a75447d9f66b651ef5601c0a7ac6cfbb)
* Attempt to fix bug 5684Volker Lendecke2008-08-131-1/+1
| | | | | | | | | | | | | | With the ctdb checkin dde9f3f006 tdb optimized out write lock checks for write-enabled transaction. Sadly, this also removed the possibility to ever remove dead records left over from tdb_delete calls within a transaction. Tridge, please check this! Did dde9f3f006 have any reason beyond performance optimizations? Thanks, Volker (cherry picked from commit 96d683d3ec1e95cddf9ec96326ebaf8e9cc2079c)
* I found lots of places where we assume error will be set when callingAndrew Tridgell2008-08-131-2/+10
| | | | | | | | | | | | | | | | one of our virtualised functions, such as db_open(), but error is only set when a system call fails, and it is not uncommon for us to fail a function internally without ever making a system call. That led to us passing back success when a function had in fact failed. I found two places where we relied on map_nt_error_from_unix() returning success when errno==0, but lots and lots of places where we relied on the reverse, so I fixed those two places. map_nt_error_from_unix() will now always return an error, returning NT_STATUS_UNSUCCESSFUL if errno is 0 (cherry picked from commit 69d40ca4c1af925d4b0e59ddc69ef8c26e6501d1) (cherry picked from commit 8c66020a82d9b92fb10d14359b1381d58ad4972b)
* Fix bug 5686 - libsmbclient segfaults with more than one SMBCCTX.Jeremy Allison2008-08-134-16/+25
| | | | | | | | | | Here is a patch to allow many subsystems to be re-initialized. The only functional change I made was to remove the null context tracking, as the memory allocated here is designed to be left for the complete lifetime of the program. Freeing this early (when all smb contexts are destroyed) could crash other users of talloc. Jeremy. (cherry picked from commit 4779f1efccc8364fd8b3ba446aa96ba0bddec689)
* using NGROUPS_MAX instead of 32 for the max group value in rep_initgroups() ↵Yannick Bergeron2008-08-111-1/+1
| | | | | | subroutine in lib/replace/replace.c (cherry picked from commit 6d6b205e444154e1bd2993d964eff4cf532bacd8)
* Solve an IBM XL C/C++ compiler error encountered in get_exit_code() ↵Yannick Bergeron2008-08-111-1/+2
| | | | | | auth_errors array initialization in client/smbspool.c (cherry picked from commit f6ffc95a363d3ed8aa480ac25e440d2472551891)
* fixed permissions on ctdb databasesAndrew Tridgell2008-08-111-0/+5
| | | | | (cherry picked from commit 123fc3980a83d956bffaa689f3af81bbf81ce1c1) (cherry picked from commit 61274204b63cf077a826671a9e0d807bd17dfec3)
* dbwrap: add comment describing behaviour of dbwrap_change_int32_atomic().Michael Adam2008-08-111-0/+7
| | | | | | Michael (cherry picked from commit f8f21c8e3922806230e240cb54205fc2db7a3619) (cherry picked from commit 0bdab793c1da9b56790d37ac7d064b67ec51e3a4)
* secrets: fix replacemend random seed generator (security issue).Michael Adam2008-08-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | This is a regression introduced by the change to dbwrap. The replacement dbwrap_change_int32_atomic() does not correctly mimic the behaviour of tdb_change_int32_atomic(): The intended behaviour is to use *oldval as an initial value when the entry does not yet exist in the db and to return the old value in *oldval. The effect was that: 1. get_rand_seed() always returns sys_getpid() in *new_seed instead of the incremented seed from the secrets.tdb. 2. the seed stored in the tdb is always starting at 0 instead of sys_getpid() + 1 and incremented in subsequent calls. In principle this is a security issue, but i think the danger is low, since this is only used as a fallback when there is no useable /dev/urandom, and this is at most called on startup or via reinit_after_fork. Michael (cherry picked from commit bfc5d34a196f667276ce1e173821db478d01258b) (cherry picked from commit c0e764d3878120e9612bbd847e581c6fd6c79532)
* dbwrap: add comment describing behaviour of dbwrap_change_uint32_atomic().Michael Adam2008-08-111-0/+7
| | | | | | Michael (cherry picked from commit 7edfb54c865ddcfd5cdcc8c2184b96aaac2d2ec0) (cherry picked from commit c601ad0d1c5b7f3568fef7592e501b8f6be9c469)
* idmap_tdb2: fix a race condition in idmap_tdb2_allocate_id().Michael Adam2008-08-111-2/+6
| | | | | | | | | | | | | | | | | | The race is a regression introduced by the change to dbwrap. It might have led to two concurrent processes returning the same id. This fix is achieved by changing dbwrap_change_uint32_atomic() to match the original behaviour of tdb_change_uint32_atomic(), which is the following: *oldval is used as initial value when the value does not yet exist and that the old value should be returned in *oldval. dbwrap_change_uint32_atomic() is used (only) in idmap_tdb2.c, to get new ids. Michael (cherry picked from commit 72bd83fea7572a6202027b200d192c05023aa633) (cherry picked from commit f3cdf9e646180837a470e90f8a17d933f07b60c3)
* talloc_string_sub2: Don't return NULL if src is empty.Karolin Seeger2008-07-251-1/+1
| | | | | | | | | | | | | | | | | This fixes BUG #5635. Finished print jobs were not removed from the $PRINTER.tdb file if "printing=cups". In print_queue_update, talloc_string_sub2 is used to assemble the "lprm command". In the case of using "printing=cups", the default "lprm command" is an empty string. talloc_string_sub2 is called with this empty string and returns NULL which leads to exiting print_queue_update without doing the actual print queue update. Signed-off by Michael Adam <obnox@samba.org> (cherry picked from commit 03d66554d1bbd9d6c72a3dd5203e5305343c76b8) (cherry picked from commit c6ca0f7d462c51122ccb1068306410ccdbee7b00)
* get rid of unused variable warnings when HAVE_IPV6 not definedHerb Lewis2008-07-251-2/+2
| | | | (cherry picked from commit 2b5425efddfccb1010d082e6133cfdd79d72729e)
* smbldap: Fix typo in debug message.Karolin Seeger2008-07-181-1/+1
| | | | | | Karolin (cherry picked from commit 6e9e85b897431d7378396aada2c32ae470af0edd) (cherry picked from commit 1e6ae16bce110e282400026c9af8e1b3d9f2e6b4)
* A brown paper bag bug fix for "net sam rights"Volker Lendecke2008-07-171-1/+1
| | | | | (cherry picked from commit 8a455b012827cfb917473a160c5710a90490451a) (cherry picked from commit 857e9d2b27eb6824a8056490076fa020fd185a6d)
* Fix a segfault in base64_encode_data_blobVolker Lendecke2008-07-161-1/+3
| | | | | We did not allocate enough memory for the \0 and a = at the end (cherry picked from commit 719ec00949094b7d3b01e9ac829183ae08f46417)
* Fix typo.Karolin Seeger2008-07-142-2/+2
| | | | | | | | retieve -> retrieve Karolin (cherry picked from commit 37c64130701ab13b6f34998ac17fec2d128c2e08) (cherry picked from commit cacd84b86d14740ebb5e285d5882063aea5cd866)