Ignore:
Timestamp:
Jul 3, 2008, 11:23:12 AM (17 years ago)
Author:
Paul Smedley
Message:

Update source to 3.2.0 GA level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/smbd/msdfs.c

    r136 r138  
    368368                DEBUG(10, ("parse_msdfs_symlink: Created alt path: %s\n",
    369369                                        reflist[i].alternate_path));
    370                 *refcount += 1;
    371         }
     370        }
     371
     372        *refcount = count;
    372373
    373374        TALLOC_FREE(alt_path);
     
    13061307}
    13071308
    1308 bool create_msdfs_link(const struct junction_map *jucn,
    1309                 bool exists)
     1309bool create_msdfs_link(const struct junction_map *jucn)
    13101310{
    13111311        char *path = NULL;
     
    13601360                path, msdfs_link));
    13611361
    1362         if(exists) {
    1363                 if(SMB_VFS_UNLINK(conn,path)!=0) {
     1362        if(SMB_VFS_SYMLINK(conn, msdfs_link, path) < 0) {
     1363                if (errno == EEXIST) {
     1364                        if(SMB_VFS_UNLINK(conn,path)!=0) {
     1365                                goto out;
     1366                        }
     1367                }
     1368                if (SMB_VFS_SYMLINK(conn, msdfs_link, path) < 0) {
     1369                        DEBUG(1,("create_msdfs_link: symlink failed "
     1370                                 "%s -> %s\nError: %s\n",
     1371                                 path, msdfs_link, strerror(errno)));
    13641372                        goto out;
    13651373                }
    1366         }
    1367 
    1368         if(SMB_VFS_SYMLINK(conn, msdfs_link, path) < 0) {
    1369                 DEBUG(1,("create_msdfs_link: symlink failed "
    1370                         "%s -> %s\nError: %s\n",
    1371                         path, msdfs_link, strerror(errno)));
    1372                 goto out;
    13731374        }
    13741375
     
    15021503                goto out;
    15031504        }
     1505        jucn[cnt].comment = "";
    15041506        jucn[cnt].referral_count = 1;
    15051507
     
    15401542                char *link_target = NULL;
    15411543                if (cnt >= jn_remain) {
    1542                         SMB_VFS_CLOSEDIR(&conn,dirp);
    15431544                        DEBUG(2, ("form_junctions: ran out of MSDFS "
    15441545                                "junction slots"));
     
    15621563                                        goto out;
    15631564                                }
     1565                                jucn[cnt].comment = "";
    15641566                                cnt++;
    15651567                        }
     1568                        TALLOC_FREE(link_target);
    15661569                }
    15671570        }
Note: See TracChangeset for help on using the changeset viewer.