s3 file_access: Convert some more functions over to use smb_filneame
[metze/samba/wip.git] / source3 / smbd / file_access.c
index 87d45c5e7f6aabc900cb417e7006ca1ad7fd863f..d8fee1db06f538878b244a716b9648017e17c4fe 100644 (file)
@@ -232,23 +232,10 @@ bool can_access_file_data(connection_struct *conn,
  Note this doesn't take into account share write permissions.
 ****************************************************************************/
 
-bool can_write_to_file(connection_struct *conn, const char *fname, const SMB_STRUCT_STAT *psbuf)
+bool can_write_to_file(connection_struct *conn,
+                      const struct smb_filename *smb_fname)
 {
-       struct smb_filename *smb_fname;
-       NTSTATUS status;
-       bool ret;
-
-       status = create_synthetic_smb_fname_split(talloc_tos(), fname, psbuf,
-                                                 &smb_fname);
-       if (!NT_STATUS_IS_OK(status)) {
-               return false;
-       }
-
-       ret = can_access_file_data(conn, smb_fname, FILE_WRITE_DATA);
-
-       TALLOC_FREE(smb_fname);
-
-       return ret;
+       return can_access_file_data(conn, smb_fname, FILE_WRITE_DATA);
 }
 
 /****************************************************************************