1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

smbd: Convert can_delete_file_in_directory to synthetic_smb_fname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2013-04-15 11:05:20 +02:00 committed by Jeremy Allison
parent e3a7f70768
commit 01b8f34e49

View File

@ -37,8 +37,7 @@ bool can_delete_file_in_directory(connection_struct *conn,
{ {
TALLOC_CTX *ctx = talloc_tos(); TALLOC_CTX *ctx = talloc_tos();
char *dname = NULL; char *dname = NULL;
struct smb_filename *smb_fname_parent = NULL; struct smb_filename *smb_fname_parent;
NTSTATUS status;
bool ret; bool ret;
if (!CAN_WRITE(conn)) { if (!CAN_WRITE(conn)) {
@ -55,9 +54,8 @@ bool can_delete_file_in_directory(connection_struct *conn,
return False; return False;
} }
status = create_synthetic_smb_fname(ctx, dname, NULL, NULL, smb_fname_parent = synthetic_smb_fname(ctx, dname, NULL, NULL);
&smb_fname_parent); if (smb_fname_parent == NULL) {
if (!NT_STATUS_IS_OK(status)) {
ret = false; ret = false;
goto out; goto out;
} }