]> git.samba.org - obnox/samba/samba-obnox.git/commitdiff
smbd: Convert vfs_GetWd to synthetic_smb_fname
authorVolker Lendecke <vl@samba.org>
Fri, 12 Apr 2013 09:43:24 +0000 (11:43 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Apr 2013 21:50:00 +0000 (14:50 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/vfs.c

index b81e8ded3f9c679e093d57723dc64df0e048ac20..761470c4546fce834ef8f58d2ad2108dfe4f2458 100644 (file)
@@ -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;
        }