summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
...
* s3:smbd: allow SMB2 only if we don't use security = shareStefan Metzmacher2009-06-031-1/+2
| | | | metze
* Add SMB_VFS_CONNECTPATH operationVolker Lendecke2009-06-021-8/+22
| | | | | | This is required for the shadow_copy2 module and "wide links = no". The file system snapshots by nature are typically outside of share directory. So the REALPATH result fails the wide links = no test.
* Remove a variable used just onceVolker Lendecke2009-06-021-2/+3
|
* Fix bug #6421 - POSIX read-only open fails on read-only shares.Jeremy Allison2009-05-302-8/+12
| | | | | | | | | | The change to smbd/trans2.c opens up SETFILEINFO calls to POSIX_OPEN only. The change to first smbd/open.c closes 2 holes that would have been exposed by allowing POSIX_OPENS on readonly shares, and their ability to set arbitrary flags permutations. The O_CREAT -> O_CREAT|O_EXCL change removes an illegal combination (O_EXCL without O_CREAT) that previously was being passed down to the open syscall. Jeremy.
* Simplify the dropbox patchJeremy Allison2009-05-301-5/+10
|
* Re-Add the "dropbox" functionality with -wx rights on a directoryVolker Lendecke2009-05-291-3/+3
|
* s3: Fix a few more users of stat to use stat_exTim Prouty2009-05-281-10/+10
|
* s3: Allow child processes to exit gracefully if we are out of fdsMarc VanHeyningen2009-05-271-6/+13
| | | | | | | | | | When we run out of file descriptors for some reason, every new connection forks a child that immediately panics causing smbd to coredump. This seems unnecessarily harsh; with this code change we now catch that error and merely log a message about it and exit without the core dump. Signed-off-by: Tim Prouty <tprouty@samba.org>
* Fix some nonempty blank linesVolker Lendecke2009-05-271-14/+13
|
* Attempt to fix the build on NetBSDVolker Lendecke2009-05-261-6/+0
|
* Fix some nonempty blank linesVolker Lendecke2009-05-261-28/+27
|
* Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke2009-05-2614-211/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* s3:smbd: remove unused global 'orig_inbuf'Stefan Metzmacher2009-05-262-2/+0
| | | | metze
* s3:smbd: move SMB1 specific stuff into a substructure of smbd_server_connectionStefan Metzmacher2009-05-265-28/+30
| | | | metze
* s3:smbd: add support for SMB2 signingStefan Metzmacher2009-05-264-53/+277
| | | | metze
* s3:smbd: return the correct security mode and capabilities in SMB2 NegotitateStefan Metzmacher2009-05-261-5/+18
| | | | metze
* TALLOC_FREE happily lives with a NULL ptr. Tim, please check!Volker Lendecke2009-05-243-48/+16
| | | | | | Thanks, Volker
* Ensure we return NT_STATUS_FILE_IS_A_DIRECTORY on a posix open on aJeremy Allison2009-05-221-1/+1
| | | | | directory name. Jeremy.
* s3:smbd: implement SMB2 Tree DisconnectStefan Metzmacher2009-05-223-1/+38
| | | | metze
* s3:smbd: implement SMB2 Tree ConnectStefan Metzmacher2009-05-224-1/+285
| | | | | | For now this only checks if the share is present or not. metze
* s3:smbd: SMB2 session ids are 64bit...Stefan Metzmacher2009-05-222-3/+3
| | | | | | | | We only grand ids up to 0x0000000000FFFFFF, because that's what our idtree implementation can handle. But also 16777215 sessions on one tcp connection should be enough:-) metze
* s3:smbd: implement SMB2 LogoffStefan Metzmacher2009-05-223-1/+47
| | | | metze
* s3:smbd: we want to get the next command offset and not set it...Stefan Metzmacher2009-05-211-1/+1
| | | | | | This should also fix the build on some hosts. metze
* s3: Change unix_convert (and its callers) to use struct smb_filenameTim Prouty2009-05-206-374/+537
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first of a series of patches that change path based operations to operate on a struct smb_filename instead of a char *. This same concept already exists in source4. My goals for this series of patches are to eventually: 1) Solve the stream vs. posix filename that contains a colon ambiguity that currently exists. 2) Make unix_convert the only function that parses the stream name. 3) Clean up the unix_convert API. 4) Change all path based vfs operation to take a struct smb_filename. 5) Make is_ntfs_stream_name() a constant operation that can simply check the state of struct smb_filename rather than re-parse the filename. 6) Eliminate the need for split_ntfs_stream_name() to exist. My strategy is to start from the inside at unix_convert() and work my way out through the vfs layer, call by call. This first patch does just that, by changing unix_convert and all of its callers to operate on struct smb_filename. Since this is such a large change, I plan on pushing the patches in phases, where each phase keeps full compatibility and passes make test. The API of unix_convert has been simplified from: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, bool allow_wcard_last_component, char **pp_conv_path, char **pp_saved_last_component, SMB_STRUCT_STAT *pst) to: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, struct smb_filename *smb_fname, uint32_t ucf_flags) Currently the smb_filename struct looks like: struct smb_filename { char *base_name; char *stream_name; char *original_lcomp; SMB_STRUCT_STAT st; }; One key point here is the decision to break up the base_name and stream_name. I have introduced a helper function called get_full_smb_filename() that takes an smb_filename struct and allocates the full_name. I changed the callers of unix_convert() to subsequently call get_full_smb_filename() for the time being, but I plan to eventually eliminate get_full_smb_filename().
* s3:smbd: check the incoming session id for SMB2 requestsStefan Metzmacher2009-05-203-2/+98
| | | | metze
* s3:smbd: implement SMB2 Session Setup with raw NTLMSSPStefan Metzmacher2009-05-203-1/+220
| | | | metze
* s3:smbd: for now indicate raw NTLMSSP in the SMB2 Negotiate responseStefan Metzmacher2009-05-201-0/+3
| | | | metze
* s3:smbd: move the callback functions of smbd_smb2_request_reply() closer itselfStefan Metzmacher2009-05-201-42/+42
| | | | metze
* s3:smbd: add smbd_smb2_request_done_ex()Stefan Metzmacher2009-05-202-5/+16
| | | | | | | Some times we have to return a non-error response with status != NT_STATUS_OK. metze
* s3:smbd: fix initialized memory in SMB2 responsesStefan Metzmacher2009-05-201-4/+4
| | | | | | MESSAGE_ID and SESSION_ID are both 64bit. metze
* s3:smbd: add support for SMB2 Keepalive (SMB2 Echo)Stefan Metzmacher2009-05-203-0/+92
| | | | metze
* s3:smbd: allow SMB 2.002 dialect in SMB1 negprotStefan Metzmacher2009-05-203-0/+38
| | | | | | | We create a dummy SMB2 Negotiate inbuf and pass the connection to the SMB2 engine. metze
* s3:smbd: add support for SMB2 NegotiateStefan Metzmacher2009-05-203-0/+131
| | | | | | | This is not complete, but a start that makes the samba4 smb2 client happy. metze
* s3:smbd: make negprot_spnego() non staticStefan Metzmacher2009-05-202-1/+3
| | | | metze
* s3:smbd: add infrastructure for SMB2 supportStefan Metzmacher2009-05-203-0/+1049
| | | | | | | This is disabled by default and activated by "max protocol = SMB2". metze
* s3: Always allocate memory in dptr_ReadDirNameAravind Srinivasan2009-05-182-17/+44
| | | | | | | | This is a follow up to 69d61453df6019caef4e7960fa78c6a3c51f3d2a to adjust the API to allow the lower layers allocate memory. Now the memory can explicitly be freed rather than relying on talloc_tos(). Signed-off-by: Tim Prouty <tprouty@samba.org>
* s3 sendfile: Fix two bugs in sendfileTim Prouty2009-05-181-3/+4
| | | | | | | | | | | | These were found interally via code inspection. 1) fake_sendfile was incorrectly writing zeros over real data on a short read. 2) sendfile_short_send was doing 4 byte writes instead of 1024 byte writes due to an incorrect sizeof usage. Jermey, Vl please check
* Move down the become_root()/unbecome_root() calls into the VFS modulesVolker Lendecke2009-05-181-6/+0
| | | | | | The aio_fork module does not need this, as it does not communicate via signals but with pipes. Watching a strace log with those become_root() calls in aio.c is absolutely awful, and it does affect performance.
* Add "file_walk_table" to do stuff with all open filesVolker Lendecke2009-05-181-0/+22
|
* Make us pass SHORTNAME-TEST.Jeremy Allison2009-05-141-3/+17
| | | | Jeremy
* Remove one use of mangle_is_8_3(), not needed.Jeremy Allison2009-05-141-4/+2
| | | | Jeremy.
* Fix a type-punned warningVolker Lendecke2009-05-141-1/+1
|
* s3 onefs: Self-contend level2 oplocks on BRLZack Kirsch2009-05-121-1/+0
|
* s3: Fix strict locking with chained readsTim Prouty2009-05-121-22/+24
| | | | | Move the strict lock/unlock code down a level for reads to avoid calling chain_reply before the unlock.
* Fix warning about unused label with no sendfile.Jeremy Allison2009-05-111-1/+2
| | | | Jeremy.
* Pass also sername to check password scriptSimo Sorce2009-05-091-4/+12
|
* Do not call SMB_VFS_GET_REAL_FILENAME if the name is mangledVolker Lendecke2009-05-091-6/+11
| | | | | | | | | The GPFS get_real_file name does not know about mangled names. Tim, if onefs does not either, you need this bugfix :-) In case onefs does 8.3 names, we need to pass the mangled flag down to SMB_VFS_GET_REAL_FILENAME to give GPFS a chance say ENOTSUPP and do the fallback.
* s3: Fix chained sesssetupAndX/tconn messagesTim Prouty2009-05-081-0/+7
| | | | | | | | A sesssetupAndX chained with a tconn will not correctly set the TID in the response header. I'm seeing an XP client send this chained sesssetup/tconn when samba has security = share. Samba's current behavior is to return a TID of 0 in the smb header rather than the actual TID. This patch also updates the UID in the header as well.
* Fix bug #6330 - DFS doesn't work on AIX. Jeremy.Jeremy Allison2009-05-081-0/+4
|
* Expand the comment explaining why user_in_group_sid isJeremy Allison2009-05-081-1/+6
| | | | | not reliable for winbindd users from foreign domains. Jeremy.