smbd: Convert create_msdfs_link to synthetic_smb_fname
authorVolker Lendecke <vl@samba.org>
Mon, 15 Apr 2013 09:06:57 +0000 (11:06 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Apr 2013 21:50:01 +0000 (14:50 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/msdfs.c

index 5388db9147f32c6b58360cd3d0cb331189dbddb3..2e32978861fa4c2ecba93f314a68e4080468b614 100644 (file)
@@ -1279,14 +1279,12 @@ bool create_msdfs_link(const struct junction_map *jucn)
 
        if(SMB_VFS_SYMLINK(conn, msdfs_link, path) < 0) {
                if (errno == EEXIST) {
-                       struct smb_filename *smb_fname = NULL;
-                       NTSTATUS status;
-
-                       status = create_synthetic_smb_fname(talloc_tos(), path,
-                                                           NULL, NULL,
-                                                           &smb_fname);
-                       if (!NT_STATUS_IS_OK(status)) {
-                               errno = map_errno_from_nt_status(status);
+                       struct smb_filename *smb_fname;
+
+                       smb_fname = synthetic_smb_fname(talloc_tos(), path,
+                                                       NULL, NULL);
+                       if (smb_fname == NULL) {
+                               errno = ENOMEM;
                                goto out;
                        }