1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

24 Commits

Author SHA1 Message Date
Ralph Boehme
643da37fd1 smbd: remove itime and file_id logic and code
This bases File-Ids on the inode numbers again. The whole stuff was
added because at that time Apple clients

1. would be upset by inode number reusage and

2. had a client side bug in their fallback implemetentation that
assigns File-Ids on the client side in case the server provides
File-Ids of 0.

After discussion with folks at Apple it should be safe these days to
rely on the Mac to generate its own File-Ids and let Samba return 0
File-Ids.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-03-31 23:01:37 +00:00
Volker Lendecke
05f7558b4c lib: Change make_file_id_from_itime() prototype
SMB_STRUCT_STAT is defined in includes.h. This way including file_id.h
is possible without including includes.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-11-30 22:24:38 +00:00
Volker Lendecke
a0aaf5c334 lib: Remove unused file_id_string()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 12 22:18:40 UTC 2019 on sn-devel-184
2019-11-12 22:18:39 +00:00
Volker Lendecke
c229c0508b lib: Remove unused file_id_string_tos()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-11-12 20:56:35 +00:00
Volker Lendecke
b09c216f5a lib: Use file_id_str_buf() in file_id_string()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-10 23:14:31 +00:00
Volker Lendecke
049b8833ae lib: Add file_id_str_buf()
file_id_string() without talloc

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-10 23:14:30 +00:00
Ralph Boehme
84abeaa60f s3:lib: round itime to NTTIME resolution in make_file_id_from_itime()
The rounding is needed because when a file is created via eg an SMB2 CREATE
request, we need to calculate the correct File-ID for the QFID Create-Context or
for a subsequent GETINFO SMB request on the same file-handle.

Any later metadata request that received the File-ID will do so by going through
dos_mode() -> ... -> parse_dos_attribute_blob(), where the File-ID will be
calculated from the on-disk itime which has NTTIME resolution.

As long as that is the only available itime backend, I'm rounding itime inside
make_file_id_from_itime(), not in the callers.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-09-10 19:05:29 +00:00
Ralph Boehme
a5a2ce953b s3/lib: add make_file_index_from_itime()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-07-01 21:43:24 +00:00
Volker Lendecke
f4e40494c0 lib: Apply some const to pull_file_id_24
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-09-06 13:40:05 +02:00
Volker Lendecke
4dfded000c s3: Use file_id_string in file_id_string_tos
Reviewed by Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 30 00:05:34 CET 2012 on sn-devel-104
2012-10-30 00:05:34 +01:00
Volker Lendecke
e44b231f58 s3: Fix some nonempty line endings
Reviewed by Jeremy Allison <jra@samba.org>
2012-10-29 22:23:08 +01:00
Andrew Bartlett
ce9676839b s3-lib: Add file_id_string() 2012-04-18 12:05:00 +10:00
Andrew Bartlett
ea5a9b21fb s3-build: move file_id.c into samba3-util and create a private header 2012-04-18 12:05:00 +10:00
Volker Lendecke
033185e2a1 Make the smbd VFS typesafe 2009-07-24 11:42:05 -04:00
Tim Prouty
e4675ce8db s3: Add extid to the dev/inode pair
This extends the file_id struct to add an additional generic uint64_t
field: extid.  For backwards compatibility with dev/inodes stored in
xattr_tdbs and acl_tdbs, the ext id is ignored for these databases.
This patch should cause no functional change on systems that don't use
SMB_VFS_FILE_ID_CREATE to set the extid.

Existing code that uses the smb_share_mode library will need to be
updated to be compatibile with the new extid.
2009-02-19 20:58:26 -08:00
Tim Prouty
6fbebb5369 s3: Modify SMB_VFS_FILE_ID_CREATE to take a stat struct
Since file_id_create_dev is incompatible with the concept of file_ids,
it is now static and in the one file that needs it.
2009-02-19 20:58:01 -08:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Volker Lendecke
bbbac99ecb r25061: Pro-actively shut up Coverity :-)
(This used to be commit f2ce4a803c)
2007-10-10 12:30:37 -05:00
Volker Lendecke
4ee8b2937d r25055: Add file_id_string_tos
This removes file_id_string_static and file_id_string_static2
(This used to be commit 638c848c9a)
2007-10-10 12:30:36 -05:00
Stefan Metzmacher
4b15f31f10 r24120: add a file_id_create() hook into the VFS layer
it's needed for some cluster filesystems to
overload this function.

metze
(This used to be commit cdaa24e804)
2007-10-10 12:29:08 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
fb76516ccd r23185: Try to fix the IRIX build, also add the forgotten file_id.c in .26
(This used to be commit 5360e6405b)
2007-10-10 12:22:53 -05:00
Volker Lendecke
e8156439f2 r23183: Check in a change made by Tridge:
This replaces the internal explicit dev/ino file id representation by a
"struct file_id". This is necessary as cluster file systems and NFS
don't necessarily assign the same device number to the shared file
system. With this structure in place we can now easily add different
schemes to map a file to a unique 64-bit device node.

Jeremy, you might note that I did not change the external interface of
smb_share_modes.c.

Volker
(This used to be commit 9b10dbbd5d)
2007-10-10 12:22:52 -05:00