summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-24Another fix for bug #8556 - ACL permissions ignored when SMBsetatr is requested.Jeremy Allison1-5/+0
Remove erroneous check on FILE_WRITE_ATTRIBUTES when changing POSIX permissions - this isn't an attribute set call (unless you're storing attributes in POSIX permissions, which is not recommended). Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Jan 24 00:44:24 CET 2012 on sn-devel-104
2012-01-12s3: Put an indirection layer into share_mode_lockVolker Lendecke1-2/+2
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-01-12s3: Introduce get_share_mode_lock_fresh()Volker Lendecke1-2/+1
This slightly simplifies the code path for all callers which assume that a share mode exists already. Only the callers in open_file_ntcreate and open_directory will ever create new share modes. Signed-off-by: Jeremy Allison <jra@samba.org>
2011-12-16Restrict UCF_UNIX_NAME_LOOKUP (symlink allowed) to restricted set of calls.Jeremy Allison1-1/+4
2011-12-15Second part of fix for bug #8663 - deleting a symlink fails if the symlink ↵Jeremy Allison1-1/+6
target is outside of the share. Ensure we use UCF_UNIX_NAME_LOOKUP flags on filename_convert() when doing a UNIX infolevel in trans2setfilepathinfo().
2011-12-02s3: Use autogenerated open_files.idlVolker Lendecke1-0/+1
2011-11-16Final part of patchset to fix bug #8556 - ACL permissions ignored when ↵Jeremy Allison1-16/+40
SMBsetatr is requested. This now plumbs access checks through all setattr calls. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Nov 16 04:20:04 CET 2011 on sn-devel-104
2011-11-15Remove the check for FILE_WRITE_ATTRIBUTES from smb_set_file_time(). ItJeremy Allison1-4/+10
is called from places like fileio.c that need to update the write time on a file handle only open for write, without neccessarily having FILE_WRITE_ATTRIBUTES permission. Move all checks to before the smb_set_file_time() callers.
2011-11-15Move handle-based access check into handle codepath.Jeremy Allison1-4/+4
2011-11-15We've already checked fsp must be non-null here.Jeremy Allison1-1/+1
2011-11-15Remove unneeded access check. This is done inside smb_set_file_time().Jeremy Allison1-4/+0
2011-11-15Remove unneeded access check. This is done inside smb_set_file_size().Jeremy Allison1-4/+0
2011-11-15Move handle based access check into handle code path.Jeremy Allison1-4/+4
2011-10-22Third part of fix for bug #8541 - readlink() on Linux clients fails if the ↵Jeremy Allison1-2/+1
symlink target is outside of the share. Missed passing ucf_flags instead of hard coded flags in findfirst call. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Oct 22 06:30:16 CEST 2011 on sn-devel-104
2011-10-22Fix bug #8541 - readlink() on Linux clients fails if the symlink target is ↵Jeremy Allison1-4/+14
outside of the share. The key is to only allow the lookup to succeed if it's a UNIX level lookup or readlink, but disallow all other operations. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Oct 22 01:37:41 CEST 2011 on sn-devel-104
2011-10-18s3-smbd Give the nt error string when failing to set up encrypted transportAndrew Bartlett1-3/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-17First part of fix for bug #8419 - Make VFS op "streaminfo" stackable.Frank Lahm1-3/+2
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Oct 17 21:39:32 CEST 2011 on sn-devel-104
2011-10-14Add support for VFS op streaminfo chaining in all relevant VFS modules.Frank Lahm1-2/+2
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Oct 14 03:26:06 CEST 2011 on sn-devel-104
2011-09-18s3: Trim a debug to 80 charsVolker Lendecke1-6/+11
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Sep 18 01:15:02 CEST 2011 on sn-devel-104
2011-09-17s3: Fix a cut&paste errorVolker Lendecke1-1/+1
2011-09-14s3:smbd: remember the client unix capabilities on the connectionStefan Metzmacher1-43/+37
metze Signed-off-by: Jeremy Allison <jra@samba.org>
2011-08-02s3: Pass sconn explicitly to open_was_deferredVolker Lendecke1-2/+2
2011-07-29s3: We only need base_name in map_open_params_to_ntcreateVolker Lendecke1-1/+2
2011-07-20s3-auth Use struct auth_user_info_unix for unix_name and sanitized_usernameAndrew Bartlett1-2/+2
This is closer to the layout of struct auth_session_info in auth.idl Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use *unix_token rather than utok in struct auth3_session_infoAndrew Bartlett1-7/+7
This brings this structure one step closer to the struct auth_session_info. A few SMB_ASSERT calls are added in some key places to ensure that this pointer is initialised, to make tracing any bugs here easier in future. NOTE: Many of the users of this structure should be reviewed, as unix and NT access checks are mixed in a way that should just be done using the NT ACL. This patch has not changed this behaviour however. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-09s3-param Remove special case for global_myname(), rename to lp_netbios_name()Andrew Bartlett1-1/+1
There is no reason this can't be a normal constant string in the loadparm system, now that we have lp_set_cmdline() to handle overrides correctly. Andrew Bartlett
2011-06-09s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_MEMDUP isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett1-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_P() to talloc()Andrew Bartlett1-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett1-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()Andrew Bartlett1-3/+3
Using the standard macro makes it easier to move code into common, as TALLOC_REALLOC_ARRAY isn't standard talloc. Andrew Bartlett
2011-05-20Fix bug 8133 - strange behavior for the file (whose filename first character ↵Jeremy Allison1-2/+3
is period ) in SMB2 case. When doing SMB2 renames, we need to match all filetypes (no attributes field in the SMB2 call). By default a file starting with a period is returned as FILE_ATTRIBUTE_HIDDEN in Samba. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri May 20 19:26:04 CEST 2011 on sn-devel-104
2011-05-18s3-lib Replace StrnCaseCmp() with strncasecmp_m()Andrew Bartlett1-1/+1
strncasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
2011-05-18s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett1-1/+1
strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
2011-05-18Fix bug #8144 - touch /mnt/newfile fails to set timestamp with CIFS client.Jeremy Allison1-10/+15
The extra checks added for Windows correctness in our metadata changing paths to ensure the file handle has been opened with the correct access mask to allow FILE_WRITE_ATTRIBUTES etc. caused problems with the POSIX open code. The old POSIX open code maped O_RDONLY into FILE_READ, O_WRONLY into FILE_WRITE, and O_RDWR into FILE_READ|FILE_WRITE. This patch extends the mapping to add FILE_WRITE_ATTRIBUTES, FILE_READ_ATTRIBUTES and FILE_WRITE_EA, FILE_READ_EA to allow POSIX opens to set these values. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed May 18 02:22:32 CEST 2011 on sn-devel-104
2011-05-05Fix many const compiler warnings.Jeremy Allison1-3/+3
2011-05-04Fix warning messages caused by addition of null check in fstrcpy macro.Jeremy Allison1-2/+2
2011-05-04Simple +1 changes in hardcoded lengths when changing from safe_strcpy to ↵Jeremy Allison1-1/+1
strlcpy.
2011-05-02s3-proto: move more rpc_server prototypes out of proto.hGünther Deschner1-0/+1
Guenther
2011-04-29Fix bug #8112 - POSIX extension opens of a directory are denied with EISDIR.Jeremy Allison1-2/+10
Ensure create_options are passed down to SMB_VFS_CREATE_FILE(). Correctly set create_options is SMB_O_DIRECTORY is set or pathname is known to be a directory. Jeremy.
2011-04-29Fix bug 8111 - CIFS VFS: unexpected error on SMB posix openJeremy Allison1-12/+49
We are conflating the O_CREAT|O_EXCL with the O_TRUNC processing, they need to be separate. We need to chose using (O_CREAT|O_EXCL) first, then modify if O_TRUNC is set. This needs two separate switch statements. Jeremy
2011-04-29s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIRAndrew Bartlett1-9/+9
This means we use just one constant for this file attribute. Andrew Bartlett
2011-04-24s3:smbd/trans2: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef'sStefan Metzmacher1-28/+2
We rely on uint64_t for a long time now... metze
2011-04-14s3: only include smb profiling where needed.Günther Deschner1-0/+1
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Apr 14 01:31:39 CEST 2011 on sn-devel-104
2011-04-05Fix bug #7080 - Quota only shown when logged as root.Jeremy Allison1-3/+2
Remove the final incorrect uses of conn->session_info->utok.uid. When we're in the "admin users" list, then this value is not set to zero. Inspired by the comment on this bug by Dmitry Butskoy <dmitry@butskoy.name>. I'll create a different fix for 3.5.x. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Apr 5 21:53:59 CEST 2011 on sn-devel-104
2011-03-30s3-auth: smbd needs auth.hGünther Deschner1-0/+1
Guenther
2011-03-30s3: include smbd/smbd.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-includes: only include system/filesys.h when needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-trans2: only include trans2.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-26Revert "Fix bug 8021 - Incorrect string termination in volume/volume_name ↵Jeremy Allison1-1/+1
for TRANS2-QUERY_FS_INFO/Info Volume." This reverts commit 042aafb87df6c05877b8fc7ef0d44877689d860a. I need to test against OS/2 to see if this is something Win28K breaks for older clients before allowing this. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Mar 26 01:19:55 CET 2011 on sn-devel-104