Michael Adam
678cc4403f
s3:smbd: also log the "offline" flag when debugging the dos-mode
...
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-10-17 12:56:32 +02:00
Andrew Bartlett
f3562424b6
lib/param: Move all enum declarations to lib/param
...
This is in preperation for the parameter table being made common.
Andrew Bartlett
Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2012-07-24 11:01:17 +02:00
Rusty Russell
fe72740e82
loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
...
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-18 15:07:23 +09:30
Björn Jacke
b40fb6eec5
s3: if we know a file is immutable, report it to be readonly
...
on *BSD we get the immutable flag via st_flags, we should use that if possible.
2012-07-04 12:01:20 +02:00
Andrew Bartlett
0520da2bbe
s3-smb Use FILE_ATTRIBUTE_ARCHIVE intead of aARCH
...
This means we use just one constant for this file attribute.
Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
0eca33bbf6
s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR
...
This means we use just one constant for this file attribute.
Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
0a3c84b554
s3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEM
...
This means we use just one constant for this file attribute.
Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
317e19aeb3
s3-smb Use FILE_ATTRIBUTE_HIDDEN intead of aHIDDEN
...
This means we use just one constant for this file attribute.
Andrew Bartlett
2011-04-29 16:38:12 +10:00
Andrew Bartlett
7f66ebde2e
s3-smb Use FILE_ATTRIBUTE_READONLY intead of aRONLY
...
This means we use just one constant for this file attribute.
Andrew Bartlett
2011-04-29 16:38:12 +10:00
Jeremy Allison
e49893c68e
Use handle based xattr set if available.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Apr 15 22:11:12 CEST 2011 on sn-devel-104
2011-04-15 22:11:12 +02:00
Jeremy Allison
f9a2f4f47c
Fix bug #7996 - sgid bit lost on folder rename.
...
Refuse to set dos attributes into unix mode bits on such a
folder.
2011-03-30 18:01:19 -07:00
Günther Deschner
8c24ebf371
s3: include smbd/smbd.h where needed.
...
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
0e771263ee
s3-includes: only include system/filesys.h when needed.
...
Guenther
2011-03-30 01:13:07 +02:00
Volker Lendecke
cf7dac6fbc
s3: Pass smb_filename through the set_offline vfs op
2011-03-02 18:39:21 +01:00
Volker Lendecke
c9d1e16c2c
s3: Pass smb_filename through the is_offline vfs op
2011-03-02 18:39:21 +01:00
Michael Adam
82bcada6f6
s3:smbd: fix switch indentation level in get_ea_dos_attribute()
...
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Feb 10 17:46:12 CET 2011 on sn-devel-104
2011-02-10 17:46:12 +01:00
Jeremy Allison
9b31f6ab6c
Fix bug #7892 - open_file_fchmod() leaves a stale lock.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Dec 29 02:15:23 CET 2010 on sn-devel-104
2010-12-29 02:15:23 +01:00
Jeremy Allison
0a5f4f523f
Keep track of the sparse status of an open file handle. Allows bypass of
...
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-21 04:12:22 +01:00
Jeremy Allison
e7707d5abd
From metze's work on sparse attributes. FILE_ATTRIBUTE_SPARSE is valid on 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-20 20:11:22 +01:00
Jeremy Allison
16d6da8a9b
Move checks inside file_set_sparse() to allow it to be called from anywhere.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec 17 21:56:38 CET 2010 on sn-devel-104
2010-12-17 21:56:38 +01:00
Jeremy Allison
fe50632d54
file_set_sparse needs to be a handle based call.
2010-12-17 21:11:04 +01:00
Björn Jacke
5c27dd67c8
s3:smbd: add file_set_sparse() function
...
this is based on a patch for 3.3 from metze
2010-12-17 21:11:04 +01:00
Björn Jacke
480042ddf9
s3: remove set_sparse_flag
...
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-17 21:11:04 +01:00
Björn Jacke
ebe5600615
s3: add FILE_ATTRIBUTE_SPARSE to get_stat_dos_flags
2010-12-17 21:11:04 +01:00
Volker Lendecke
126f87e6a5
s3: Fix some DEBUG msgs
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Oct 26 15:20:01 UTC 2010 on sn-devel-104
2010-10-26 15:20:01 +00:00
Jelmer Vernooij
b8268cf7b0
s3: Remove use of iconv_convenience.
2010-05-18 11:45:31 +02:00
Jeremy Allison
86bf5eac67
Add debug to make it clear when EA dosmode set is invoked.
...
Jeremy.
2010-02-01 19:21:35 -08:00
Jeremy Allison
f3ee1516e6
Fix bug #7084 - Create time on directories not stored properly in an EA in 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-02-01 18:50:43 -08:00
Jeremy Allison
1e2e92f54d
Correct fix for unused variable return from ndr_decode. Use it :-).
...
Jeremy.
2010-01-25 17:38:55 -08:00
Jeremy Allison
2fff1e13f1
Revert "s3: remove unused Variable"
...
This reverts commit 9536d94d54
.
Bjorn, your change removed the ndr_decoding of the dos attribute.
Not a good idea :-).
Jeremy.
2010-01-25 17:06:54 -08:00
Björn Jacke
9536d94d54
s3: remove unused Variable
...
Jeremy, please check!
2010-01-26 00:19:10 +01:00
Jeremy Allison
e831e3ee32
Ensure dos_mode can return FILE_ATTRIBUTE_NORMAL, then filter the returned 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-12-15 18:03:47 -08:00
Volker Lendecke
5c4885a26b
Revert "s3: Make the implicit reference to Protocol in is_in_path() explicit"
...
This reverts commit f7b4151a64
.
2009-11-23 16:35:00 +01:00
Volker Lendecke
0f8e2a6ebb
Revert "s3: Move the global variable Protocol to struct smbd_server_connection"
...
This reverts commit c85a4c9ba4
.
2009-11-23 16:34:59 +01:00
Volker Lendecke
c85a4c9ba4
s3: Move the global variable Protocol to struct smbd_server_connection
2009-11-21 20:49:17 +01:00
Volker Lendecke
f7b4151a64
s3: Make the implicit reference to Protocol in is_in_path() explicit
2009-11-21 20:49:17 +01:00
Jeremy Allison
a770caed0f
Remove "store create time" code, cause create time to be stored
...
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-17 14:55:02 -08:00
Jeremy Allison
7f9fe127ba
Get closer to an accurate model of Windows timestamp changes.
...
"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-05 16:20:11 -08:00
Jeremy Allison
170d6a3084
Fix debug comment (brain wasn't working...).
...
Jeremy.
2009-11-04 16:04:41 -08:00
Jeremy Allison
f44d3754ee
Filter the returned DOS attributes by 0xFF for clients
...
using older protocols (LANMAN2 or below).
Jeremy.
2009-11-04 15:25:15 -08:00
Jeremy Allison
c69f92d16d
Second attempt at fix for bug 6529 - Offline files conflict with Vista and Office 2003.
...
Confirmation from reporter that this fixes the issue in master on ext3/ext4.
Back-ports to follow.
Jeremy.
2009-08-24 20:57:37 -07:00
Jeremy Allison
6a0c2946be
Fix BASE-DELAYWRITE test by removing const from struct smb_filename
...
in smbd_do_qfilepathinfo(). update_stat_ex_mtime() modifies the
stat struct inside the smb_fname so don't make a copy of that
stat struct, use it directly - it's meant to be updated and
represent the state of the file we're returning.
Jeremy.
2009-08-12 15:08:23 -07:00
Jeremy Allison
d6270df748
Add "store create time" parameter (docs to follow)
...
that stores the create time in the user.DosTimestamps EA.
Jeremy.
2009-08-12 13:00:54 -07:00
Jeremy Allison
c9dca82ed7
Refactor the use of create_time and change time to go
...
through functions. Will aid in making us pass RAW-SETFILEINFO.
Jeremy.
2009-08-10 15:07:53 -07:00
Jeremy Allison
fc4e21bdae
Tidy up treatment of ctime.
...
Jeremy.
2009-07-30 14:27:32 -07:00
Tim Prouty
5a8d70d465
s3: Change fsp->fsp_name to be an smb_filename struct!
2009-07-20 17:26:56 -07:00
Tim Prouty
f1fad2efe4
s3: Fix two arguments that broke when plumbing smb_filneame through dos_mode()
2009-07-09 15:56:53 -07:00
Tim Prouty
1a1d10d22f
s3: Plumb smb_filename through dos_mode() and related funtions
2009-07-08 21:36:03 -07:00
Tim Prouty
69c8795b67
s3: convert unix_mode to take an smb_filename
2009-07-08 21:36:03 -07:00
Tim Prouty
0d9b204882
s3: Remove unnecessary const qualifiers
2009-07-07 18:02:53 -07:00