1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

Add uint32_t name_hash argument (currently unused) to get_file_infos().

Will be used when we store more than one delete on close token.
This commit is contained in:
Jeremy Allison 2011-01-25 13:57:38 -08:00
parent b97f1ce68a
commit a65bce4e38
9 changed files with 15 additions and 12 deletions

View File

@ -3072,6 +3072,7 @@ bool rename_share_filename(struct messaging_context *msg_ctx,
uint32_t new_name_hash,
const struct smb_filename *smb_fname);
void get_file_infos(struct file_id id,
uint32_t name_hash,
bool *delete_on_close,
struct timespec *write_time);
bool is_valid_share_mode_entry(const struct share_mode_entry *e);

View File

@ -1051,6 +1051,7 @@ bool rename_share_filename(struct messaging_context *msg_ctx,
}
void get_file_infos(struct file_id id,
uint32_t name_hash,
bool *delete_on_close,
struct timespec *write_time)
{

View File

@ -981,7 +981,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
fileid = vfs_file_id_from_sbuf(conn,
&smb_fname.st);
get_file_infos(fileid, NULL, &write_time_ts);
get_file_infos(fileid, 0, NULL, &write_time_ts);
if (!null_timespec(write_time_ts)) {
update_stat_ex_mtime(&smb_fname.st,
write_time_ts);

View File

@ -859,6 +859,7 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
bool delete_pending;
get_file_infos(vfs_file_id_from_sbuf(conn,
&smb_fname->st),
0,
&delete_pending, NULL);
if (delete_pending) {
status = NT_STATUS_DELETE_PENDING;

View File

@ -654,7 +654,7 @@ void reply_ntcreate_and_X(struct smb_request *req)
/* Deal with other possible opens having a modified
write time. JRA. */
ZERO_STRUCT(write_time_ts);
get_file_infos(fsp->file_id, NULL, &write_time_ts);
get_file_infos(fsp->file_id, 0, NULL, &write_time_ts);
if (!null_timespec(write_time_ts)) {
update_stat_ex_mtime(&smb_fname->st, write_time_ts);
}
@ -1232,7 +1232,7 @@ static void call_nt_transact_create(connection_struct *conn,
/* Deal with other possible opens having a modified
write time. JRA. */
ZERO_STRUCT(write_time_ts);
get_file_infos(fsp->file_id, NULL, &write_time_ts);
get_file_infos(fsp->file_id, 0, NULL, &write_time_ts);
if (!null_timespec(write_time_ts)) {
update_stat_ex_mtime(&smb_fname->st, write_time_ts);
}

View File

@ -1141,7 +1141,7 @@ void reply_getatr(struct smb_request *req)
ZERO_STRUCT(write_time_ts);
fileid = vfs_file_id_from_sbuf(conn, &smb_fname->st);
get_file_infos(fileid, NULL, &write_time_ts);
get_file_infos(fileid, 0, NULL, &write_time_ts);
if (!null_timespec(write_time_ts)) {
update_stat_ex_mtime(&smb_fname->st, write_time_ts);
}
@ -1803,7 +1803,7 @@ void reply_open(struct smb_request *req)
struct timespec write_time_ts;
ZERO_STRUCT(write_time_ts);
get_file_infos(fsp->file_id, NULL, &write_time_ts);
get_file_infos(fsp->file_id, 0, NULL, &write_time_ts);
if (!null_timespec(write_time_ts)) {
update_stat_ex_mtime(&smb_fname->st, write_time_ts);
}

View File

@ -797,7 +797,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
/* Deal with other possible opens having a modified
write time. JRA. */
ZERO_STRUCT(write_time_ts);
get_file_infos(result->file_id, NULL, &write_time_ts);
get_file_infos(result->file_id, 0, NULL, &write_time_ts);
if (!null_timespec(write_time_ts)) {
update_stat_ex_mtime(&result->fsp_name->st, write_time_ts);
}

View File

@ -320,7 +320,7 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx,
fileid = vfs_file_id_from_sbuf(conn,
&fsp->fsp_name->st);
get_file_infos(fileid, &delete_pending, &write_time_ts);
get_file_infos(fileid, 0, &delete_pending, &write_time_ts);
} else {
/*
* Original code - this is an open file.
@ -336,7 +336,7 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx,
}
fileid = vfs_file_id_from_sbuf(conn,
&fsp->fsp_name->st);
get_file_infos(fileid, &delete_pending, &write_time_ts);
get_file_infos(fileid, 0, &delete_pending, &write_time_ts);
}
status = smbd_do_qfilepathinfo(conn, state,

View File

@ -5103,7 +5103,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
}
fileid = vfs_file_id_from_sbuf(conn, &smb_fname->st);
get_file_infos(fileid, &delete_pending, &write_time_ts);
get_file_infos(fileid, 0, &delete_pending, &write_time_ts);
} else {
/*
* Original code - this is an open file.
@ -5120,7 +5120,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
return;
}
fileid = vfs_file_id_from_sbuf(conn, &smb_fname->st);
get_file_infos(fileid, &delete_pending, &write_time_ts);
get_file_infos(fileid, 0, &delete_pending, &write_time_ts);
}
} else {
@ -5213,7 +5213,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
fileid = vfs_file_id_from_sbuf(conn,
&smb_fname_base->st);
TALLOC_FREE(smb_fname_base);
get_file_infos(fileid, &delete_pending, NULL);
get_file_infos(fileid, 0, &delete_pending, NULL);
if (delete_pending) {
reply_nterror(req, NT_STATUS_DELETE_PENDING);
return;
@ -5245,7 +5245,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
}
fileid = vfs_file_id_from_sbuf(conn, &smb_fname->st);
get_file_infos(fileid, &delete_pending, &write_time_ts);
get_file_infos(fileid, 0, &delete_pending, &write_time_ts);
if (delete_pending) {
reply_nterror(req, NT_STATUS_DELETE_PENDING);
return;