summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
* s3:smbd/service: switch load_registry_service/shares to use loadparm routinesMichael Adam2009-04-291-70/+3
| | | | | | | | | | | | | instead of reading the registry directly with tdb and activating the configure options by hand. This eliminates the need for repeating checks done in loadparm. For instance it disables registry shares without path in the server as is the case with text based shares. Michael (cherry picked from commit 077bcc11257697b243916fbb02cd72b3a122b9ba) (cherry picked from commit 502bfe9352d36ee909d7210a9d0ec0b6c7db5149)
* Revert "Do not use the file system GET_REAL_FILENAME for mangled names"Volker Lendecke2009-04-281-23/+7
| | | | | This reverts commit c8cc6da0ab4441ce7b22cf00eed05290e91530c4. (cherry picked from commit c7d5e046d8fa4097fc16a3dee10e95b83a8c8e55)
* Fix profile acls in some corner casesSimo Sorce2009-04-281-3/+18
| | | | | | Always add back the real original owner of the directory in the ACE List after we steal its ACE for the Administrators group. (cherry picked from commit 5d8f374ad75e06354ac27f34e3f44b3d459ac2ef)
* Avoid duplicate acesSimo Sorce2009-04-281-7/+48
| | | | | | | When adding arbitrary aces to an nt_ace_list we need to make sure we are not actually adding a duplicate. add_or_replace_ace() takes care of doing the right thing. (cherry picked from commit 89dfbdba515b5be32f535a112a7f1019884aa651)
* s3-secdesc: use SEC_FLAG_SYSTEM_SECURITY instead of SEC_RIGHT_SYSTEM_SECURITY.Günther Deschner2009-04-281-4/+4
| | | | | | Guenther (cherry picked from commit da92e54236293460e307edd52ca7f1e20c6f23ef) (cherry picked from commit 3e9ee3fa54b514987f40a477b3049b18e87390e9)
* Do not use the file system GET_REAL_FILENAME for mangled namesVolker Lendecke2009-04-281-7/+23
| | | | (cherry picked from commit c8cc6da0ab4441ce7b22cf00eed05290e91530c4)
* Fix bug found by Tim Prouty, logging off and then re-using a vuid can cause ↵Jeremy Allison2009-04-281-0/+11
| | | | | | | | smbd to access a freed structure. Jeremy. (cherry picked from commit e023058f5b774ddbb61e8187aa7dbd2e6e25804d)
* Fix bug #6089 - Winbind samr_OpenDomain not possible with Samba 3.2.6+Jeremy Allison2009-04-281-3/+3
| | | | | | | | What a difference a name makes... :-). Just because something is missnamed SAMR_ACCESS_OPEN_DOMAIN, when it should actually be SAMR_ACCESS_LOOKUP_DOMAIN, don't automatically use it for a security check in _samr_OpenDomain(). Jeremy. (cherry picked from commit 1994a8a5db5c3abd6292b81aa975e7b8fe8311d0)
* We have to deny a level 2 oplock if kernel oplocks are enabledVolker Lendecke2009-04-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | The second r/o opener of a file is supposed to get a level2 oplock. The first opener due to the protection in process_oplock_break_message() has been forced to break to no oplock. The second opener according to locking.tdb gets a level2 oplock. Further down in open_file_ntcreate we try to set this level2 oplock in the kernel, and the non-clustered Linux kernel disallows this. The rules for the kernel leases are a bit baroque, but the attempt to do the SETLEASE correctly fails and we end up with no oplock for any client. In the clustered case however the linux kernel on the second opening node has not seen the open fd of the first node, it is only the cluster fs that has this information. If the cluster fs does not have the very same notion of leases as the local kernel has, we can end up with a WRLCK style kernel lease for the second opener where locking.tdb only indicates a level2 oplock. Getting a kernel oplock break signal with just a level2 oplock in locking.tdb is something smbd is not prepared for. For example after sending out the break in response to the kernel signal we set a timeout, waiting for a reply. More work needs to be done to make level2 kernel oplocks real for us. This patch addresses a real problem we have right now without them. (cherry picked from commit 17962ba589f24b7d2a67474978d06e33adad56c2)
* Fix a memleak in an unlikely error path in change_notify_create()Volker Lendecke2009-04-151-0/+1
| | | | (cherry picked from commit fb8707e2c2d1657294b0660064e1b16590d1ca6c)
* Fix bug #6254 - PUT/GET produces an error in IPv6 to a smb-server(3.3) has ↵Jeremy Allison2009-04-151-18/+23
| | | | | | | | | | | | parameter "msdfs root = yes" This was broken by the refactoring around create_file(). MSDFS pathname processing must be done FIRST. MSDFS pathnames containing IPv6 addresses can be confused with NTFS stream names (they contain ":" characters. Jeremy. (cherry picked from commit b8251a7e01304afce96cb0bee15a1fee2bd57490)
* s3 oplocks: Add back procid_str to debug messageTim Prouty2009-04-151-2/+3
| | | | (cherry picked from commit 130baafc7c36333cf29a19921f4736beb53a15e9)
* s3:kerberos Rework smb_krb5_unparse_name() to take a talloc contextAndrew Bartlett2009-04-151-8/+0
| | | | | | Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 574a6a8c350a4bab3f42f3f9cfb382db721d69b5) (cherry picked from commit 7e6d6eeff3e082d7223264c17cb27c2ab89df9aa)
* s3 onefs: Simplify level 2 oplock self-contentionTim Prouty2009-04-151-74/+5
| | | | | | This removes all oplock dependence on locking.tdb (cherry picked from commit 9d2d07503a17971a63153ecc13fdddb763e614b8) (cherry picked from commit f922e22d907d4a99e91f00f001c05b2b35d73a26)
* s3 oplocks: Refactor level II oplock contentionTim Prouty2009-04-151-63/+59
| | | | | (cherry picked from commit 651fa0964a6c49a071c28cdb1e4891b1d95d5b09) (cherry picked from commit 4e091804b86ae9b8318b985d39e826366681e21b)
* Fix smbd crash for close_on_completionVolker Lendecke2009-04-151-0/+4
| | | | | | | handle_trans() can talloc_free "conn" if the client requests close_on_completion. "state" is a talloc_child of conn, so it will be gone when we later free state->data et al. (cherry picked from commit e9457c598e25ededb48b73d7dc5ab0f6295ea399)
* Use cluster-aware procid_is_me instead of comparing pid'sVolker Lendecke2009-04-151-2/+2
| | | | (cherry picked from commit 4996d89d19655ab6f0d4656ea72d6bad52ba7d6d)
* Use procid_str in debug messages for better cluster-debuggabilityVolker Lendecke2009-04-151-11/+13
| | | | (cherry picked from commit d5bec253f7494dd74cce3acf59ddd417900e5ad3)
* Ensure files starting with multiple dots are hiddenJeremy Allison2009-04-151-4/+8
| | | | | | | if "hide dot files" is set. Thanks to Barry Kelly <bkelly.ie@gmail.com> for pointing this one out. Jeremy. (cherry picked from commit 286d6a404cca02a0d3662f6aa2ddd69d3dcbc17a)
* s3: ifdef sendfile code that's only used in other ifdef'ed sendfile codeBjörn Jacke2009-04-151-0/+2
| | | | | This fixes a "defined but not used" compile warning. (cherry picked from commit 1aa65f485b60a80766581e7d3f31565f340aa528)
* s3:smbd: if we allow trans2 on the IPC$ share, then we have to allow transs2 ↵Stefan Metzmacher2009-04-151-1/+1
| | | | | | | | | | too. Otherwise we'll confuse the client signing engine, when we reply an error to each transs2. metze (cherry picked from commit 7716ad68a8d859ac3651c4eb559b6e45d98566db) (cherry picked from commit 1d11417c71ebcb80851c8b77e9f3102ee9b592f8)
* Ensure we never enter VFS_CREATE without having initializedJeremy Allison2009-04-153-0/+12
| | | | | | | | sbuf as invalid (if not already read via stat()). Still trying to find the build farm RAW-STREAM errors and it's happening in a openX call.... Jeremy. (cherry picked from commit 940c84fcc75085ee4f1180d4d2a8e718142e4eb6)
* Use avahi to register _smb._tcp in smbdVolker Lendecke2009-04-152-0/+181
| | | | (cherry picked from commit 55b7bf7338c13701944169df02ab8e9def6d43a1)
* Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS clientJeremy Allison2009-04-151-2/+7
| | | | | | | Looks like the pathname parsing for POSIX paths got broken when the code for doing Windows streams parsing got added. Jeremy. (cherry picked from commit 8d8c25a34241c1b4a1d40d7ad02bd1e1baa605be)
* s3:smbd: use tevent_loop_once() in the parent event loopStefan Metzmacher2009-04-151-34/+5
| | | | | | metze (cherry picked from commit 450252d2a1981fb04eb62eb095c1b762a96f7727) (cherry picked from commit 3ccc0bd5ea15da6b4daa53d9dcfb6a283330493d)
* s3:smbd: don't exit the parent when we have no connectionsStefan Metzmacher2009-04-151-7/+0
| | | | | | | | | | This code path can't really happen anymore, because launchd support was removed with commit e5a951325a6cac8567af3a66de6d2df577508ae4. But it's confusing to have that code there... metze (cherry picked from commit 445b37f4f35ff4256c46dbacc2d3b3a1e47e62b2) (cherry picked from commit a527e24b80abf5aeaafdd67db21b5b021d1effe0)
* Convert np_read to tevent_reqVolker Lendecke2009-04-152-18/+15
| | | | (cherry picked from commit 1f9bfa0673d47adcd62ceee5605788cc11201f3c)
* Convert np_write to tevent_reqVolker Lendecke2009-04-152-26/+27
| | | | (cherry picked from commit 15ff8c88fbf1f417e8a0b0e0c25524d692d63a37)
* s3: Add strict lock/unlock calls to the vfs layer to replace is_lockedDave Richards2009-04-151-63/+116
| | | | (cherry picked from commit 2d5e98e7e5a737dde360ab3490fff786fa0703b6)
* Fix bug #6186 - map readonly does not workJeremy Allison2009-03-121-3/+25
| | | | Jeremy.
* s3:signing: the seqnum should only be decremented by 1 for ntcancel requestsStefan Metzmacher2009-03-062-5/+5
| | | | | | | | | [MS-SMB] 3.3.5.1 Receiving Any Message says that the seqnum is incremented by only for ntcancel requests for any other request it's by incremented by 2, even if it doesn't expect a response. metze
* Fix bug #6160 - Office 2007 fails saving files to a Samba mapped drive.Jeremy Allison2009-03-051-0/+22
| | | | | Confirmed by reporters. Jeremy.
* s3: Change open_streams_for_delete to call through the vfs layerTim Prouty2009-03-041-5/+7
| | | | This eliminates the last direct caller of create_file_unixpath
* Second part of fix for #6154, ensure we return max accessJeremy Allison2009-03-041-0/+9
| | | | | if admin user. Jeremy.
* Fix bug #6154 - zfs does not honor admin users.Jeremy Allison2009-03-041-0/+5
| | | | Jeremy
* Fix bug #6155 - "force group" is no longer working as expected.Jeremy Allison2009-03-033-3/+17
| | | | | | | We need to store the "force group" uid separately from the conn->server_info token as we need to apply it separately also. Volker PLEASE CHECK ! Jeremy.
* Only copy sharename up from rap_to_pjobidVolker Lendecke2009-03-011-2/+1
| | | | | | | | | | | | | | Why?? :-) Another one of the little micro-optimizations that I just came across: If you allocate a variable in a sub-block like the "fstring sharename" in write_file(), gcc even with -O3 will allocate this variable unconditionally on the stack at the beginning of the routine. So with eliminating this fstring we cut 256 bytes of stack in a very hot code path writing to a file. It might make us a bit more cache-friendly. This would probably not be worth a second look if it involved larger code changes, but this one was just too simple to let it pass :-)
* Fix bug #6082 - smbd_gpfs_getacl failed: Windows client can´t rename orJeremy Allison2009-02-281-0/+19
| | | | | delete file (directory fix). Jeremy.
* s3-spoolss: use DSPRINT flags instead of SPOOLS_DS flags.Günther Deschner2009-02-271-1/+1
| | | | Guenther
* Make us pass the RAW-RENAME torture test I just added.Jeremy Allison2009-02-262-0/+53
| | | | | | | Inside a directory, keep a file open and then renaming the directory should fail with ACCESS_DENIED. Jeremy.
* Fix more POSIX path lstat calls. Fix bug where close can returnJeremy Allison2009-02-251-5/+17
| | | | | | | | | failure if we have a pending modtime and the containing directory of the file has been renamed (there is no POSIX "update time by fd" call). This can't happen on Windows as the rename will fail if there are open files beneath it. Will add a torture test for this. Jeremy.
* Make test for open modes more robust against other bits.Jeremy Allison2009-02-251-1/+1
| | | | Jeremy.
* Fix bug in processing of open modes in POSIX open.Jeremy Allison2009-02-251-0/+2
| | | | | | | Was missing case of "If file exists open. If file doesn't exist error." Damn damn damn. CIFSFS client will have to have fallback cases for this error for a long time. Jeremy.
* Fix some NetBSD warnings.Jeremy Allison2009-02-251-1/+1
| | | | Jeremy.
* Allow set attributes on a stream fnum to be redirected to the base filename.Jeremy Allison2009-02-241-2/+10
| | | | | Fixes the new RAW-STREAMS torture test. Jeremy.
* s3 OneFS: Fix a double free in an error pathTim Prouty2009-02-231-3/+2
|
* More warning fixes for Solaris.Jeremy Allison2009-02-234-30/+30
| | | | Jeremy.
* s3: If sendfile returns 0 bytes read, fall back to the normal read pathTim Prouty2009-02-211-0/+24
| | | | | | This allows sendfile implementations that are atomic to avoid having to send zeros or kill the client connection on a short read (usually the file was truncated).
* Remove the static "chal" from ntlmssp.c:get_challenge()Volker Lendecke2009-02-212-6/+6
|
* Do not close an fd we know is -1Volker Lendecke2009-02-211-1/+0
|