summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
2010-02-08s3-net: fix net ads dns usage calls.Günther Deschner1-3/+8
Bjoern, please check. Guenther
2010-02-08s3:pdb_ldap: don't search for the users primary group, if we already know itStefan Metzmacher1-31/+35
metze
2010-02-08s3:pdb_ldap: optimize ldapsam_alias_memberships() and cache ldap searches.Stefan Metzmacher2-7/+34
ldapsam_alias_memberships() does the same LDAP search twice, triggered via add_aliases() from create_local_nt_token(). This happens when no domain aliases are used. metze
2010-02-08s3:pdb_ldap: try to build the full unix_pw structure with ldapsam:trusted ↵Stefan Metzmacher1-5/+85
support And also store the gid_to_sid mappings in the idmap_cache. metze
2010-02-08s3:passdb: speed up pdb_get_group_sid()Stefan Metzmacher1-5/+28
Use the cached version gid_to_sid() instead of pdb_gid_to_sid(). And also avoid the expensive lookup_sid() call for wellkown domain groups. metze
2010-02-08s3: Make pdb_copy_sam_account also copy the group sidVolker Lendecke1-0/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-08s3: shortcut gid_to_sid when "ldapsam:trusted = yes"Stefan Metzmacher1-0/+71
The normal gid_to_sid behaviour is to call sys_getgrgid() to get the name for the given gid and then call the getsamgrnam passdb method for the resulting name. In the ldapsam:trusted case we can reduce the gid_to_sid operation to one simple search for the gidNumber attribute and only get the sambaSID attribute from the correspoinding LDAP object. This reduces the number of ldap roundtrips for this operation. metze
2010-02-09s3: Don't invalidate cache for uninitialized domains.Bo Yang3-1/+52
Signed-off-by: Bo Yang <boyang@samba.org>
2010-02-08s3: quiet the unresolved symbol warnings of the Compaq compiler when linking ↵Björn Jacke1-0/+11
our vfs modules
2010-02-07s3: fix build issue on Tru64Björn Jacke1-7/+7
Thanks, Volker for the hint - acl_type is a macro on Tru64. Renamed it to acltype. This fixes #7103.
2010-02-07s3: Fix some DEBUG statementsVolker Lendecke1-2/+2
2010-02-07s3: Make cli_get_fs_volume_info() use cli_trans()Volker Lendecke3-41/+28
2010-02-07s3: Remove some unused codeVolker Lendecke2-58/+0
2010-02-07s3: Fix some commentsVolker Lendecke1-2/+2
2010-02-07s3: Fix some nonempty blank linesVolker Lendecke3-53/+53
2010-02-06tdb: raise version to 1.2.1Simo Sorce1-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.
2010-02-05Fix trailing whitespace errors I added (sorry).Jeremy Allison2-5/+5
Jeremy.
2010-02-05s3-events: make the old timed events compatible with teventAndrew Tridgell1-2/+19
tevent ensures that a timed event is only called once. The old events code relied on the called handler removing the event itself. If the handler removed the event after calling a function which invoked the event loop then the timed event could loop forever. This change makes the two timed event systems more compatible, by allowing the handler to free the te if it wants to, but ensuring it is off the linked list of events before the handler is called, and ensuring it is freed even if the handler doesn't free it.
2010-02-05s3-smbd: add a rate limited cleanup of brl, connections and locking dbAndrew Tridgell1-6/+42
On unclean shutdown we can end up with stale entries in the brlock, connections and locking db. Previously we would do the cleanup on every unclean exit, but that can cause smbd to be completely unavailable for several minutes when a large number of child smbd processes exit. This adds a rate limited cleanup of the databases, with the default that cleanup happens at most every 20s
2010-02-05s3-brlock: we don't need these MSG_SMB_UNLOCK calls nowAndrew Tridgell2-10/+0
These have been replaced with the min timeout in blocking.c
2010-02-05s3-brlock: add a minimim retry time for pending blocking locksAndrew Tridgell1-0/+20
When we are waiting on a pending byte range lock, another smbd might exit uncleanly, and therefore not notify us of the removal of the lock, and thus not trigger the lock to be retried. We coped with this up to now by adding a message_send_all() in the SIGCHLD and cluster reconfigure handlers to send a MSG_SMB_UNLOCK to all smbd processes. That would generate O(N^2) work when a large number of clients disconnected at once (such as on a network outage), which could leave the whole system unusable for a very long time (many minutes, or even longer). By adding a minimum re-check time for pending byte range locks we avoid this problem by ensuring that pending locks are retried at a more regular interval.
2010-02-05Remove now unused variable.Jeremy Allison1-1/+0
Jeremy.
2010-02-05Fix bug 7104 - "wide links" and "unix extensions" are incompatible.Jeremy Allison4-38/+10
Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow that link anyway. Correct DEBUG message in check_reduced_name() to add missing "\n" so it's really clear when a path is being denied as it's outside the enclosing share path. Jeremy.
2010-02-05s3: Make use of ZERO_STRUCTPVolker Lendecke1-1/+2
2010-02-05s3: Remove a pointless if-statementVolker Lendecke1-1/+1
2010-02-05s3: Make guest_user_info() staticVolker Lendecke2-2/+1
2010-02-05s3: Hide some uses of pdb_get_init_flags (which I would love to remove...)Volker Lendecke2-2/+2
2010-02-05s3: Fix some nonempty blank linesVolker Lendecke2-35/+34
2010-02-05s3: normalize "Changing password for" msg IDs and STRsLars Müller18-30/+30
An additional space at the end of the "Changing password for" msgid lead to untranslated pam_winnind messages.
2010-02-04Fix bug 7075 - bug in vfs_scannedonly rmdir implementation.Jeremy Allison1-1/+5
Check for NULL on opendir, correctly call next rmdir. Jeremy.
2010-02-04s3:passdb: fix a type Domain Users has RID -513Stefan Metzmacher1-1/+1
metze
2010-02-04s3:libsmb: don't reuse the callers stype variable in cli_NetServerEnum()Stefan Metzmacher1-2/+3
When we need to do more than one network operation to get the browse list we need to use the same 'stype' value each time. metze
2010-02-04s3:nsswitch: also use pthread CFLAGS for the nsswitch modules that might ↵Björn Jacke1-1/+1
require it
2010-02-04s3: fix build on Tru64 after it broke with deactivating pthread pool supportBjörn Jacke1-3/+6
2010-02-04s3:vfs_scannedonly: fix build on HP-UXBjörn Jacke1-0/+6
2010-02-03s3: Simplify the code a bit: Catch (len==0) earlyVolker Lendecke1-7/+4
2010-02-02Fix bug 7081 - vfs_expand_msdfs doesn't work correctly (with fix identified)Jeremy Allison1-3/+16
Fix inspired by idea from Eric Horst <erich@cac.washington.edu>. Jeremy.
2010-02-02Fix bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.Jeremy Allison1-2/+9
Reported and found by Martin Hochreiter <linuxbox@wavenet.at>. Ensure we copy the right amount of registry data into the outgoing buffer. Jeremy.
2010-02-02s3:configure: check complete set of EA functions only when we found at least oneBjörn Jacke1-28/+18
this saves us some time in configure
2010-02-02Change uint_t to unsigned int in source3Matt Kraai2-8/+8
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-01Add debug to make it clear when EA dosmode set is invoked.Jeremy Allison1-0/+5
Jeremy.
2010-02-01Fix bug #7084 - Create time on directories not stored properly in an EA in ↵Jeremy Allison1-7/+0
new create time code. Remove erroneous optimisation that caused no EA to be set if calculated btime matched st_ex btime, and calculated DOS attribute matched existing file attribute. Jeremy.
2010-02-01Torture test for bug 7084 - Create time on directories not stored properly ↵Jeremy Allison2-1/+88
in an EA in new create time code. Ensure new files in a directory don't reset the create time. Jeremy.
2010-02-01Arg. Got the sense of the test reversed to fix bug #7080 - Quota only shown ↵Jeremy Allison1-1/+1
when logged as root.. Doh ! Jeremy.
2010-02-01Fix bug #7080 - Quota only shown when logged as root.Jeremy Allison1-1/+1
conn->server_info->utok.uid == 0 isn't the correct check to see if we're root anymore. As rpc_samr_nt.c does, the correct check is : geteuid() == sec_initial_uid() Jeremy.
2010-01-31s3: Fix some DEBUG messagesVolker Lendecke1-3/+3
2010-01-30Fix bug #7079 - cliconnect gets realm wrong with trusted domains.Jeremy Allison4-3/+91
Passing NULL as dest_realm for cli_session_setup_spnego() was always using our own realm (as for a NetBIOS name). Change this to look for the mapped realm using krb5_get_host_realm() if the destination machine name is a DNS name (contains a '.'). Could get fancier with DNS name detection (length, etc.) but this will do for now. Jeremy.
2010-01-30s3/smbd: Fix string buffer overflow causing heap corruptionSteven Danneman1-1/+2
The destname malloc size was not taking into account the 1 extra byte needed if a string without a leading '/' was passed in and that slash was added. This would cause the '\0' byte to be written past the end of the malloced destname string and corrupt whatever heap memory was there. This problem would be hit if a share name was given in smb.conf without a leading '/' and if it was the exact size of the allocated STRDUP memory which in some implementations of malloc is a power of 2.
2010-01-29Fix a really interesting problem found by Volker's conversion of ↵Jeremy Allison1-3/+3
sessionsetup SPNEGO to asynchronous code. Normally clistr_push_fn() can depend upon cli->outbuf being initialized by negprot and sessionsetup packets, and cli->outbuf[smb_flgs2] being correctly set with FLAGS2_UNICODE_STRINGS when cli_setup_packet() is called. When all the sessionsetups are async, then cli_setup_packet() is never called, the async code uses cli_setup_packet_buf() - which initializes the allocated async buffer, not the cli->outbuf one. So the first time clistr_push_fn() is called is from libsmb/clidfs.c:cli_dfs_get_referral(), just after the connection and tconX. In this case cli->outbuf has never been initialized, and cli->outbuf[smb_flgs2] = 0 so the DFS query pushes ASCII on the wire, which is not what we want :-). Remove the dependency on cli->outbuf[smb_flgs2] in clistr_push_fn(), and fake up a SVAL(cli->outbuf, smb_flg2) value using cli_ucs2(cli) function instead, which has been initialized. We only care about the FLAGS2_UNICODE_STRINGS bit anyway. I don't think this is an issue for 3.5.0 as the sessionsetup is still synchronous there, but Volker PLEASE CHECK ! Jeremy.
2010-01-29s3: link thread objects in libsmbclient only and adjust linker flagsBjörn Jacke1-8/+10