summaryrefslogtreecommitdiff
path: root/source3/smbd/dosmode.c
AgeCommit message (Collapse)AuthorFilesLines
2013-08-19Fix bug #10097 - MacOSX 10.9 will not follow path-based DFS referrals handed ↵Richard Sharpe1-0/+5
out by Samba. Windows overloads the EA Length field in the DIRECTORY INFO leves of FIND FIRST/FIND NEXT. This field indicates either the REPARSE_TAG if the file/folder has a reparse proint or the EA Length if it has EAs, and is the fundamental reason you cannot have both on a file or folder. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Aug 19 22:21:34 CEST 2013 on sn-devel-104
2013-06-06smbd: Change logging when SET_OFFLINE is not supportedChristof Schmitt1-10/+15
A client can send a request to set the OFFLINE attribute. In the default code this is not supported and triggers a log message each time. Change this to only log with level 0 when an actual errors occurs, and log ENOTSUP with level 10. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Jun 6 04:30:26 CEST 2013 on sn-devel-104
2013-05-06Allow "store dos attributes" to override the other "map XXX" parameters.Jeremy Allison1-5/+8
Makes us consistent with what is described in the man pages. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-04-27Check for WRITE_ACCESS on the file before overriding an EACCESS.Jeremy Allison1-0/+4
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sat Apr 27 15:57:17 CEST 2013 on sn-devel-104
2013-04-27Ensure we don't try the open_file_fchmod() if we can't write to the file.Jeremy Allison1-0/+5
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-27Remove indentation around code wrapped by unneeded CAN_WRITE.Jeremy Allison1-23/+20
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-27Add early return in file_set_dosmode() on a read only share.Jeremy Allison1-0/+5
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-17smbd: Convert set_create_timespec_ea to synthetic_smb_fnameVolker Lendecke1-8/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert unix_mode to synthetic_smb_fnameVolker Lendecke1-8/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-02-19s3:smbd: preserve file type mode bits in file_set_dosmode()Michael Adam1-0/+3
When translating between dos modes and unix modes, these bits were dropped from the stat->st_ex_mode field. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Feb 19 15:45:31 CET 2013 on sn-devel-104
2012-10-17s3:smbd: also log the "offline" flag when debugging the dos-modeMichael Adam1-0/+1
Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-24lib/param: Move all enum declarations to lib/paramAndrew Bartlett1-0/+1
This is in preperation for the parameter table being made common. Andrew Bartlett Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2012-07-18loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell1-1/+1
They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-04s3: if we know a file is immutable, report it to be readonlyBjörn Jacke1-0/+6
on *BSD we get the immutable flag via st_flags, we should use that if possible.
2011-04-29s3-smb Use FILE_ATTRIBUTE_ARCHIVE intead of aARCHAndrew Bartlett1-7/+7
This means we use just one constant for this file attribute. Andrew Bartlett
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-29s3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEMAndrew Bartlett1-7/+7
This means we use just one constant for this file attribute. Andrew Bartlett
2011-04-29s3-smb Use FILE_ATTRIBUTE_HIDDEN intead of aHIDDENAndrew Bartlett1-13/+13
This means we use just one constant for this file attribute. Andrew Bartlett
2011-04-29s3-smb Use FILE_ATTRIBUTE_READONLY intead of aRONLYAndrew Bartlett1-10/+10
This means we use just one constant for this file attribute. Andrew Bartlett
2011-04-15Use handle based xattr set if available.Jeremy Allison1-4/+5
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Apr 15 22:11:12 CEST 2011 on sn-devel-104
2011-03-30Fix bug #7996 - sgid bit lost on folder rename.Jeremy Allison1-0/+21
Refuse to set dos attributes into unix mode bits on such a folder.
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-02s3: Pass smb_filename through the set_offline vfs opVolker Lendecke1-1/+1
2011-03-02s3: Pass smb_filename through the is_offline vfs opVolker Lendecke1-1/+1
2011-02-10s3:smbd: fix switch indentation level in get_ea_dos_attribute()Michael Adam1-4/+4
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Thu Feb 10 17:46:12 CET 2011 on sn-devel-104
2010-12-29Fix bug #7892 - open_file_fchmod() leaves a stale lock.Jeremy Allison1-7/+4
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Dec 29 02:15:23 CET 2010 on sn-devel-104
2010-12-21Keep track of the sparse status of an open file handle. Allows bypass ofJeremy Allison1-0/+2
strict allocation on sparse files. Files opened as POSIX opens are always sparse. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Dec 21 04:12:22 CET 2010 on sn-devel-104
2010-12-20From metze's work on sparse attributes. FILE_ATTRIBUTE_SPARSE is valid on ↵Jeremy Allison1-1/+2
get but not on set. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Dec 20 20:11:22 CET 2010 on sn-devel-104
2010-12-17Move checks inside file_set_sparse() to allow it to be called from anywhere.Jeremy Allison1-1/+21
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Dec 17 21:56:38 CET 2010 on sn-devel-104
2010-12-17file_set_sparse needs to be a handle based call.Jeremy Allison1-10/+8
2010-12-17s3:smbd: add file_set_sparse() functionBjörn Jacke1-0/+49
this is based on a patch for 3.3 from metze
2010-12-17s3: remove set_sparse_flagBjörn Jacke1-15/+1
we need to determine sparseness from the sparse flag we store not from the allocation size on the POSIX filesystem. This is how Windows works - in the first place sparseness is a file flag, not the allocation state of the file Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-12-17s3: add FILE_ATTRIBUTE_SPARSE to get_stat_dos_flagsBjörn Jacke1-0/+2
2010-10-26s3: Fix some DEBUG msgsVolker Lendecke1-5/+5
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Oct 26 15:20:01 UTC 2010 on sn-devel-104
2010-05-18s3: Remove use of iconv_convenience.Jelmer Vernooij1-2/+2
2010-02-01Add debug to make it clear when EA dosmode set is invoked.Jeremy Allison1-0/+5
Jeremy.
2010-02-01Fix bug #7084 - Create time on directories not stored properly in an EA in ↵Jeremy Allison1-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.
2010-01-25Correct fix for unused variable return from ndr_decode. Use it :-).Jeremy Allison1-0/+8
Jeremy.
2010-01-25Revert "s3: remove unused Variable"Jeremy Allison1-0/+4
This reverts commit 9536d94d5478b63fc05047964b40d8786a7246c4. Bjorn, your change removed the ndr_decoding of the dos attribute. Not a good idea :-). Jeremy.
2010-01-26s3: remove unused VariableBjörn Jacke1-4/+0
Jeremy, please check!
2009-12-15Ensure dos_mode can return FILE_ATTRIBUTE_NORMAL, then filter the returned ↵Jeremy Allison1-8/+20
attributes by protocol level. This makes us consistant in returning DOS attrs across all replies. Tested on OS/2 by Günter Kukkukk. Jeremy.
2009-11-23Revert "s3: Make the implicit reference to Protocol in is_in_path() explicit"Volker Lendecke1-4/+2
This reverts commit f7b4151a64d8c6851e62255a7139fd00a5fc63a3.
2009-11-23Revert "s3: Move the global variable Protocol to struct smbd_server_connection"Volker Lendecke1-6/+4
This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.
2009-11-21s3: Move the global variable Protocol to struct smbd_server_connectionVolker Lendecke1-4/+6
2009-11-21s3: Make the implicit reference to Protocol in is_in_path() explicitVolker Lendecke1-2/+4
2009-11-17Remove "store create time" code, cause create time to be storedJeremy Allison1-99/+145
in the "user.DOSATTRIB" EA. From the docs: In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store the create time for a file as well as the DOS attributes. This is done in a backwards compatible way so files created by Samba 3.5.0 and above can still have the DOS attribute read from this extended attribute by earlier versions of Samba, but they will not be able to read the create time stored there. Storing the create time separately from the normal filesystem meta-data allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem. Passes make test but will need more testing. Jeremy.
2009-11-05Get closer to an accurate model of Windows timestamp changes.Jeremy Allison1-16/+0
"Normal" non truncate writes always cause the timestamp to be set on close. Once a close is done on a handle this can reset the sticky write time to current time also. Updated smbtorture4 confirms this. Jeremy.
2009-11-04Fix debug comment (brain wasn't working...).Jeremy Allison1-2/+2
Jeremy.
2009-11-04Filter the returned DOS attributes by 0xFF for clientsJeremy Allison1-0/+12
using older protocols (LANMAN2 or below). Jeremy.