1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

VFS: Modify rmdir to take a const struct smb_filename * instead of const char *

Preparing to reduce use of lp_posix_pathnames().

Uses the same techniques as commit 616d068f0c
(synthetic_smb_fname()) to cope with modules that
modify the incoming pathname.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Feb 25 20:46:49 CET 2016 on sn-devel-144
This commit is contained in:
Jeremy Allison
2016-02-24 14:02:45 -08:00
committed by Michael Adam
parent de2bc1bc38
commit cd1335e67d
28 changed files with 215 additions and 112 deletions

View File

@ -158,20 +158,21 @@ static int audit_mkdir(vfs_handle_struct *handle,
return result;
}
static int audit_rmdir(vfs_handle_struct *handle, const char *path)
static int audit_rmdir(vfs_handle_struct *handle,
const struct smb_filename *smb_fname)
{
int result;
result = SMB_VFS_NEXT_RMDIR(handle, path);
result = SMB_VFS_NEXT_RMDIR(handle, smb_fname);
if (lp_syslog() > 0) {
syslog(audit_syslog_priority(handle), "rmdir %s %s%s\n",
path,
smb_fname->base_name,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
}
DEBUG(0, ("vfs_extd_audit: rmdir %s %s %s\n",
path,
smb_fname->base_name,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : ""));