summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
* s3/smbldap: Fix typo in debug message.Karolin Seeger2009-08-101-1/+1
| | | | | | | Karolin (cherry picked from commit 54dffbea663ecf4542d6c5e30da6e346d5d60424) (cherry picked from commit 2538df1ea3229ea6d8242b5ae6fdd3d453395609) (cherry picked from commit 85f3b70d4aca641339b86f71b551156fa9aa27cb)
* s3:util: let parent_dirname() correctly return toplevel filenamesStefan Metzmacher2009-08-101-1/+1
| | | | | | | | | | metze (cherry picked from commit a14efbadd53ac9678d75e6029f947d63cfa0c4e5) Signed-off-by: Stefan Metzmacher <metze@samba.org> This addresses bug #6526. (cherry picked from commit 92bb02adbc808ed3180ab66b45fb717c9dad03b4)
* Don't require "Modify property" perms to unjoin (bug #6481) "net ads leave" ↵Jim McDonough2009-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | stopped working when "modify properties" permissions were not granted (meaning you had to be allowed to disable the account that you were about to delete). Libnetapi should not delete machine accounts, as this does not happen on win32. The WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag really means "disable" (both in practice and docs). However, to keep the functionality in "net ads leave", we will still try to do the delete. If this fails, we try to do the disable. Additionally, it is possible in windows to not disable or delete the account, but just tell the local machine that it is no longer in the account. libnet can now do this as well. Don't use ads realm name for non-ads case. #6481 Also check that the connection to ads worked. (cherry picked from commit 880d1a3f83a0834225d5a7c0f179c236b0e59ef8)
* Insure we always return NULL on error.Simo Sorce2009-06-021-0/+1
| | | | | | | | It is not technically an ldb bug, but apparently some callers try to access res before checking the ldb_search() return code. So make their attempt very evident (a NULL dereference will make it cristal clear where the bug is). (cherry picked from commit c60539f31f63bd65e5b0e3ee16365f036bef3d5b)
* s3/smbconf_reg: Fix typo.Karolin Seeger2009-04-171-1/+1
| | | | | | | | This used to be commit 6343cab3 in master. Karolin (cherry picked from commit 56e877662dd6da64b348803c24e85f60ee6b3d85) (cherry picked from commit 36cb36581208f754b14e2a955fbd886e6c82cfaa)
* Tidy up some convert_string_internal error cases, found by Andrew Bartlett.Jeremy Allison2009-04-011-6/+19
| | | | | Jeremy. (cherry picked from commit 3797ddb3acc713cc200114e9e27dfb3901e5cdf1)
* Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison2009-03-301-0/+27
| | | | | | | | | | | correctly. For the clustering case. Clustered setups should have only ever used the unsigned version of TDB_DATA in the first place so they can't be in this mess :-). Just do the normal upgrade in the clustered case. Jeremy. (cherry picked from commit 52fe104996439db24a7e6b17baa7fec47ba230bb)
* s3-net: Fix Bug #6102. NetQueryDisplayInformation could return wrong ↵Günther Deschner2009-03-271-6/+12
| | | | | | | information. Guenther (cherry picked from commit 490ed838f2626893bb623ea6ad8d79595c8c44c4)
* fixed a bug in message handling for code the change notify codeAndrew Tridgell2009-03-271-2/+16
| | | | | | | | | | | | | | | | | | | The change notify code registered a separate message handler for each tree connect. This registration uses the global messaging context. The messaging code would consider a 2nd registration for the same messaging type as being an 'update' of the handler, rather than a new handler. It also would only call the first handler in the linked list for a given message type when dispatching messages. This patch changes the messaging code to allow for multiple registrations of the same message type, and allow for multiple calls to different messaging handler for one incoming message. This fixes the problem with the test_notify_tcon() test that I recently committed to the S4 smbtorture (cherry picked from commit 89e340e09fbdc375c0aa85506add525b8ba5dcd0) (cherry picked from commit 733881d22f9864ea371b29d7d1817fb4af6b865c)
* s3:lib: interfaces.c isn't used in the configure tests anymoreStefan Metzmacher2009-03-271-73/+1
| | | | | | | | | | | libreplace always provides the getifaddr() function. This fixes the build on sles8. metze (cherry picked from commit 1410490fe769bc79f98b4ab364685c7aed253e09) (cherry picked from commit bac96af2053996f28894458fce87e84c5c2356ff) (cherry picked from commit 8c50d89743a8e9024d238c6613ceea35cf160aa0)
* all BSDs use this evironment variableBjörn Jacke2009-03-271-1/+1
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit cd6ae0de52164dd6f50b3614f2511acb3eb15993) (cherry picked from commit 1ad5f50bdab761c7d3894e94f8fe3b171ec1b219) (cherry picked from commit bc53054616d442b1b28086181d81776f1c33834f)
* enable IPv6 support for NetBSD, FreeBSDBjörn Jacke2009-03-271-0/+1
| | | | | most systems include netinet/in.h via netdb.h but *BSD don't. (cherry picked from commit 808a9347faebd8349babe3704c2b83dd9b191140)
* s3: reinit_after_fork() should reinit the event context before theStefan Metzmacher2009-03-271-4/+4
| | | | | | | | | | | | | messaging context Because messaging_reinit() may add events to the event context, which will removed by event_context_reinit(). metze (cherry picked from commit 56af6112d67aa9dd3757297fbe29ce1a3eabf00d) Signed-off-by: Michael Adam <obnox@samba.org> (cherry picked from commit 918133544b535d12761b5d6242e59eb7d21bae45)
* Have nmbd check all available interfaces for WINS before failingAravind Srinivasan2009-03-271-2/+5
| | | | | | | | | | When nmbd is acting as WINS, it picks the first interface's IP as WINS server's IP. If the first interface's IP is zero, we will just quit (even though we might have other interfaces with valid IPs). This patch makes nmbd look at all interfaces and pick the first interface with a valid IP as the WINS server's IP. (cherry picked from commit de24718cbc55fa4b16a0370d335005f789e924f7)
* add Tru64 sub-second resolution timestamp supportBjörn Jacke2009-01-301-0/+24
| | | | (cherry picked from commit ce440096473d4db0e43f65ced6c2084a5bdbabc6)
* add missing semicolonsBjörn Jacke2009-01-301-6/+6
| | | | | | the fixed configure check led to a missing semicolon in the now activated BSD code. Then this error was even copypasted into the new AIX code. grrr (cherry picked from commit 5e4f6639e7ed96f3457177d203283c1c55ec52dd)
* Following Björn JACKE's patch, unify the detection of the timespec code in ↵Jeremy Allison2009-01-301-0/+36
| | | | | | | configure.in, and the application of it in time.c Jeremy. (cherry picked from commit d7c7acee813b3cd9649b381a3e63c0be56e67d29)
* Avoid valgrind errorsVolker Lendecke2009-01-291-28/+10
| | | | | | | | | | | | | | In event handlers, we might destroy other events that are pending in the lists. We can only run one event safely per select call. Yes, I've seen these valgrind errors :-) Jeremy, with ccdd921e61 you had checked in the change to run multiple events. Do you remember why it was necessary and could not be solved in a different way? Volker (cherry picked from commit 077e0ed31315242c571ccd9e9579f53aac0dbbc7)
* libreplace: fix detection of netinet/ip.h on solaris 8Michael Adam2009-01-281-1/+5
| | | | | | | | | | (The test needs to additionally include <netinet/in_systm.h>.) Michael (cherry picked from commit a223b096700bc54b446a0e152c842b088566720b) Signed-off-by: Michael Adam <obnox@samba.org> (cherry picked from commit ac4d07ef8300a2b571296b8b3f7c23e8850b526a)
* libreplace: fix bug #6066 - netinet/ip.h present but cannot be compiledMichael Adam2009-01-281-1/+4
| | | | | | | | | | under solaris Michael (cherry picked from commit 1b7beaed69823b3c401bc4c0b1c502b671169168) Signed-off-by: Michael Adam <obnox@samba.org> (cherry picked from commit 74534203b5b91445cd8ae4cd7f2a0d35ea73a281)
* lib/replace: add defines to let the callers find out if pwrite and pread are ↵Stefan Metzmacher2009-01-281-0/+6
| | | | | | | | | thread/fork safe metze (cherry picked from commit 7fc7ee9331d0539359ad88c527f59d5fdf212209) (cherry picked from commit d74b63091781e442e42b1fa7881e903a0bcc928c) (cherry picked from commit 9483b143fe473d374e7f5c71f0d497f28f4e69f7)
* "First thing, kill all the language lawyers" :-). Ensure possible insane ↵Jeremy Allison2009-01-281-1/+1
| | | | | | | | compilers can't kill us later. Jeremy. (cherry picked from commit 3504910d91fa6d174861815255062efefb0c46aa)
* Allow reinit_after_fork to be called safely from within swat and other ↵Jeremy Allison2009-01-281-10/+14
| | | | | | | | binaries that don't have an event context or a msg context. Fixes crash bug in swat. Jeremy. (cherry picked from commit a2944e99825943f91d0260c218de06817acfcf51)
* Fix bug #6040 - Calling Samba print server with an aliased DNS-name fails.Jeremy Allison2009-01-281-4/+5
| | | | | Jeremy. (cherry picked from commit 76555085fd9bb40a4c0e2c18b5bf965dcf636cb1)
* Fix bug #6019 File corruption in Clustered SMB/NFS environment managed via CTDBJeremy Allison2009-01-281-2/+2
| | | | | Jeremy. (cherry picked from commit 61c5589d1fa4d6fe7ce7293a6f6ceab96d4ee193)
* Even for srclen == 0 we have to return somethingVolker Lendecke2009-01-281-0/+6
| | | | | | | | | This fixes a regression reported by Corinna Vinschen <corinna@vinschen.de> Thanks, Volker (cherry picked from commit a77b622f05c50512626b2636343eb8da6d5e4549)
* Fix null pointer refrence in event context in backport from v3-3-testBo Yang2009-01-281-2/+6
| | | | | Signed-off-by: Bo Yang <boyang@novell.com> (cherry picked from commit d50a487b11c4c256c674327344a824e97eeb620e)
* Backport of the clean event context after fork andBo Yang2009-01-281-32/+0
| | | | | krb5 refresh chain fixes. (cherry picked from commit 80a37595ef5c289fcc02a8902e18eb9ab289b28c)
* Fix race condition in alarm lock processing noticed by Richard Sharpe ↵Jeremy Allison2009-01-281-1/+1
| | | | | | | | | | | | | | | | <realrichardsharpe@gmail.com>. "It seems to me that if the lock is already held by another process when we enter this code, there is a race between the timeout and the granting. If the lock is subsequently granted, the process releasing the lock will signal the wait variable (or whatever) and our process will be scheduled. However, if the timeout occurs before we are scheduled, the timeout will be delivered first. We will have the lock but will forget we have the lock, and never release it." Jeremy. (cherry picked from commit 0e30f6d835016a73e89e3159d827a2703058d34b)
* Fix the build (event context init was different).Jeremy Allison2009-01-281-1/+22
| | | | | Jeremy. (cherry picked from commit aef7ad9d2f65c5e2a3b9622b352cafd30be79663)
* clean event context after child is forked.Bo Yang2009-01-282-0/+9
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 7045272e5436e3a24d187945e405cb3cc407ce73)
* Fix bug 5913.Volker Lendecke2009-01-281-1/+1
| | | | | Never seen this to be a problem, but it doesn't hurt either :-) (cherry picked from commit 3577e583eeabb0555dc1ec1dd231ca835d90d307)
* s3:dbwrap: fix dbwrap_store_uint32() to match dbwrap_store_int32()Stefan Metzmacher2009-01-281-2/+2
| | | | | | | | | All callers expect 0 an success and -1 on error. metze (cherry picked from commit a255f9ce713b29552722ec73e4038226959e1c8e) (cherry picked from commit 9aa543fee7ebcc95125d18868bdec7e4bf577d8a) (cherry picked from commit c0fc381ac7ad09fd454fd6802149c46b607069ee)
* Add code to test write_data_iov a bitVolker Lendecke2009-01-281-0/+11
| | | | (cherry picked from commit c364d44de2285cabb83a0c105f061b8640a3a431)
* Make write_data use write_data_iovVolker Lendecke2009-01-281-24/+24
| | | | (cherry picked from commit 6bfcf1904ef50b74656d1cfb7f11b730481d2c6c)
* Add write_data_iovVolker Lendecke2009-01-281-0/+69
| | | | (cherry picked from commit 2d05db409e11443480c8cdc52e205f57aa512fba)
* Add sys_writevVolker Lendecke2009-01-281-0/+14
| | | | (cherry picked from commit 9f6710abfaafa4b918b0c55547d5cd0823a26a56)
* Fix bug 5969: Optimize smbclient put commandVolker Lendecke2009-01-281-5/+20
| | | | | This used to be checkin 3f0406f6 to master (cherry picked from commit e504256f84927c9b22df3945a3e95baaa9bf7063)
* Fix logging to syslogDan Sledz2008-12-091-1/+1
| | | | (cherry picked from commit 66c08857fbf78a24e7770e1d1bf8938bb938b271)
* Fix bug #5928 - Option --version in testparm does not work.Tomasz Krasuski2008-12-091-1/+1
| | | | (cherry picked from commit 635373512634a05d65b009e4ec3669a227b2b94d)
* Change sockaddr util function names for consistency and to eliminate name ↵Tim Prouty2008-12-092-12/+12
| | | | | | conflicts (cherry picked from commit 10dd8a54ea7ea2cf86de5e20a62912298e0c4acc)
* Fix circular dependency error with autoconf 2.6.3.Andreas Schneider2008-12-091-0/+2
| | | | | Signed-off-by: Andreas Schneider <anschneider@suse.de> (cherry picked from commit ca172884bb9f64980d46d3e2cecd6189075cc983)
* Make memcache_add_talloc NULL out the source pointerVolker Lendecke2008-12-092-3/+13
| | | | | | This is an orthogonality measure to make clear this pointer now belongs to the cache. (cherry picked from commit b0031a6e86565857e602f8011e57e2114835581a)
* Actually finish memcache_add_tallocVolker Lendecke2008-12-091-1/+18
| | | | | | | | This fixes a memleak found by Martin Zielinski <mz@seh.de>. Thanks for looking closely! Volker (cherry picked from commit 26b1fda4020b7f6629865ae1c62e9b464222e1a2)
* Rename some variables in getpwnam_alloc() for clarityVolker Lendecke2008-12-091-10/+11
| | | | (cherry picked from commit 71bc142bea33af124f07b6244f97bde289fe3a2d)
* sys_pwnam doesn't return talloced memory, so don't mix up the returned struct.Volker Lendecke2008-12-091-4/+1
| | | | (cherry picked from commit eb99923991960e53bd150ac8f1d818cb746101b4)
* Coverity fix #CID: 607 - resource leak on error path.Jeremy Allison2008-12-091-0/+1
| | | | | Jeremy. (cherry picked from commit 2d06ea18caf0cb764bb20e80828d791bf497eae4)
* Remove the requirement for ldap call made as root. Add in securityJeremy Allison2008-12-091-7/+0
| | | | | | | checks for all SAMR calls. Jeremy. (cherry picked from commit b848f96d747fb41c074dd073f24f186539257d71) (cherry picked from commit b339f17132b18edad52b4c2f6b348e4b8d789bcb)
* Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.Jeremy Allison2008-12-091-0/+11
| | | | | | Jeremy. (cherry picked from commit 82ec832f7edffe2fcfd1bb067e092c159bed2973) (cherry picked from commit 042e50f8709cfbe45d5b184cb3c4fe1b16bdc3b0)
* Unify the logic in pull_ascii_base_talloc() and pull_ucs2_base_talloc().Jeremy Allison2008-12-091-7/+27
| | | | | | Jeremy. (cherry picked from commit 5109bd33719a4bb1534cb0e012c92ec778fb26df) (cherry picked from commit 01fd94981e322da59ac2c00055220c89de135ebe)