summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/proto.h3
-rw-r--r--source3/smbd/reply.c2
-rw-r--r--source3/smbd/vfs.c9
3 files changed, 12 insertions, 2 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 22788e6581..9b144fd3ae 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3095,7 +3095,6 @@ uint32 _spoolss_open_printer_ex( const UNISTR2 *printername,
uint32 user_switch, SPOOL_USER_CTR user_ctr,
POLICY_HND *handle);
uint32 _spoolss_closeprinter(POLICY_HND *handle);
-uint32 _spoolss_abortprinter(POLICY_HND *handle, pipes_struct *p);
uint32 _spoolss_deleteprinter(POLICY_HND *handle);
uint32 _spoolss_getprinterdata(POLICY_HND *handle, UNISTR2 *valuename,
uint32 in_size,
@@ -3127,6 +3126,7 @@ uint32 _spoolss_writeprinter( POLICY_HND *handle,
uint32 buffer_size,
uint8 *buffer,
uint32 *buffer_written);
+uint32 _spoolss_abortprinter(POLICY_HND *handle, pipes_struct *p);
uint32 _spoolss_setprinter(POLICY_HND *handle, uint32 level,
const SPOOL_PRINTER_INFO_LEVEL *info,
DEVMODE_CTR devmode_ctr,
@@ -3812,6 +3812,7 @@ int vfs_init_default(connection_struct *conn);
BOOL vfs_init_custom(connection_struct *conn);
BOOL vfs_directory_exist(connection_struct *conn, char *dname,
SMB_STRUCT_STAT *st);
+int vfs_unlink(connection_struct *conn, char *fname);
BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf);
ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N);
SMB_OFF_T vfs_transfer_file(int in_fd, files_struct *in_fsp,
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 00e6f44dd0..7e6a244190 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1888,7 +1888,7 @@ int reply_unlink(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
if (!has_wild) {
pstrcat(directory,"/");
pstrcat(directory,mask);
- if (can_delete(directory,conn,dirtype) && !dos_unlink(directory))
+ if (can_delete(directory,conn,dirtype) && !vfs_unlink(conn,directory))
count++;
if (!count)
exists = vfs_file_exist(conn,directory,NULL);
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 7c34817351..496d3e0432 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -243,6 +243,15 @@ BOOL vfs_directory_exist(connection_struct *conn, char *dname,
}
/*******************************************************************
+ vfs Unlink wrapper that calls dos_to_unix.
+********************************************************************/
+
+int vfs_unlink(connection_struct *conn, char *fname)
+{
+ return(conn->vfs_ops.unlink(dos_to_unix(fname,False)));
+}
+
+/*******************************************************************
check if a vfs file exists
********************************************************************/
BOOL vfs_file_exist(connection_struct *conn,char *fname,SMB_STRUCT_STAT *sbuf)