smbd: Make store_file_unix_basic[_info2] public
authorVolker Lendecke <vl@samba.org>
Wed, 28 Dec 2022 22:47:42 +0000 (23:47 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 4 Jan 2023 08:54:32 +0000 (08:54 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/proto.h
source3/smbd/smb2_trans2.c

index 4a9ffbc099831224400af56a5036a954d633b423..cddd584925ed63c9da86ffb40ebf7a850949a29d 100644 (file)
@@ -1101,6 +1101,15 @@ int sys_statvfs(const char *path, struct vfs_statvfs_struct *statbuf);
 
 /* The following definitions come from smbd/trans2.c  */
 
+char *store_file_unix_basic(connection_struct *conn,
+                           char *pdata,
+                           files_struct *fsp,
+                           const SMB_STRUCT_STAT *psbuf);
+char *store_file_unix_basic_info2(connection_struct *conn,
+                                 char *pdata,
+                                 files_struct *fsp,
+                                 const SMB_STRUCT_STAT *psbuf);
+
 NTSTATUS refuse_symlink_fsp(const struct files_struct *fsp);
 NTSTATUS check_access_fsp(struct files_struct *fsp,
                          uint32_t access_mask);
index 10d90cc4f165bf7bcd6c17af7171a74fc7dc050c..d720ce207d2fb4b9899077c339f8c37f061e77a3 100644 (file)
 
 #define DIR_ENTRY_SAFETY_MARGIN 4096
 
-static char *store_file_unix_basic(connection_struct *conn,
-                               char *pdata,
-                               files_struct *fsp,
-                               const SMB_STRUCT_STAT *psbuf);
-
-static char *store_file_unix_basic_info2(connection_struct *conn,
-                               char *pdata,
-                               files_struct *fsp,
-                               const SMB_STRUCT_STAT *psbuf);
-
 static uint32_t generate_volume_serial_number(
                                const struct loadparm_substitution *lp_sub,
                                int snum);
@@ -3055,10 +3045,10 @@ static bool marshall_posix_acl(connection_struct *conn, char *pdata, SMB_STRUCT_
  Store the FILE_UNIX_BASIC info.
 ****************************************************************************/
 
-static char *store_file_unix_basic(connection_struct *conn,
-                               char *pdata,
-                               files_struct *fsp,
-                               const SMB_STRUCT_STAT *psbuf)
+char *store_file_unix_basic(connection_struct *conn,
+                           char *pdata,
+                           files_struct *fsp,
+                           const SMB_STRUCT_STAT *psbuf)
 {
        dev_t devno;
 
@@ -3202,10 +3192,10 @@ static bool map_info2_flags_to_sbuf(const SMB_STRUCT_STAT *psbuf,
 /* Just like SMB_QUERY_FILE_UNIX_BASIC, but with the addition
  * of file flags and birth (create) time.
  */
-static char *store_file_unix_basic_info2(connection_struct *conn,
-                               char *pdata,
-                               files_struct *fsp,
-                               const SMB_STRUCT_STAT *psbuf)
+char *store_file_unix_basic_info2(connection_struct *conn,
+                                 char *pdata,
+                                 files_struct *fsp,
+                                 const SMB_STRUCT_STAT *psbuf)
 {
        uint32_t file_flags = 0;
        uint32_t flags_mask = 0;