mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
tdb: Update times in tdb_transaction_commit per fd, not per name
We might have a relative filename in tdb->name, so we might do the wrong thing here. And as we have the fd, why not use it... We call futimens in vfs_default without #ifdef and it's Posix 2018 or before. So I don't think we need to check for it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
06aff34586
commit
3f2e45aa16
@ -1206,9 +1206,7 @@ _PUBLIC_ int tdb_transaction_commit(struct tdb_context *tdb)
|
||||
not be backed up (as tdb rounding to block sizes means that
|
||||
file size changes are quite rare too). The following forces
|
||||
mtime changes when a transaction completes */
|
||||
#ifdef HAVE_UTIME
|
||||
utime(tdb->name, NULL);
|
||||
#endif
|
||||
futimens(tdb->fd, NULL);
|
||||
|
||||
/* use a transaction cancel to free memory and remove the
|
||||
transaction locks */
|
||||
|
Loading…
Reference in New Issue
Block a user