The branch, master has been updated
       via  e76af514c3a99a6c65398a9d7a99012ff73583eb (commit)
      from  4fc9f9c3f943cdeb27e37f0ee068cdd0da7cb00c (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e76af514c3a99a6c65398a9d7a99012ff73583eb
Author: Jeremy Allison <j...@samba.org>
Date:   Thu Aug 6 12:50:16 2009 -0700

    Put SMB_INFO_STANDARD back into setfileinfo, but do it right
    this time :-).
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/trans2.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 184a858..21c5062 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -6110,6 +6110,41 @@ static NTSTATUS 
smb_set_file_basic_info(connection_struct *conn,
 }
 
 /****************************************************************************
+ Deal with SMB_INFO_STANDARD.
+****************************************************************************/
+
+static NTSTATUS smb_set_info_standard(connection_struct *conn,
+                                       const char *pdata,
+                                       int total_data,
+                                       files_struct *fsp,
+                                       const struct smb_filename *smb_fname)
+{
+       struct smb_file_time ft;
+
+       ZERO_STRUCT(ft);
+
+       if (total_data < 12) {
+               return NT_STATUS_INVALID_PARAMETER;
+       }
+
+       /* create time */
+       ft.create_time = convert_time_t_to_timespec(srv_make_unix_date2(pdata));
+       /* access time */
+       ft.atime = convert_time_t_to_timespec(srv_make_unix_date2(pdata+4));
+       /* write time */
+       ft.mtime = convert_time_t_to_timespec(srv_make_unix_date2(pdata+8));
+
+       DEBUG(10,("smb_set_info_standard: file %s\n",
+               smb_fname_str_dbg(smb_fname)));
+
+        return smb_set_file_time(conn,
+                                fsp,
+                               smb_fname,
+                               &ft,
+                                true);
+}
+
+/****************************************************************************
  Deal with SMB_SET_FILE_ALLOCATION_INFO.
 ****************************************************************************/
 
@@ -7086,6 +7121,16 @@ NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn,
 
        switch (info_level) {
 
+               case SMB_INFO_STANDARD:
+               {
+                       status = smb_set_info_standard(conn,
+                                       pdata,
+                                       total_data,
+                                       fsp,
+                                       smb_fname);
+                       break;
+               }
+
                case SMB_INFO_SET_EA:
                {
                        status = smb_info_set_ea(conn,


-- 
Samba Shared Repository

Reply via email to