summaryrefslogtreecommitdiffstats
path: root/source3/smbd/service.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug 7104 - "wide links" and "unix extensions" are incompatible.Jeremy Allison2010-02-051-0/+8
| | | | | | | | | | | | | | | 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.
* 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.
* streamline some log levels for invalid servicenamesChristian Ambach2009-12-061-1/+1
| | | | | | | | | | | | I don't think we need to log the fact that a user gave a wrong sharename in Explorer with the highest log level. The level of this was not very consistent: service.c: DEBUG(3,("find_service() failed to find service %s\n", service)); service.c: DEBUG(0,("%s (%s) couldn't find service %s\n", smb2_tcon.c: DEBUG(1,("smbd_smb2_tree_connect: couldn't find service %s\n", This changes the last two to 3 as the first one. Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
* Fix for CVE-2009-2813.Jeremy Allison2009-10-011-1/+5
| | | | | | | | | | | | | | | =========================================================== == Subject: Misconfigured /etc/passwd file may share folders unexpectedly == == CVE ID#: CVE-2009-2813 == == Versions: All versions of Samba later than 3.0.11 == == Summary: If a user in /etc/passwd is misconfigured to have == an empty home directory then connecting to the home == share of this user will use the root of the filesystem == as the home directory. ===========================================================
* Second attempt at fix for bug 6529 - Offline files conflict with Vista and ↵Jeremy Allison2009-08-241-18/+1
| | | | | | | | Office 2003. Confirmation from reporter that this fixes the issue in master on ext3/ext4. Back-ports to follow. Jeremy.
* Log debug message when hires timestamps are available on theJeremy Allison2009-08-211-0/+4
| | | | | share. Jeremy.
* Fix bug 6529 - Offline files conflict with Vista and Office 2003Jeremy Allison2009-08-211-0/+13
| | | | | | | | On filesystems that can't store less than one second timestamps, round the incoming timestamp set requests so the client can't discover that a time set request has been truncated by the filesystem. Needs backporting to 3.4, 3.3, 3.2 and (even) 3.0. Jeremy
* s3:smbd: remove dirptr and dirpath from connection_structStefan Metzmacher2009-08-071-2/+0
| | | | | | | They're both only used in the context of a function, so we can make them stack variables. metze
* s3:smbd: add a smbd_server_connection pointer to connection_structStefan Metzmacher2009-08-071-17/+16
| | | | | | | This can be NULL for faked connection structs used in the rpc server or printing code. metze
* do not log chdir with level 0 if reason is access deniedChristian Ambach2009-07-211-2/+2
| | | | | | | | | | | | | this changes the level of logs caused by users trying to access shares or subdirectories for which they do not have access to in the ACL this can fill up the samba log even with log level 0 and is more an expected kind of logs that IMHO should not be logged with such a high level. All other errors while chdir() will still be logged with level 0 Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
* Revert this commit :Jeremy Allison2009-07-141-80/+0
| | | | | | | | | | | s3: Make smbd aware of permission change of usershare. Since usershare are relatively volatile and non-previledge users must disconnect from smbd and reconnect to it to make share permission in effect. For now. This is a feature request and I think we need to design it a little differently so as not to touch core change_to_user() code. Jeremy.
* s3: Make smbd aware of permission change of usershare. Since usershare are ↵Bo Yang2009-07-151-0/+80
| | | | relatively volatile and non-previledge users must disconnect from smbd and reconnect to it to make share permission in effect.
* s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTATTim Prouty2009-06-241-6/+12
| | | | | | | | | | | | | This patch introduces two new temporary helper functions vfs_stat_smb_fname and vfs_lstat_smb_fname. They basically allowed me to call the new smb_filename version of stat, while avoiding plumbing it through callers that are still too inconvenient. As the conversion moves along, I will be able to remove callers of this, with the goal being to remove all callers. There was also a bug in create_synthetic_smb_fname_split (also a temporary utility function) that caused it to incorrectly handle filenames with ':'s in them when in posix mode. This is now fixed.
* s3:smbd: make make_connection_snum() non staticStefan Metzmacher2009-06-031-2/+1
| | | | metze
* s3:smbd: move tcon specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-18/+19
| | | | metze
* s3:smbd: move more session specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-17/+25
| | | | metze
* Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke2009-05-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces struct stat_ex { dev_t st_ex_dev; ino_t st_ex_ino; mode_t st_ex_mode; nlink_t st_ex_nlink; uid_t st_ex_uid; gid_t st_ex_gid; dev_t st_ex_rdev; off_t st_ex_size; struct timespec st_ex_atime; struct timespec st_ex_mtime; struct timespec st_ex_ctime; struct timespec st_ex_btime; /* birthtime */ blksize_t st_ex_blksize; blkcnt_t st_ex_blocks; }; typedef struct stat_ex SMB_STRUCT_STAT; It is really large because due to the friendly libc headers playing macro tricks with fields like st_ino, so I renamed them to st_ex_xxx. Why this change? To support birthtime, we already have quite a few #ifdef's at places where it does not really belong. With a stat struct that we control, we can consolidate the nanosecond timestamps and the birthtime deep in the VFS stat calls. At this moment it is triggered by a request to support the birthtime field for GPFS. GPFS does not extend the system level struct stat, but instead has a separate call that gets us the additional information beyond posix. Without being able to do that within the VFS stat calls, that support would have to be scattered around the main smbd code. It will very likely break all the onefs modules, but I think the changes will be reasonably easy to do.
* Increase debug level of "create_connection_server_info failed" messageVolker Lendecke2009-05-041-1/+1
| | | | | I don't think we should unconditionally send every refused connection attempt to a share to syslog, that's where all debug level 0 messages end up.
* 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
* s3:smbd: use new simplified snb_signing code in the serverStefan Metzmacher2009-03-231-1/+1
| | | | | | | | | We keep the seqnum/mid mapping in the smb_request structure. This also moves one global variable into the smbd_server_connection struct. metze
* Fix bug #6155 - "force group" is no longer working as expected.Jeremy Allison2009-03-031-0/+8
| | | | | | | 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.
* s3:smbd: move all globals and static variables in globals.[ch]Stefan Metzmacher2009-01-081-2/+1
| | | | | | The goal is to move all this variables into a big context structure. metze
* smbd: prevent access to root filesystem when connecting with empty service nameMichael Adam2009-01-051-0/+4
| | | | | | | | This only applies to a setup with "registry shares = yes" Michael (cherry picked from commit 288fa94ac7cfdf7457b5098c33fc840bed3d5410) (cherry picked from commit e85526b184e66f86b7faa9d0a37288a09c12c19e)
* Remove unused make_connection_with_chdir()Volker Lendecke2008-11-241-32/+0
|
* Remove smb_np_structVolker Lendecke2008-10-131-4/+3
|
* Fix a debug messageVolker Lendecke2008-06-261-1/+1
| | | | (This used to be commit 8dd94d448bc5ad067024c56c6ef498bc88a396b2)
* Wrap the unix token info in a unix_user_token in auth_serversupplied_infoVolker Lendecke2008-06-191-6/+6
| | | | | No functional change, this is a preparation for more current_user ref removal (This used to be commit dcaedf345e62ab74ea87f0a3fa1e3199c75c5445)
* Re-enable the evil "aio write behind" parameter.Jeremy Allison2008-05-261-0/+2
| | | | | Jeremy. (This used to be commit 5d22ca00bcdf49dcb35468400ac8cc3c57808d0d)
* Remove some references to get_current_username() and current_user_infoVolker Lendecke2008-05-251-10/+10
| | | | (This used to be commit 344d69f95e217d16213eaa6b53141af6ab459708)
* Remove the reference to current_user_info from share_access.cVolker Lendecke2008-05-251-0/+1
| | | | | This required to pass around the domain a bit (This used to be commit 17b0db20d28d1b737c5e86b78106657e8ca5ce9c)
* Remove "user" from connection_structVolker Lendecke2008-05-101-10/+15
| | | | (This used to be commit 368454a27cb53a408ec416cbf37235b304592fb5)
* Remove the unix token info from connection_structVolker Lendecke2008-05-101-7/+10
| | | | (This used to be commit 2834dacc8d49f77fe55fb5d7e3eb2dda431d1d3d)
* Replace nt_user_token with server_info in connection_structVolker Lendecke2008-05-101-24/+4
| | | | (This used to be commit a3738aef59e97d4533010b048534d937d36c0950)
* find_forced_group can directly change the token in server_infoVolker Lendecke2008-05-101-72/+16
| | | | | | Now that we have a token that is correctly set up with gids already, this saves manual translation of the SIDs to GIDs. (This used to be commit 6136a6d9d7301c65f37e2bf485681138cddd8bd2)
* Add an error return in find_forced_group()Volker Lendecke2008-05-101-0/+5
| | | | (This used to be commit 93ce0705c14f222bda3e6204f4b54ba1893f33e1)
* Do not unnecessarily mess with the results in find_forced_group()Volker Lendecke2008-05-101-3/+0
| | | | (This used to be commit 6d9860d09b54c61625f011c2d56d710aa59d7686)
* Replace find_forced_user by a direct call to make_serverinfo_from_usernameVolker Lendecke2008-05-101-37/+26
| | | | (This used to be commit 7991e6764b4187ba86802569dfdc5816e6137f78)
* Simplify make_connection_snum: Copy connection_struct info from server_infoVolker Lendecke2008-05-101-13/+11
| | | | (This used to be commit 5aa3cdf355c179d89c2703f528919194ab084337)
* Add "server_info" to connection_structVolker Lendecke2008-05-101-97/+23
| | | | | | This will replace all the user identity stuff in connection_struct, for now it is just a source where the other fields in connection_struct are filled from. (This used to be commit 0f53f9e7db9f99f239c4d0950452d0e2cde2ae8b)
* Remove unused "force_group" from connection_structVolker Lendecke2008-05-101-1/+0
| | | | (This used to be commit 03944f8d8934cff74e19fc036f7611c1491e0d57)
* "status" -> "pstatus" in make_connection_snumVolker Lendecke2008-05-101-42/+38
| | | | (This used to be commit 3ce395e61e931a77c5d2f52f39c7e3f71a9605a9)
* Add create_connection_server_info() -- not used yetVolker Lendecke2008-05-101-0/+76
| | | | (This used to be commit 50bf075f7556fd09e0081175c31a5020a8eaf4d6)
* Use talloc_tos() for a temporary getpwnam_alloc in make_connection_snumVolker Lendecke2008-05-071-1/+1
| | | | (This used to be commit 1843ea64ab1df5ced5926aedbeb27c8320b0c70b)
* Use talloc_stackframe() in find_forced_groupVolker Lendecke2008-05-071-11/+5
| | | | (This used to be commit 27a9bbc645416265eebdfc866925855021bd407c)
* Remove "userdom_struct user" from "struct user_struct"Volker Lendecke2008-05-051-4/+5
| | | | (This used to be commit 420de035237bb08bc470c9eb820f3da2edaa6805)
* Remove "guest" from "struct user_struct"Volker Lendecke2008-05-051-3/+3
| | | | (This used to be commit 570a6b80feb5b0dc23213ba936c721e766cd4818)
* Remove the unix token info from "struct user_struct"Volker Lendecke2008-05-051-2/+2
| | | | (This used to be commit aa2299d42adf4d27e707ac755e07be70d0af1bb4)
* Remove "nt_user_token" from "struct user_struct"Volker Lendecke2008-05-051-3/+3
| | | | (This used to be commit 51d5d512f28eadc74eced43e5e7f4e5bdff3ff69)
* Remove connection_struct->mem_ctx, connection_struct is its own parentVolker Lendecke2008-05-051-6/+6
| | | | (This used to be commit 559180f7d30606d1999399d954ceedc798c669a4)
* Add a debug message.Michael Adam2008-03-121-0/+1
| | | | | Michael (This used to be commit a39807044879ad9df7614e010db6ea16b51000a0)