]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Add uint32_t name_hash argument (currently unused) to get_file_infos().
authorJeremy Allison <jra@samba.org>
Tue, 25 Jan 2011 21:57:38 +0000 (13:57 -0800)
committerJeremy Allison <jra@samba.org>
Tue, 25 Jan 2011 22:02:18 +0000 (14:02 -0800)
Will be used when we store more than one delete on close token.

source3/include/proto.h
source3/locking/locking.c
source3/smbd/dir.c
source3/smbd/filename.c
source3/smbd/nttrans.c
source3/smbd/reply.c
source3/smbd/smb2_create.c
source3/smbd/smb2_getinfo.c
source3/smbd/trans2.c

index cf508e339816d3384238383d1458394b429fb3e1..372ed16fd51f811ec59750a49f27a5a9615b5fcd 100644 (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);
index a65fcbdba8840ed7ea218ea75bde2131545c320d..0d7d4eecf6006dd00c8ca2871ed1e6b9c20db74a 100644 (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)
 {
index b49b89396c02d8391a1c0da497144b38948625ca..7c9d6e262e0d72e365d1250d719595654e869b59 100644 (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);
index bd783232f680033eaf30802422146c9e6e5ce064..1194660565a819056b30cc878aec16b9371ffad9 100644 (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;
index 9d6a892ad6b6f3a91c76d59be1cd7e064c966eee..b63f37f0fd3948ca7732adb7c7957fb98555f83e 100644 (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);
        }
index 92be257029dbb94b595348efe900f2ee4a000f32..4d3be85a85f56699fe6f1fe1a4ae6cbf2e278922 100644 (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);
                }
index 71e97a4040cbfa073ce33b0a2c9836dbaa7e57d6..b191b74fcccfae2c2bfc87d54f43c7e64ea124fb 100644 (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);
        }
index 09234cd129518e6109eb176d585ab105554afbf9..0ff659346eddf908a32df1ce45c54cf62beadec0 100644 (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,
index 90a878d17e94fe7e836af5ae02c6a264d59b1e92..60664fd2295f7be36c74dd49f18b105f11205d86 100644 (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;