summaryrefslogtreecommitdiffstats
path: root/source3/smbd/vfs.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-04-12 11:43:24 +0200
committerJeremy Allison <jra@samba.org>2013-04-17 14:50:00 -0700
commite0866753ce23d7edb9ca14f825a01f201127f7bb (patch)
tree79d89618afa53c1dabce9ee7f38fea80a2b4c356 /source3/smbd/vfs.c
parent75911f94b860bcc7186390f5372ede3f6f92024e (diff)
downloadsamba-e0866753ce23d7edb9ca14f825a01f201127f7bb.tar.gz
samba-e0866753ce23d7edb9ca14f825a01f201127f7bb.tar.xz
samba-e0866753ce23d7edb9ca14f825a01f201127f7bb.zip
smbd: Convert vfs_GetWd to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/vfs.c')
-rw-r--r--source3/smbd/vfs.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index b81e8ded3f9..761470c4546 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -843,16 +843,14 @@ char *vfs_GetWd(TALLOC_CTX *ctx, connection_struct *conn)
struct file_id key;
struct smb_filename *smb_fname_dot = NULL;
struct smb_filename *smb_fname_full = NULL;
- NTSTATUS status;
if (!lp_getwd_cache()) {
goto nocache;
}
- status = create_synthetic_smb_fname(ctx, ".", NULL, NULL,
- &smb_fname_dot);
- if (!NT_STATUS_IS_OK(status)) {
- errno = map_errno_from_nt_status(status);
+ smb_fname_dot = synthetic_smb_fname(ctx, ".", NULL, NULL);
+ if (smb_fname_dot == NULL) {
+ errno = ENOMEM;
goto out;
}
@@ -877,10 +875,10 @@ char *vfs_GetWd(TALLOC_CTX *ctx, connection_struct *conn)
SMB_ASSERT((cache_value.length > 0)
&& (cache_value.data[cache_value.length-1] == '\0'));
- status = create_synthetic_smb_fname(ctx, (char *)cache_value.data,
- NULL, NULL, &smb_fname_full);
- if (!NT_STATUS_IS_OK(status)) {
- errno = map_errno_from_nt_status(status);
+ smb_fname_full = synthetic_smb_fname(ctx, (char *)cache_value.data,
+ NULL, NULL);
+ if (smb_fname_full == NULL) {
+ errno = ENOMEM;
goto out;
}