summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-04-15 11:02:19 +0200
committerJeremy Allison <jra@samba.org>2013-04-17 14:50:01 -0700
commit2d76ce3fc0d5fdf7a77512e1d110ca15a1711ba0 (patch)
treecaa6ee9c799c8b96e0a03cbfb4a316b77ea9c656 /source3
parentfe798621314aaba110fb59567ab8a10eac83266e (diff)
downloadsamba-2d76ce3fc0d5fdf7a77512e1d110ca15a1711ba0.tar.gz
samba-2d76ce3fc0d5fdf7a77512e1d110ca15a1711ba0.tar.bz2
samba-2d76ce3fc0d5fdf7a77512e1d110ca15a1711ba0.zip
smbd: Convert open_dir_with_privilege to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/dir.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index f1a08bb34a..346ff8683f 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -428,7 +428,7 @@ static struct smb_Dir *open_dir_with_privilege(connection_struct *conn,
{
NTSTATUS status;
struct smb_Dir *dir_hnd = NULL;
- struct smb_filename *smb_fname_cwd = NULL;
+ struct smb_filename *smb_fname_cwd;
char *saved_dir = vfs_GetWd(talloc_tos(), conn);
struct privilege_paths *priv_paths = req->priv_paths;
int ret;
@@ -442,11 +442,10 @@ static struct smb_Dir *open_dir_with_privilege(connection_struct *conn,
}
/* Now check the stat value is the same. */
- status = create_synthetic_smb_fname(talloc_tos(), ".",
- NULL, NULL,
- &smb_fname_cwd);
+ smb_fname_cwd = synthetic_smb_fname(talloc_tos(), ".", NULL, NULL);
- if (!NT_STATUS_IS_OK(status)) {
+ if (smb_fname_cwd == NULL) {
+ status = NT_STATUS_NO_MEMORY;
goto out;
}
ret = SMB_VFS_STAT(conn, smb_fname_cwd);