summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
* Fix trailing whitespace errors I added (sorry).Jeremy Allison2010-02-052-5/+5
| | | | Jeremy.
* s3-smbd: add a rate limited cleanup of brl, connections and locking dbAndrew Tridgell2010-02-051-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
* s3-brlock: we don't need these MSG_SMB_UNLOCK calls nowAndrew Tridgell2010-02-051-2/+0
| | | | These have been replaced with the min timeout in blocking.c
* s3-brlock: add a minimim retry time for pending blocking locksAndrew Tridgell2010-02-051-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.
* Remove now unused variable.Jeremy Allison2010-02-051-1/+0
| | | | Jeremy.
* Fix bug 7104 - "wide links" and "unix extensions" are incompatible.Jeremy Allison2010-02-053-37/+9
| | | | | | | | | | | | | | | 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.
* Add debug to make it clear when EA dosmode set is invoked.Jeremy Allison2010-02-011-0/+5
| | | | Jeremy.
* Fix bug #7084 - Create time on directories not stored properly in an EA in ↵Jeremy Allison2010-02-011-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.
* Arg. Got the sense of the test reversed to fix bug #7080 - Quota only shown ↵Jeremy Allison2010-02-011-1/+1
| | | | | | when logged as root.. Doh ! Jeremy.
* Fix bug #7080 - Quota only shown when logged as root.Jeremy Allison2010-02-011-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.
* s3/smbd: Fix string buffer overflow causing heap corruptionSteven Danneman2010-01-301-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.
* Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to ↵Jeremy Allison2010-01-261-0/+8
| | | | | | | | | respond to a read or write. Only works on Linux kernels 2.6.26 and above. Grants CAP_KILL capability to allow Linux threads under different euids to send signals to each other. Jeremy.
* Correct fix for unused variable return from ndr_decode. Use it :-).Jeremy Allison2010-01-251-0/+8
| | | | Jeremy.
* Revert "s3: remove unused Variable"Jeremy Allison2010-01-251-0/+4
| | | | | | | | | This reverts commit 9536d94d5478b63fc05047964b40d8786a7246c4. Bjorn, your change removed the ndr_decoding of the dos attribute. Not a good idea :-). Jeremy.
* s3: remove unused VariableBjörn Jacke2010-01-261-4/+0
| | | | Jeremy, please check!
* s3: Fix some nonempty blank linesVolker Lendecke2010-01-231-3/+3
|
* s3: Initialize the seqnum in "init_smb_request"Volker Lendecke2010-01-211-4/+4
| | | | | This makes it a bit more obvious for me that the signing sequence number is tied to the SMB request.
* s3: Make "init_smb_request" static to process.cVolker Lendecke2010-01-211-4/+2
|
* s3: Fix a typoVolker Lendecke2010-01-191-1/+1
|
* s3: Remove a comment from ancient times that no longer appliesVolker Lendecke2010-01-191-1/+0
|
* s3: Protect against an invalid bcc in SMBsendtxtVolker Lendecke2010-01-171-1/+1
|
* Make file access control decisions a lot easier to debug (at level 10).Jeremy Allison2010-01-121-0/+11
| | | | Jeremy.
* Fix bug #7033 - SMBrmdir call always returns true, even on failure to delete ↵Jeremy Allison2010-01-121-2/+6
| | | | | | | | a directory. Argh. Missed the second (and essential) part of the fix for the above :-(. Jeremy
* Fix bug #7033 - SMBrmdir call always returns true, even on failure to delete ↵Jeremy Allison2010-01-121-2/+6
| | | | | | | | | | | a directory. There is a codepath missing to propagate back error returns from the rmdir POSIX call inside close_directory when delete on close is set. This means doing an rmdir on a Windows command line will always report success, even when the directory was not deleted. This fix adds that codepath back into Samba. Jeremy.
* Fix bug #6876 - Delete of an object whose parent folder does not have delete ↵Jeremy Allison2010-01-122-3/+7
| | | | | | | | | | rights fails even if the delete right is set on the object. Final fix for the vfs_acl_xattr and vfs_acl_tdb code. Ensure we can delete a file even if the underlying POSIX permissions don't allow it, if the Windows permissions do. Jeremy.
* Remove the global char *LastDir.Jeremy Allison2010-01-123-22/+1
| | | | This is no longer used for anything.
* s3-lanman: Allow a level2 descriptor for a level1 NetShareGetInfoGiovanni Bajo2010-01-111-1/+3
| | | | | | | | Windows seems to allow this http://lists.samba.org/archive/samba-technical/2009-November/068116.html has a dump of this.
* s3: Remove the typedef for "auth_serversupplied_info"Volker Lendecke2010-01-103-6/+6
|
* s3: Remove the typedef for "auth_usersupplied_info"Volker Lendecke2010-01-101-2/+2
|
* Re-fix bug 5202 - cannot change ACLs on writable file with "dos filemode=yes"Jeremy Allison2010-01-081-0/+3
| | | | | | | | | | | | | | | This bug re-occurred for 3.3.x and above. The reason is that to change a NT ACL we now have to open the file requesting WRITE_DAC and WRITE_OWNER access. The mapping from POSIX "w" to NT permissions in posix_acls doesn't add these bits when "dos filemode = yes", so even though the permission or owner change would be allowed by the POSIX ACL code, the NTCreateX call fails with ACCESS_DENIED now we always check NT permissions first. Added in the mapping from "w" to WRITE_DAC and WRITE_OWNER access. Jeremy.
* s3:smbd:password_in_history: treat entry with 0 salt as 0 + plain nt hashMichael Adam2010-01-071-6/+24
| | | | | | | | | | | | | This is to introduce a new format of the password history, maintaining backwards compatibility: The old format was 16 byte hash + 16 byte md5(salt + nt hash). The new format is 16 zero bytes and 16 bytes nt hash. This will allow us to respect the last X entries of the nt password history when deciding whether to increment the bad password count. This is part of the fix for bug #4347 . Michael
* s3: Remove some code that has become unnecessaryVolker Lendecke2010-01-071-8/+0
| | | | | | | | | | | | | | | | | | | The code I just removed was checked in with e5466fffc286a99f as a bug fix for https://bugzilla.samba.org/show_bug.cgi?id=3319. With the changes to is_visible_file made with 9e8b8f8c16612 these lines have become unnecessary, even with "hide unreadable = yes" dead msdfs symlinks show. This is because we can not stat(2) them and default to showing them. Why this change? I have a user who wants to use "hide unreadable" on msdfs links. Because you can't edit acls on symlinks themselves, the user created the targets as bogus, empty files that just exist as acl placeholders. With the code in place that this patch removes, we never allow this to work. Jeremy, please check! :-) Thanks, Volker
* s3: Factor password_in_history() out of check_passwd_history()Volker Lendecke2010-01-071-25/+41
|
* s3: Fix a typoVolker Lendecke2010-01-071-1/+1
|
* s3: Avoid a memset(, 0, ) callVolker Lendecke2010-01-071-2/+1
|
* Fix bug #7020 - smbd using 2G memory.Jeremy Allison2010-01-051-0/+10
| | | | | | | | When deferring an async pipe writeX and readX transfer the outstanding request struct onto the conn struct. This needs freeing after the packet is finally processed. Jeremy.
* The posix acl version of set_nt_acl() could set the stat_exJeremy Allison2009-12-231-7/+15
| | | | | | | | struct in the fsp->fsp_name pointer incorrectly for a directory. Fix this. Make map_canon_ace_perms() public. Jeremy.
* s3:ntlmssp: only include ntlmssp.h where actually neededAndrew Bartlett2009-12-223-0/+3
| | | | Andrew Bartlett
* s3: Move smb_splice_chain to smbd/process.c, its only userVolker Lendecke2009-12-221-0/+174
|
* Fix bug reported in mangle_hash code (no bugid yet).Jeremy Allison2009-12-211-0/+9
| | | | | | | Don't change the contents of a const string via a pointer alias (or if you do, change it back.....). Jeremy.
* Rename reply_doserror() -> reply_force_doserror().Jeremy Allison2009-12-214-29/+21
| | | | | | | Rewrite all calls to reply_nterror(NT_STATUS_DOS()) to reply_force_doserror() and update the comment in smbd/error.c Jeremy.
* Remove all calls to reply_doserror - turn them intoJeremy Allison2009-12-216-120/+121
| | | | | | | correct reply_nterror calls. Next rename reply_doserror -> reply_force_doserror and plumb in when NT_STATUS_DOS is used. Jeremy.
* Actually explain the twisty paths of tortured logic behindJeremy Allison2009-12-181-14/+42
| | | | | | | | | reply_doserror(), reply_nterror(), and reply_nterror(NT_STATUS_DOS()). Fix the call in rely_openerror() to actually force a DOS error for "too many open files". Jeremy.
* reply_doserror() doesn't force DOS errors on the wire.Jeremy Allison2009-12-181-10/+10
| | | | | | | | | | | Start migrating uses of reply_doserror() to reply_nterror() with the correct mapping. Eventually we'll get to the point where we can change reply_doserror() to force a DOS error code on the wire, and can change calls to reply_nterror(req, NT_STATUS_DOS()) - which *does* force DOS errors on the wire - to reply_doserror(). Which might actually make the server code look like it's making sense. Jeremy.
* Always map EMFILE to ERRDOS, ERRnofids, *NOT* NT_STATUS_TOO_MANY_OPENED_FILES.Jeremy Allison2009-12-171-0/+4
| | | | | | This is what W2KR3 does for NTCreateX and openX calls. May be the correct fix for bug 6837 - "Too many open files" when trying to access large number of files. Jeremy.
* Vector correctly through reply_openerror() (which uses the same logic).Jeremy Allison2009-12-171-6/+1
| | | | Jeremy.
* Fix bug #6939 - mangling method = hash breaks long filenames.Jeremy Allison2009-12-171-1/+4
| | | | | | | We were returning the wrong sense of the bool. must_mangle() has to return !NT_STATUS_IS_OK, not NT_STATUS_IS_OK. Jeremy.
* Add helpful debug of DACL for errors on ACL access.Jeremy Allison2009-12-161-2/+10
| | | | Jeremy.
* Ensure dos_mode can return FILE_ATTRIBUTE_NORMAL, then filter the returned ↵Jeremy Allison2009-12-152-18/+25
| | | | | | | attributes by protocol level. This makes us consistant in returning DOS attrs across all replies. Tested on OS/2 by Günter Kukkukk. Jeremy.
* s3: Fix a very embarrassing build failureVolker Lendecke2009-12-121-2/+2
|