1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

Added vfs_unlink call to ensure vfs is used on unlink from client.

Jeremy.
(This used to be commit 38fc56c843)
This commit is contained in:
Jeremy Allison 2000-08-30 18:33:56 +00:00
parent 6e150a7ca5
commit 177b962dfe
3 changed files with 12 additions and 2 deletions

View File

@ -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,

View File

@ -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);

View File

@ -242,6 +242,15 @@ BOOL vfs_directory_exist(connection_struct *conn, char *dname,
return ret;
}
/*******************************************************************
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
********************************************************************/