Changeset 138 for trunk/samba/source/smbd/msdfs.c
- Timestamp:
- Jul 3, 2008, 11:23:12 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/samba/source/smbd/msdfs.c
r136 r138 368 368 DEBUG(10, ("parse_msdfs_symlink: Created alt path: %s\n", 369 369 reflist[i].alternate_path)); 370 *refcount += 1; 371 } 370 } 371 372 *refcount = count; 372 373 373 374 TALLOC_FREE(alt_path); … … 1306 1307 } 1307 1308 1308 bool create_msdfs_link(const struct junction_map *jucn, 1309 bool exists) 1309 bool create_msdfs_link(const struct junction_map *jucn) 1310 1310 { 1311 1311 char *path = NULL; … … 1360 1360 path, msdfs_link)); 1361 1361 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))); 1364 1372 goto out; 1365 1373 } 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;1373 1374 } 1374 1375 … … 1502 1503 goto out; 1503 1504 } 1505 jucn[cnt].comment = ""; 1504 1506 jucn[cnt].referral_count = 1; 1505 1507 … … 1540 1542 char *link_target = NULL; 1541 1543 if (cnt >= jn_remain) { 1542 SMB_VFS_CLOSEDIR(&conn,dirp);1543 1544 DEBUG(2, ("form_junctions: ran out of MSDFS " 1544 1545 "junction slots")); … … 1562 1563 goto out; 1563 1564 } 1565 jucn[cnt].comment = ""; 1564 1566 cnt++; 1565 1567 } 1568 TALLOC_FREE(link_target); 1566 1569 } 1567 1570 }
Note:
See TracChangeset
for help on using the changeset viewer.