Changeset 221 for branches/samba-3.3.x/source/libsmb
- Timestamp:
- May 24, 2009, 7:17:10 AM (16 years ago)
- Location:
- branches/samba-3.3.x/source/libsmb
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/libsmb/async_smb.c
r206 r221 319 319 { 320 320 struct cli_state *cli = (struct cli_state *)p; 321 struct cli_request *req ;321 struct cli_request *req, *next; 322 322 NTSTATUS status; 323 323 … … 422 422 423 423 sock_error: 424 for (req = cli->outstanding_requests; req; req = req->next) { 424 for (req = cli->outstanding_requests; req; req = next) { 425 next = req; 425 426 async_req_error(req->async, status); 426 427 } -
branches/samba-3.3.x/source/libsmb/clifsinfo.c
r206 r221 303 303 return ret; 304 304 } 305 306 bool cli_get_fs_full_size_info(struct cli_state *cli, 307 SMB_BIG_UINT *total_allocation_units, 308 SMB_BIG_UINT *caller_allocation_units, 309 SMB_BIG_UINT *actual_allocation_units, 310 SMB_BIG_UINT *sectors_per_allocation_unit, 311 SMB_BIG_UINT *bytes_per_sector) 312 { 313 bool ret = False; 314 uint16 setup; 315 char param[2]; 316 char *rparam=NULL, *rdata=NULL; 317 unsigned int rparam_count=0, rdata_count=0; 318 319 setup = TRANSACT2_QFSINFO; 320 321 SSVAL(param,0,SMB_FS_FULL_SIZE_INFORMATION); 322 323 if (!cli_send_trans(cli, SMBtrans2, 324 NULL, 325 0, 0, 326 &setup, 1, 0, 327 param, 2, 0, 328 NULL, 0, 560)) { 329 goto cleanup; 330 } 331 332 if (!cli_receive_trans(cli, SMBtrans2, 333 &rparam, &rparam_count, 334 &rdata, &rdata_count)) { 335 goto cleanup; 336 } 337 338 if (cli_is_error(cli)) { 339 ret = False; 340 goto cleanup; 341 } else { 342 ret = True; 343 } 344 345 if (rdata_count != 32) { 346 goto cleanup; 347 } 348 349 if (total_allocation_units) { 350 *total_allocation_units = BIG_UINT(rdata, 0); 351 } 352 if (caller_allocation_units) { 353 *caller_allocation_units = BIG_UINT(rdata,8); 354 } 355 if (actual_allocation_units) { 356 *actual_allocation_units = BIG_UINT(rdata,16); 357 } 358 if (sectors_per_allocation_unit) { 359 *sectors_per_allocation_unit = IVAL(rdata,24); 360 } 361 if (bytes_per_sector) { 362 *bytes_per_sector = IVAL(rdata,28); 363 } 364 365 cleanup: 366 SAFE_FREE(rparam); 367 SAFE_FREE(rdata); 368 369 return ret; 370 } 371 372 bool cli_get_posix_fs_info(struct cli_state *cli, 373 uint32 *optimal_transfer_size, 374 uint32 *block_size, 375 SMB_BIG_UINT *total_blocks, 376 SMB_BIG_UINT *blocks_available, 377 SMB_BIG_UINT *user_blocks_available, 378 SMB_BIG_UINT *total_file_nodes, 379 SMB_BIG_UINT *free_file_nodes, 380 SMB_BIG_UINT *fs_identifier) 381 { 382 bool ret = False; 383 uint16 setup; 384 char param[2]; 385 char *rparam=NULL, *rdata=NULL; 386 unsigned int rparam_count=0, rdata_count=0; 387 388 setup = TRANSACT2_QFSINFO; 389 390 SSVAL(param,0,SMB_QUERY_POSIX_FS_INFO); 391 392 if (!cli_send_trans(cli, SMBtrans2, 393 NULL, 394 0, 0, 395 &setup, 1, 0, 396 param, 2, 0, 397 NULL, 0, 560)) { 398 goto cleanup; 399 } 400 401 if (!cli_receive_trans(cli, SMBtrans2, 402 &rparam, &rparam_count, 403 &rdata, &rdata_count)) { 404 goto cleanup; 405 } 406 407 if (cli_is_error(cli)) { 408 ret = False; 409 goto cleanup; 410 } else { 411 ret = True; 412 } 413 414 if (rdata_count != 56) { 415 goto cleanup; 416 } 417 418 if (optimal_transfer_size) { 419 *optimal_transfer_size = IVAL(rdata, 0); 420 } 421 if (block_size) { 422 *block_size = IVAL(rdata,4); 423 } 424 if (total_blocks) { 425 *total_blocks = BIG_UINT(rdata,8); 426 } 427 if (blocks_available) { 428 *blocks_available = BIG_UINT(rdata,16); 429 } 430 if (user_blocks_available) { 431 *user_blocks_available = BIG_UINT(rdata,24); 432 } 433 if (total_file_nodes) { 434 *total_file_nodes = BIG_UINT(rdata,32); 435 } 436 if (free_file_nodes) { 437 *free_file_nodes = BIG_UINT(rdata,40); 438 } 439 if (fs_identifier) { 440 *fs_identifier = BIG_UINT(rdata,48); 441 } 442 443 cleanup: 444 SAFE_FREE(rparam); 445 SAFE_FREE(rdata); 446 447 return ret; 448 } 449 305 450 306 451 /****************************************************************************** -
branches/samba-3.3.x/source/libsmb/clikrb5.c
r206 r221 1747 1747 } 1748 1748 1749 if (tmp[0] == '/') { 1750 /* Treat as a FILE: keytab definition. */ 1751 found_valid_name = true; 1752 } 1753 1749 1754 if (found_valid_name) { 1750 1755 if (tmp[0] != '/') { -
branches/samba-3.3.x/source/libsmb/libsmb_compat.c
r206 r221 331 331 332 332 int 333 smbc_statvfs(char *path, 334 struct statvfs *st) 335 { 336 return smbc_getFunctionStatVFS(statcont)(statcont, path, st); 337 } 338 339 int 340 smbc_fstatvfs(int fd, 341 struct statvfs *st) 342 { 343 SMBCFILE * file = find_fd(fd); 344 return smbc_getFunctionFstatVFS(statcont)(statcont, file, st); 345 } 346 347 int 333 348 smbc_ftruncate(int fd, 334 349 off_t size) -
branches/samba-3.3.x/source/libsmb/libsmb_context.c
r206 r221 95 95 smbc_setFunctionFtruncate(context, SMBC_ftruncate_ctx); 96 96 smbc_setFunctionStat(context, SMBC_stat_ctx); 97 smbc_setFunctionStatVFS(context, SMBC_statvfs_ctx); 98 smbc_setFunctionFstatVFS(context, SMBC_fstatvfs_ctx); 97 99 smbc_setFunctionFstat(context, SMBC_fstat_ctx); 98 100 smbc_setFunctionOpendir(context, SMBC_opendir_ctx); … … 645 647 cli_cm_set_credentials(); 646 648 } 649 650 void smbc_set_credentials_with_fallback(SMBCCTX *context, 651 const char *workgroup, 652 const char *user, 653 const char *password) 654 { 655 smbc_bool use_kerberos = false; 656 const char *signing_state = "off"; 657 658 if (!context || 659 ! workgroup || ! *workgroup || 660 ! user || ! *user || 661 ! password || ! *password) { 662 663 return; 664 } 665 666 if (smbc_getOptionUseKerberos(context)) { 667 use_kerberos = True; 668 } 669 670 if (lp_client_signing()) { 671 signing_state = "on"; 672 } 673 674 if (lp_client_signing() == Required) { 675 signing_state = "force"; 676 } 677 678 /* Using CONST_DISCARD here is ugly, but 679 * we know that smbc_set_credentials() doesn't 680 * actually modify the strings, and should have 681 * been const from the start. We're constrained 682 * by the ABI here. 683 */ 684 685 smbc_set_credentials(CONST_DISCARD(char *,workgroup), 686 CONST_DISCARD(char *,user), 687 CONST_DISCARD(char *,password), 688 use_kerberos, 689 CONST_DISCARD(char *,signing_state)); 690 691 if (smbc_getOptionFallbackAfterKerberos(context)) { 692 cli_cm_set_fallback_after_kerberos(); 693 } 694 } -
branches/samba-3.3.x/source/libsmb/libsmb_dir.c
r206 r221 1502 1502 char *password = NULL; 1503 1503 char *workgroup = NULL; 1504 char *targetpath = NULL; 1505 struct cli_state *targetcli = NULL; 1504 1506 char *path = NULL; 1505 1507 uint16 mode; … … 1519 1521 } 1520 1522 1521 DEBUG(4, ("smbc_chmod(%s, 0%3o)\n", fname, newmode));1523 DEBUG(4, ("smbc_chmod(%s, 0%3o)\n", fname, (unsigned int)newmode)); 1522 1524 1523 1525 if (SMBC_parse_path(frame, … … 1552 1554 return -1; /* errno set by SMBC_server */ 1553 1555 } 1556 1557 /*d_printf(">>>unlink: resolving %s\n", path);*/ 1558 if (!cli_resolve_path(frame, "", srv->cli, path, 1559 &targetcli, &targetpath)) { 1560 d_printf("Could not resolve %s\n", path); 1561 TALLOC_FREE(frame); 1562 return -1; 1563 } 1554 1564 1555 1565 mode = 0; … … 1560 1570 if ((newmode & S_IXOTH) && lp_map_hidden(-1)) mode |= aHIDDEN; 1561 1571 1562 if (!cli_setatr( srv->cli,path, mode, 0)) {1563 errno = SMBC_errno(context, srv->cli);1572 if (!cli_setatr(targetcli, targetpath, mode, 0)) { 1573 errno = SMBC_errno(context, targetcli); 1564 1574 TALLOC_FREE(frame); 1565 1575 return -1; … … 1902 1912 } 1903 1913 1914 /* set the credentials to make DFS work */ 1915 smbc_set_credentials_with_fallback(ocontext, 1916 workgroup, 1917 user1, 1918 password1); 1919 1904 1920 /*d_printf(">>>rename: resolving %s\n", path1);*/ 1905 1921 if (!cli_resolve_path(frame, "", srv->cli, path1, … … 1909 1925 return -1; 1910 1926 } 1927 1928 /* set the credentials to make DFS work */ 1929 smbc_set_credentials_with_fallback(ncontext, 1930 workgroup, 1931 user2, 1932 password2); 1933 1911 1934 /*d_printf(">>>rename: resolved path as %s\n", targetpath1);*/ 1912 1935 /*d_printf(">>>rename: resolving %s\n", path2);*/ -
branches/samba-3.3.x/source/libsmb/libsmb_file.c
r206 r221 383 383 return -1; 384 384 } 385 385 386 386 /*d_printf(">>>write: resolving %s\n", path);*/ 387 387 if (!cli_resolve_path(frame, "", file->srv->cli, path, -
branches/samba-3.3.x/source/libsmb/libsmb_path.c
r206 r221 234 234 const char *p; 235 235 char *q, *r; 236 char *workgroup = NULL; 236 237 int len; 237 238 … … 333 334 334 335 if (strchr_m(u, ';')) { 335 char *workgroup;336 336 next_token_no_ltrim_talloc(ctx, &u, &workgroup, ";"); 337 337 if (!workgroup) { … … 395 395 (void) urldecode_talloc(ctx, pp_user, *pp_user); 396 396 (void) urldecode_talloc(ctx, pp_password, *pp_password); 397 398 if (!workgroup) { 399 workgroup = talloc_strdup(ctx, smbc_getWorkgroup(context)); 400 } 401 if (!workgroup) { 402 return -1; 403 } 404 405 /* set the credentials to make DFS work */ 406 smbc_set_credentials_with_fallback(context, 407 workgroup, 408 *pp_user, 409 *pp_password); 397 410 398 411 return 0; -
branches/samba-3.3.x/source/libsmb/libsmb_server.c
r206 r221 239 239 { 240 240 SMBCSRV *srv=NULL; 241 char *workgroup = NULL; 241 242 struct cli_state *c; 242 243 struct nmb_name called, calling; … … 360 361 361 362 /* ... then we're done here. Give 'em what they came for. */ 362 return srv;363 goto done; 363 364 } 364 365 … … 599 600 600 601 DLIST_ADD(context->internal->servers, srv); 602 done: 603 if (!pp_workgroup || !*pp_workgroup || !**pp_workgroup) { 604 workgroup = talloc_strdup(ctx, smbc_getWorkgroup(context)); 605 } else { 606 workgroup = *pp_workgroup; 607 } 608 if(!workgroup) { 609 return NULL; 610 } 611 612 /* set the credentials to make DFS work */ 613 smbc_set_credentials_with_fallback(context, 614 workgroup, 615 *pp_username, 616 *pp_password); 617 601 618 return srv; 602 619 -
branches/samba-3.3.x/source/libsmb/libsmb_setget.c
r206 r221 660 660 } 661 661 662 smbc_statvfs_fn 663 smbc_getFunctionStatVFS(SMBCCTX *c) 664 { 665 return c->internal->posix_emu.statvfs_fn; 666 } 667 668 void 669 smbc_setFunctionStatVFS(SMBCCTX *c, smbc_statvfs_fn fn) 670 { 671 c->internal->posix_emu.statvfs_fn = fn; 672 } 673 674 smbc_fstatvfs_fn 675 smbc_getFunctionFstatVFS(SMBCCTX *c) 676 { 677 return c->internal->posix_emu.fstatvfs_fn; 678 } 679 680 void 681 smbc_setFunctionFstatVFS(SMBCCTX *c, smbc_fstatvfs_fn fn) 682 { 683 c->internal->posix_emu.fstatvfs_fn = fn; 684 } 685 662 686 smbc_ftruncate_fn 663 687 smbc_getFunctionFtruncate(SMBCCTX *c) -
branches/samba-3.3.x/source/libsmb/libsmb_stat.c
r206 r221 156 156 return -1; 157 157 } 158 158 159 159 if (!user || user[0] == (char)0) { 160 160 user = talloc_strdup(frame, smbc_getUser(context)); … … 301 301 302 302 } 303 304 305 /* 306 * Routine to obtain file system information given a path 307 */ 308 int 309 SMBC_statvfs_ctx(SMBCCTX *context, 310 char *path, 311 struct statvfs *st) 312 { 313 int ret; 314 bool bIsDir; 315 struct stat statbuf; 316 SMBCFILE * pFile; 317 318 /* Determine if the provided path is a file or a folder */ 319 if (SMBC_stat_ctx(context, path, &statbuf) < 0) { 320 return -1; 321 } 322 323 /* Is it a file or a directory? */ 324 if (S_ISDIR(statbuf.st_mode)) { 325 /* It's a directory. */ 326 if ((pFile = SMBC_opendir_ctx(context, path)) == NULL) { 327 return -1; 328 } 329 bIsDir = true; 330 } else if (S_ISREG(statbuf.st_mode)) { 331 /* It's a file. */ 332 if ((pFile = SMBC_open_ctx(context, path, 333 O_RDONLY, 0)) == NULL) { 334 return -1; 335 } 336 bIsDir = false; 337 } else { 338 /* It's neither a file nor a directory. Not supported. */ 339 errno = ENOSYS; 340 return -1; 341 } 342 343 /* Now we have an open file handle, so just use SMBC_fstatvfs */ 344 ret = SMBC_fstatvfs_ctx(context, pFile, st); 345 346 /* Close the file or directory */ 347 if (bIsDir) { 348 SMBC_closedir_ctx(context, pFile); 349 } else { 350 SMBC_close_ctx(context, pFile); 351 } 352 353 return ret; 354 } 355 356 357 /* 358 * Routine to obtain file system information given an fd 359 */ 360 361 int 362 SMBC_fstatvfs_ctx(SMBCCTX *context, 363 SMBCFILE *file, 364 struct statvfs *st) 365 { 366 unsigned long flags = 0; 367 uint32 fs_attrs = 0; 368 struct cli_state *cli = file->srv->cli; 369 370 371 /* Initialize all fields (at least until we actually use them) */ 372 memset(st, 0, sizeof(*st)); 373 374 /* 375 * The state of each flag is such that the same bits are unset as 376 * would typically be unset on a local file system on a POSIX OS. Thus 377 * the bit is on, for example, only for case-insensitive file systems 378 * since most POSIX file systems are case sensitive and fstatvfs() 379 * would typically return zero in these bits on such a local file 380 * system. 381 */ 382 383 /* See if the server has UNIX CIFS support */ 384 if (! SERVER_HAS_UNIX_CIFS(cli)) { 385 SMB_BIG_UINT total_allocation_units; 386 SMB_BIG_UINT caller_allocation_units; 387 SMB_BIG_UINT actual_allocation_units; 388 SMB_BIG_UINT sectors_per_allocation_unit; 389 SMB_BIG_UINT bytes_per_sector; 390 391 /* Nope. If size data is available... */ 392 if (cli_get_fs_full_size_info(cli, 393 &total_allocation_units, 394 &caller_allocation_units, 395 &actual_allocation_units, 396 §ors_per_allocation_unit, 397 &bytes_per_sector)) { 398 399 /* ... then provide it */ 400 st->f_bsize = 401 (unsigned long) bytes_per_sector; 402 #if HAVE_FRSIZE 403 st->f_frsize = 404 (unsigned long) sectors_per_allocation_unit; 405 #endif 406 st->f_blocks = 407 (fsblkcnt_t) total_allocation_units; 408 st->f_bfree = 409 (fsblkcnt_t) actual_allocation_units; 410 } 411 412 flags |= SMBC_VFS_FEATURE_NO_UNIXCIFS; 413 } else { 414 uint32 optimal_transfer_size; 415 uint32 block_size; 416 SMB_BIG_UINT total_blocks; 417 SMB_BIG_UINT blocks_available; 418 SMB_BIG_UINT user_blocks_available; 419 SMB_BIG_UINT total_file_nodes; 420 SMB_BIG_UINT free_file_nodes; 421 SMB_BIG_UINT fs_identifier; 422 423 /* Has UNIXCIFS. If POSIX filesystem info is available... */ 424 if (cli_get_posix_fs_info(cli, 425 &optimal_transfer_size, 426 &block_size, 427 &total_blocks, 428 &blocks_available, 429 &user_blocks_available, 430 &total_file_nodes, 431 &free_file_nodes, 432 &fs_identifier)) { 433 434 /* ... then what's provided here takes precedence. */ 435 st->f_bsize = 436 (unsigned long) block_size; 437 st->f_blocks = 438 (fsblkcnt_t) total_blocks; 439 st->f_bfree = 440 (fsblkcnt_t) blocks_available; 441 st->f_bavail = 442 (fsblkcnt_t) user_blocks_available; 443 st->f_files = 444 (fsfilcnt_t) total_file_nodes; 445 st->f_ffree = 446 (fsfilcnt_t) free_file_nodes; 447 #if HAVE_FSID_INT 448 st->f_fsid = 449 (unsigned long) fs_identifier; 450 #endif 451 } 452 } 453 454 /* See if the share is case sensitive */ 455 if (!cli_get_fs_attr_info(cli, &fs_attrs)) { 456 /* 457 * We can't determine the case sensitivity of 458 * the share. We have no choice but to use the 459 * user-specified case sensitivity setting. 460 */ 461 if (! smbc_getOptionCaseSensitive(context)) { 462 flags |= SMBC_VFS_FEATURE_CASE_INSENSITIVE; 463 } 464 } else { 465 if (! (fs_attrs & FILE_CASE_SENSITIVE_SEARCH)) { 466 flags |= SMBC_VFS_FEATURE_CASE_INSENSITIVE; 467 } 468 } 469 470 /* See if DFS is supported */ 471 if ((cli->capabilities & CAP_DFS) && cli->dfsroot) { 472 flags |= SMBC_VFS_FEATURE_DFS; 473 } 474 475 #if HAVE_STATVFS_F_FLAG 476 st->f_flag = flags; 477 #elif HAVE_STATVFS_F_FLAGS 478 st->f_flags = flags; 479 #endif 480 481 return 0; 482 } -
branches/samba-3.3.x/source/libsmb/libsmb_xattr.c
r206 r221 1274 1274 ",%s:%lu", 1275 1275 attr_strings.create_time_attr, 1276 create_time);1276 (unsigned long) create_time); 1277 1277 if (!p) { 1278 1278 errno = ENOMEM; … … 1284 1284 ",%s:%lu", 1285 1285 attr_strings.create_time_attr, 1286 create_time);1286 (unsigned long) create_time); 1287 1287 } 1288 1288 } else if (StrCaseCmp(name, attr_strings.create_time_attr) == 0) { 1289 1289 if (determine_size) { 1290 p = talloc_asprintf(ctx, "%lu", create_time);1290 p = talloc_asprintf(ctx, "%lu", (unsigned long) create_time); 1291 1291 if (!p) { 1292 1292 errno = ENOMEM; … … 1296 1296 } else { 1297 1297 n = snprintf(buf, bufsize, 1298 "%lu", create_time);1298 "%lu", (unsigned long) create_time); 1299 1299 } 1300 1300 } … … 1316 1316 ",%s:%lu", 1317 1317 attr_strings.access_time_attr, 1318 access_time);1318 (unsigned long) access_time); 1319 1319 if (!p) { 1320 1320 errno = ENOMEM; … … 1326 1326 ",%s:%lu", 1327 1327 attr_strings.access_time_attr, 1328 access_time);1328 (unsigned long) access_time); 1329 1329 } 1330 1330 } else if (StrCaseCmp(name, attr_strings.access_time_attr) == 0) { 1331 1331 if (determine_size) { 1332 p = talloc_asprintf(ctx, "%lu", access_time);1332 p = talloc_asprintf(ctx, "%lu", (unsigned long) access_time); 1333 1333 if (!p) { 1334 1334 errno = ENOMEM; … … 1338 1338 } else { 1339 1339 n = snprintf(buf, bufsize, 1340 "%lu", access_time);1340 "%lu", (unsigned long) access_time); 1341 1341 } 1342 1342 } … … 1358 1358 ",%s:%lu", 1359 1359 attr_strings.write_time_attr, 1360 write_time);1360 (unsigned long) write_time); 1361 1361 if (!p) { 1362 1362 errno = ENOMEM; … … 1368 1368 ",%s:%lu", 1369 1369 attr_strings.write_time_attr, 1370 write_time);1370 (unsigned long) write_time); 1371 1371 } 1372 1372 } else if (StrCaseCmp(name, attr_strings.write_time_attr) == 0) { 1373 1373 if (determine_size) { 1374 p = talloc_asprintf(ctx, "%lu", write_time);1374 p = talloc_asprintf(ctx, "%lu", (unsigned long) write_time); 1375 1375 if (!p) { 1376 1376 errno = ENOMEM; … … 1380 1380 } else { 1381 1381 n = snprintf(buf, bufsize, 1382 "%lu", write_time);1382 "%lu", (unsigned long) write_time); 1383 1383 } 1384 1384 } … … 1400 1400 ",%s:%lu", 1401 1401 attr_strings.change_time_attr, 1402 change_time);1402 (unsigned long) change_time); 1403 1403 if (!p) { 1404 1404 errno = ENOMEM; … … 1410 1410 ",%s:%lu", 1411 1411 attr_strings.change_time_attr, 1412 change_time);1412 (unsigned long) change_time); 1413 1413 } 1414 1414 } else if (StrCaseCmp(name, attr_strings.change_time_attr) == 0) { 1415 1415 if (determine_size) { 1416 p = talloc_asprintf(ctx, "%lu", change_time);1416 p = talloc_asprintf(ctx, "%lu", (unsigned long) change_time); 1417 1417 if (!p) { 1418 1418 errno = ENOMEM; … … 1422 1422 } else { 1423 1423 n = snprintf(buf, bufsize, 1424 "%lu", change_time);1424 "%lu", (unsigned long) change_time); 1425 1425 } 1426 1426 } … … 1502 1502 POLICY_HND *pol, 1503 1503 const char *filename, 1504 c onst char *the_acl,1504 char *the_acl, 1505 1505 int mode, 1506 1506 int flags) … … 1532 1532 } 1533 1533 1534 sd = sec_desc_parse(ctx, ipc_cli, pol, numeric, 1535 CONST_DISCARD(char *, the_acl)); 1534 sd = sec_desc_parse(ctx, ipc_cli, pol, numeric, the_acl); 1536 1535 1537 1536 if (!sd) { … … 2115 2114 2116 2115 /* Yup. */ 2116 char *filename = (char *) name; 2117 2117 ret = cacl_get(context, talloc_tos(), srv, 2118 2118 ipc_srv == NULL ? NULL : ipc_srv->cli, 2119 2119 &ipc_srv->pol, path, 2120 CONST_DISCARD(char *, name), 2121 CONST_DISCARD(char *, value), size); 2120 filename, 2121 CONST_DISCARD(char *, value), 2122 size); 2122 2123 if (ret < 0 && errno == 0) { 2123 2124 errno = SMBC_errno(context, srv->cli); … … 2238 2239 ret = cacl_set(talloc_tos(), srv->cli, 2239 2240 ipc_srv->cli, &ipc_srv->pol, path, 2240 name + 19, SMBC_XATTR_MODE_REMOVE, 0); 2241 CONST_DISCARD(char *, name) + 19, 2242 SMBC_XATTR_MODE_REMOVE, 0); 2241 2243 TALLOC_FREE(frame); 2242 2244 return ret; -
branches/samba-3.3.x/source/libsmb/namequery.c
r206 r221 1503 1503 1504 1504 DEBUG(10, ("internal_resolve_name: looking up %s#%x (sitename %s)\n", 1505 name, name_type, sitename ? sitename : NULL));1505 name, name_type, sitename ? sitename : "(null)")); 1506 1506 1507 1507 if (is_ipaddress(name)) { … … 2142 2142 bool ads_only ) 2143 2143 { 2144 bool ordered ;2144 bool ordered = false; 2145 2145 NTSTATUS status; 2146 2146 enum dc_lookup_type lookup_type = DC_NORMAL_LOOKUP;
Note:
See TracChangeset
for help on using the changeset viewer.