1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 27 /* 28 * smb_com_search 29 * smb_com_find, smb_com_find_close 30 * smb_find_unique 31 * 32 * These commands are used for directory searching. They share the same 33 * message formats, defined below: 34 * 35 * Client Request Description 36 * ---------------------------------- --------------------------------- 37 * 38 * UCHAR WordCount; Count of parameter words = 2 39 * USHORT MaxCount; Number of dir. entries to return 40 * USHORT SearchAttributes; 41 * USHORT ByteCount; Count of data bytes; min = 5 42 * UCHAR BufferFormat1; 0x04 -- ASCII 43 * UCHAR FileName[]; File name, may be null 44 * UCHAR BufferFormat2; 0x05 -- Variable block 45 * USHORT ResumeKeyLength; Length of resume key, may be 0 46 * UCHAR ResumeKey[]; Resume key 47 * 48 * FileName specifies the file to be sought. SearchAttributes indicates 49 * the attributes that the file must have. If SearchAttributes is 50 * zero then only normal files are returned. If the system file, hidden or 51 * directory attributes are specified then the search is inclusive - both the 52 * specified type(s) of files and normal files are returned. If the volume 53 * label attribute is specified then the search is exclusive, and only the 54 * volume label entry is returned. 55 * 56 * MaxCount specifies the number of directory entries to be returned. 57 * 58 * Server Response Description 59 * ---------------------------------- --------------------------------- 60 * 61 * UCHAR WordCount; Count of parameter words = 1 62 * USHORT Count; Number of entries returned 63 * USHORT ByteCount; Count of data bytes; min = 3 64 * UCHAR BufferFormat; 0x05 -- Variable block 65 * USHORT DataLength; Length of data 66 * UCHAR DirectoryInformationData[]; Data 67 * 68 * The response will contain one or more directory entries as determined by 69 * the Count field. No more than MaxCount entries will be returned. Only 70 * entries that match the sought FileName and SearchAttributes combination 71 * will be returned. 72 * 73 * ResumeKey must be null (length = 0) on the initial search request. 74 * Subsequent search requests intended to continue a search must contain 75 * the ResumeKey field extracted from the last directory entry of the 76 * previous response. ResumeKey is self-contained, for calls containing 77 * a non-zero ResumeKey neither the SearchAttributes or FileName fields 78 * will be valid in the request. ResumeKey has the following format: 79 * 80 * Resume Key Field Description 81 * ---------------------------------- --------------------------------- 82 * 83 * UCHAR Reserved; bit 7 - consumer use 84 * bits 5,6 - system use (must preserve) 85 * bits 0-4 - server use (must preserve) 86 * UCHAR FileName[11]; Name of the returned file 87 * UCHAR ReservedForServer[5]; Client must not modify 88 * byte 0 - uniquely identifies find 89 * through find_close 90 * bytes 1-4 - available for server use 91 * (must be non-zero) 92 * UCHAR ReservedForConsumer[4]; Server must not modify 93 * 94 * FileName is 8.3 format, with the three character extension left 95 * justified into FileName[9-11]. 96 * 97 * There may be multiple matching entries in response to a single request 98 * as wildcards are supported in the last component of FileName of the 99 * initial request. 100 * 101 * Returned directory entries in the DirectoryInformationData field of the 102 * response each have the following format: 103 * 104 * Directory Information Field Description 105 * ---------------------------------- --------------------------------- 106 * 107 * SMB_RESUME_KEY ResumeKey; Described above 108 * UCHAR FileAttributes; Attributes of the found file 109 * SMB_TIME LastWriteTime; Time file was last written 110 * SMB_DATE LastWriteDate; Date file was last written 111 * ULONG FileSize; Size of the file 112 * UCHAR FileName[13]; ASCII, space-filled null terminated 113 * 114 * FileName must conform to 8.3 rules, and is padded after the extension 115 * with 0x20 characters if necessary. 116 * 117 * As can be seen from the above structure, these commands cannot return 118 * long filenames, and cannot return UNICODE filenames. 119 * 120 * Files which have a size greater than 2^32 bytes should have the least 121 * significant 32 bits of their size returned in FileSize. 122 * 123 * smb_com_search 124 * -------------- 125 * 126 * If the client is prior to the LANMAN1.0 dialect, the returned FileName 127 * should be uppercased. 128 * If the client has negotiated a dialect prior to the LANMAN1.0 dialect, 129 * or if bit0 of the Flags2 SMB header field of the request is clear, 130 * the returned FileName should be uppercased. 131 * 132 * SMB_COM_SEARCH terminates when either the requested maximum number of 133 * entries that match the named file are found, or the end of directory is 134 * reached without the maximum number of matches being found. A response 135 * containing no entries indicates that no matching entries were found 136 * between the starting point of the search and the end of directory. 137 * 138 * 139 * The find, find_close and find_unique protocols may be used in place of 140 * the core "search" protocol when LANMAN 1.0 dialect has been negotiated. 141 * 142 * smb_com_find 143 * ------------ 144 * 145 * The find protocol is used to match the find OS/2 system call. 146 * 147 * The format of the find protocol is the same as the core "search" protocol. 148 * The difference is that the directory is logically Opened with a find protocol 149 * and logically closed with the find close protocol. 150 * As is true of a failing open, if a find request (find "first" request where 151 * resume_key is null) fails (no entries are found), no find close protocol is 152 * expected. 153 * 154 * If no global characters are present, a "find unique" protocol should be used 155 * (only one entry is expected and find close need not be sent). 156 * 157 * A find request will terminate when either the requested maximum number of 158 * entries that match the named file are found, or the end of directory is 159 * reached without the maximum number of matches being found. A response 160 * containing no entries indicates that no matching entries were found between 161 * the starting point of the search and the end of directory. 162 * 163 * If a find requests more data than can be placed in a message of the 164 * max-xmit-size for the TID specified, the server will return only the number 165 * of entries which will fit. 166 * 167 * 168 * smb_com_find_close 169 * ------------------ 170 * 171 * The find close protocol is used to match the find close OS/2 system call. 172 * 173 * Whereas the first find protocol logically opens the directory, subsequent 174 * find protocols presenting a resume_key further "read" the directory, the 175 * find close protocol "closes" the directory allowing the server to free any 176 * resources held in support of the directory search. 177 * 178 * In our implementation this translates to closing the odir. 179 * 180 * 181 * smb_com_find_unique 182 * ------------------- 183 * 184 * The format of the find unique protocol is the same as the core "search" 185 * protocol. The difference is that the directory is logically opened, any 186 * matching entries returned, and then the directory is logically closed. 187 * 188 * The resume search key key will be returned as in the find protocol and 189 * search protocol however it may NOT be returned to continue the search. 190 * Only one buffer of entries is expected and find close need not be sent. 191 * 192 * If a find unique requests more data than can be placed in a message of the 193 * max-xmit-size for the TID specified, the server will abort the virtual 194 * circuit to the consumer. 195 */ 196 197 #include <smbsrv/smb_incl.h> 198 199 /* *** smb_com_search *** */ 200 201 smb_sdrc_t 202 smb_pre_search(smb_request_t *sr) 203 { 204 DTRACE_SMB_1(op__Search__start, smb_request_t *, sr); 205 return (SDRC_SUCCESS); 206 } 207 208 void 209 smb_post_search(smb_request_t *sr) 210 { 211 DTRACE_SMB_1(op__Search__done, smb_request_t *, sr); 212 } 213 214 smb_sdrc_t 215 smb_com_search(smb_request_t *sr) 216 { 217 int rc; 218 uint16_t count, maxcount, index; 219 uint16_t sattr, odid; 220 uint16_t key_len; 221 uint32_t client_key; 222 char name[SMB_SHORTNAMELEN]; 223 char *path; 224 unsigned char resume_char; 225 unsigned char type; 226 boolean_t find_first, to_upper; 227 smb_tree_t *tree; 228 smb_odir_t *od; 229 smb_fileinfo_t fileinfo; 230 smb_odir_resume_t odir_resume; 231 boolean_t eos; 232 233 to_upper = B_FALSE; 234 if ((sr->session->dialect <= LANMAN1_0) || 235 ((sr->smb_flg2 & SMB_FLAGS2_KNOWS_LONG_NAMES) == 0)) { 236 to_upper = B_TRUE; 237 } 238 239 /* We only handle 8.3 name here */ 240 sr->smb_flg2 &= ~SMB_FLAGS2_KNOWS_LONG_NAMES; 241 sr->smb_flg &= ~SMB_FLAGS_CASE_INSENSITIVE; 242 243 if (smbsr_decode_vwv(sr, "ww", &maxcount, &sattr) != 0) 244 return (SDRC_ERROR); 245 246 rc = smbsr_decode_data(sr, "%Abw", sr, &path, &type, &key_len); 247 if ((rc != 0) || (type != 0x05)) 248 return (SDRC_ERROR); 249 250 tree = sr->tid_tree; 251 252 /* Volume information only */ 253 if ((sattr == FILE_ATTRIBUTE_VOLUME) && (key_len != 21)) { 254 (void) memset(name, ' ', sizeof (name)); 255 (void) strncpy(name, tree->t_volume, sizeof (name)); 256 257 if (key_len >= 21) { 258 (void) smb_mbc_decodef(&sr->smb_data, "17.l", 259 &client_key); 260 } else { 261 client_key = 0; 262 } 263 264 (void) smb_mbc_encodef(&sr->reply, "bwwbwb11c5.lb8.13c", 265 1, 0, VAR_BCC, 5, 0, 0, path+1, 266 client_key, sattr, name); 267 268 rc = (sr->reply.chain_offset - sr->cur_reply_offset) - 8; 269 (void) smb_mbc_poke(&sr->reply, sr->cur_reply_offset, "bwwbw", 270 1, 1, rc+3, 5, rc); 271 272 return (SDRC_SUCCESS); 273 } 274 275 if ((key_len != 0) && (key_len != 21)) 276 return (SDRC_ERROR); 277 278 find_first = (key_len == 0); 279 resume_char = 0; 280 client_key = 0; 281 282 if (find_first) { 283 /* NT interprets NULL filename as "\" */ 284 if (strlen(path) == 0) 285 path = "\\"; 286 287 odid = smb_odir_open(sr, path, sattr); 288 if (odid == 0) { 289 if (sr->smb_error.status == NT_STATUS_ACCESS_DENIED) 290 smbsr_warn(sr, NT_STATUS_NO_MORE_FILES, 291 ERRDOS, ERROR_NO_MORE_FILES); 292 return (SDRC_ERROR); 293 } 294 } else { 295 if (smb_mbc_decodef(&sr->smb_data, "b12.wwl", 296 &resume_char, &index, &odid, &client_key) != 0) { 297 return (SDRC_ERROR); 298 } 299 } 300 301 od = smb_tree_lookup_odir(sr->tid_tree, odid); 302 if (od == NULL) { 303 smbsr_error(sr, NT_STATUS_INVALID_HANDLE, 304 ERRDOS, ERROR_INVALID_HANDLE); 305 return (SDRC_ERROR); 306 } 307 308 if (!find_first) { 309 odir_resume.or_type = SMB_ODIR_RESUME_IDX; 310 odir_resume.or_idx = index; 311 smb_odir_resume_at(od, &odir_resume); 312 } 313 314 (void) smb_mbc_encodef(&sr->reply, "bwwbw", 1, 0, VAR_BCC, 5, 0); 315 316 rc = 0; 317 index = 0; 318 count = 0; 319 if (maxcount > SMB_MAX_SEARCH) 320 maxcount = SMB_MAX_SEARCH; 321 322 while (count < maxcount) { 323 rc = smb_odir_read_fileinfo(sr, od, &fileinfo, &eos); 324 if ((rc != 0 || (eos == B_TRUE))) 325 break; 326 327 if (smb_is_dot_or_dotdot(fileinfo.fi_name)) 328 continue; 329 330 (void) memset(name, ' ', sizeof (name)); 331 if (*fileinfo.fi_shortname == '\0') { 332 (void) strlcpy(name, fileinfo.fi_name, 333 SMB_SHORTNAMELEN - 1); 334 if (to_upper) 335 (void) utf8_strupr(name); 336 } else { 337 (void) strlcpy(name, fileinfo.fi_shortname, 338 SMB_SHORTNAMELEN - 1); 339 } 340 341 (void) smb_mbc_encodef(&sr->reply, "b8c3c.wwlbYl13c", 342 resume_char, 343 fileinfo.fi_name83, fileinfo.fi_name83+9, 344 index, odid, client_key, 345 fileinfo.fi_dosattr & 0xff, 346 smb_gmt2local(sr, fileinfo.fi_mtime.tv_sec), 347 (int32_t)fileinfo.fi_size, 348 name); 349 350 smb_odir_save_cookie(od, index, fileinfo.fi_cookie); 351 352 count++; 353 index++; 354 } 355 smb_odir_release(od); 356 357 if (rc != 0) { 358 smb_odir_close(od); 359 return (SDRC_ERROR); 360 } 361 362 if (count == 0 && find_first) { 363 smb_odir_close(od); 364 smbsr_warn(sr, NT_STATUS_NO_MORE_FILES, 365 ERRDOS, ERROR_NO_MORE_FILES); 366 return (SDRC_ERROR); 367 } 368 369 rc = (sr->reply.chain_offset - sr->cur_reply_offset) - 8; 370 if (smb_mbc_poke(&sr->reply, sr->cur_reply_offset, "bwwbw", 371 1, count, rc+3, 5, rc) < 0) { 372 smb_odir_close(od); 373 return (SDRC_ERROR); 374 } 375 376 return (SDRC_SUCCESS); 377 } 378 379 380 /* *** smb_com_find *** */ 381 382 smb_sdrc_t 383 smb_pre_find(smb_request_t *sr) 384 { 385 DTRACE_SMB_1(op__Find__start, smb_request_t *, sr); 386 return (SDRC_SUCCESS); 387 } 388 389 void 390 smb_post_find(smb_request_t *sr) 391 { 392 DTRACE_SMB_1(op__Find__done, smb_request_t *, sr); 393 } 394 395 smb_sdrc_t 396 smb_com_find(smb_request_t *sr) 397 { 398 int rc; 399 uint16_t count, maxcount, index; 400 uint16_t sattr, odid; 401 uint16_t key_len; 402 uint32_t client_key; 403 char name[SMB_SHORTNAMELEN]; 404 smb_odir_t *od; 405 smb_fileinfo_t fileinfo; 406 boolean_t eos; 407 408 char *path; 409 unsigned char resume_char; 410 unsigned char type; 411 boolean_t find_first = B_TRUE; 412 smb_odir_resume_t odir_resume; 413 414 if (smbsr_decode_vwv(sr, "ww", &maxcount, &sattr) != 0) 415 return (SDRC_ERROR); 416 417 rc = smbsr_decode_data(sr, "%Abw", sr, &path, &type, &key_len); 418 if ((rc != 0) || (type != 0x05)) 419 return (SDRC_ERROR); 420 421 if ((key_len != 0) && (key_len != 21)) 422 return (SDRC_ERROR); 423 424 find_first = (key_len == 0); 425 resume_char = 0; 426 client_key = 0; 427 428 if (find_first) { 429 odid = smb_odir_open(sr, path, sattr); 430 if (odid == 0) 431 return (SDRC_ERROR); 432 } else { 433 if (smb_mbc_decodef(&sr->smb_data, "b12.wwl", 434 &resume_char, &index, &odid, &client_key) != 0) { 435 return (SDRC_ERROR); 436 } 437 } 438 439 od = smb_tree_lookup_odir(sr->tid_tree, odid); 440 if (od == NULL) { 441 smbsr_error(sr, NT_STATUS_INVALID_HANDLE, 442 ERRDOS, ERROR_INVALID_HANDLE); 443 return (SDRC_ERROR); 444 } 445 446 if (!find_first) { 447 odir_resume.or_type = SMB_ODIR_RESUME_IDX; 448 odir_resume.or_idx = index; 449 smb_odir_resume_at(od, &odir_resume); 450 } 451 452 (void) smb_mbc_encodef(&sr->reply, "bwwbw", 1, 0, VAR_BCC, 5, 0); 453 454 rc = 0; 455 index = 0; 456 count = 0; 457 if (maxcount > SMB_MAX_SEARCH) 458 maxcount = SMB_MAX_SEARCH; 459 460 while (count < maxcount) { 461 rc = smb_odir_read_fileinfo(sr, od, &fileinfo, &eos); 462 if ((rc != 0 || (eos == B_TRUE))) 463 break; 464 465 (void) memset(name, ' ', sizeof (name)); 466 if (*fileinfo.fi_shortname == '\0') { 467 (void) strlcpy(name, fileinfo.fi_name, 468 SMB_SHORTNAMELEN - 1); 469 } else { 470 (void) strlcpy(name, fileinfo.fi_shortname, 471 SMB_SHORTNAMELEN - 1); 472 } 473 474 (void) smb_mbc_encodef(&sr->reply, "b8c3c.wwlbYl13c", 475 resume_char, 476 fileinfo.fi_name83, fileinfo.fi_name83+9, 477 index, odid, client_key, 478 fileinfo.fi_dosattr & 0xff, 479 smb_gmt2local(sr, fileinfo.fi_mtime.tv_sec), 480 (int32_t)fileinfo.fi_size, 481 name); 482 483 smb_odir_save_cookie(od, index, fileinfo.fi_cookie); 484 485 count++; 486 index++; 487 } 488 smb_odir_release(od); 489 490 if (rc != 0) { 491 smb_odir_close(od); 492 return (SDRC_ERROR); 493 } 494 495 if (count == 0 && find_first) { 496 smb_odir_close(od); 497 smbsr_warn(sr, NT_STATUS_NO_MORE_FILES, 498 ERRDOS, ERROR_NO_MORE_FILES); 499 return (SDRC_ERROR); 500 } 501 502 rc = (MBC_LENGTH(&sr->reply) - sr->cur_reply_offset) - 8; 503 if (smb_mbc_poke(&sr->reply, sr->cur_reply_offset, "bwwbw", 504 1, count, rc+3, 5, rc) < 0) { 505 smb_odir_close(od); 506 return (SDRC_ERROR); 507 } 508 509 return (SDRC_SUCCESS); 510 } 511 512 513 /* *** smb_com_find_close *** */ 514 515 smb_sdrc_t 516 smb_pre_find_close(smb_request_t *sr) 517 { 518 DTRACE_SMB_1(op__FindClose__start, smb_request_t *, sr); 519 return (SDRC_SUCCESS); 520 } 521 522 void 523 smb_post_find_close(smb_request_t *sr) 524 { 525 DTRACE_SMB_1(op__FindClose__done, smb_request_t *, sr); 526 } 527 528 smb_sdrc_t 529 smb_com_find_close(smb_request_t *sr) 530 { 531 int rc; 532 uint16_t maxcount, index; 533 uint16_t sattr, odid; 534 uint16_t key_len; 535 uint32_t client_key; 536 char *path; 537 unsigned char resume_char; 538 unsigned char type; 539 smb_odir_t *od; 540 541 if (smbsr_decode_vwv(sr, "ww", &maxcount, &sattr) != 0) 542 return (SDRC_ERROR); 543 544 rc = smbsr_decode_data(sr, "%Abw", sr, &path, &type, &key_len); 545 if ((rc != 0) || (type != 0x05)) 546 return (SDRC_ERROR); 547 548 if (key_len == 0) { 549 smbsr_error(sr, NT_STATUS_INVALID_HANDLE, 550 ERRDOS, ERROR_INVALID_HANDLE); 551 return (SDRC_ERROR); 552 } else if (key_len != 21) { 553 return (SDRC_ERROR); 554 } 555 556 odid = 0; 557 if (smb_mbc_decodef(&sr->smb_data, "b12.wwl", 558 &resume_char, &index, &odid, &client_key) != 0) { 559 return (SDRC_ERROR); 560 } 561 562 od = smb_tree_lookup_odir(sr->tid_tree, odid); 563 if (od == NULL) { 564 smbsr_error(sr, NT_STATUS_INVALID_HANDLE, 565 ERRDOS, ERROR_INVALID_HANDLE); 566 return (SDRC_ERROR); 567 } 568 569 smb_odir_release(od); 570 smb_odir_close(od); 571 572 if (smbsr_encode_result(sr, 1, 3, "bwwbw", 1, 0, 3, 5, 0)) 573 return (SDRC_ERROR); 574 575 return (SDRC_SUCCESS); 576 } 577 578 579 /* *** smb_com_find_unique *** */ 580 581 smb_sdrc_t 582 smb_pre_find_unique(smb_request_t *sr) 583 { 584 DTRACE_SMB_1(op__FindUnique__start, smb_request_t *, sr); 585 return (SDRC_SUCCESS); 586 } 587 588 void 589 smb_post_find_unique(smb_request_t *sr) 590 { 591 DTRACE_SMB_1(op__FindUnique__done, smb_request_t *, sr); 592 } 593 594 smb_sdrc_t 595 smb_com_find_unique(struct smb_request *sr) 596 { 597 int rc; 598 uint16_t count, maxcount, index; 599 uint16_t sattr, odid; 600 char *path; 601 unsigned char resume_char = '\0'; 602 uint32_t client_key = 0; 603 char name[SMB_SHORTNAMELEN]; 604 smb_odir_t *od; 605 smb_fileinfo_t fileinfo; 606 boolean_t eos; 607 struct vardata_block *vdb; 608 609 if (smbsr_decode_vwv(sr, "ww", &maxcount, &sattr) != 0) 610 return (SDRC_ERROR); 611 612 vdb = kmem_alloc(sizeof (struct vardata_block), KM_SLEEP); 613 if ((smbsr_decode_data(sr, "%AV", sr, &path, vdb) != 0) || 614 (vdb->len != 0)) { 615 kmem_free(vdb, sizeof (struct vardata_block)); 616 return (SDRC_ERROR); 617 } 618 kmem_free(vdb, sizeof (struct vardata_block)); 619 620 (void) smb_mbc_encodef(&sr->reply, "bwwbw", 1, 0, VAR_BCC, 5, 0); 621 622 odid = smb_odir_open(sr, path, sattr); 623 if (odid == 0) 624 return (SDRC_ERROR); 625 od = smb_tree_lookup_odir(sr->tid_tree, odid); 626 if (od == NULL) 627 return (SDRC_ERROR); 628 629 rc = 0; 630 count = 0; 631 index = 0; 632 if (maxcount > SMB_MAX_SEARCH) 633 maxcount = SMB_MAX_SEARCH; 634 635 while (count < maxcount) { 636 rc = smb_odir_read_fileinfo(sr, od, &fileinfo, &eos); 637 if ((rc != 0 || (eos == B_TRUE))) 638 break; 639 640 (void) memset(name, ' ', sizeof (name)); 641 if (*fileinfo.fi_shortname == '\0') { 642 (void) strlcpy(name, fileinfo.fi_name, 643 SMB_SHORTNAMELEN - 1); 644 } else { 645 (void) strlcpy(name, fileinfo.fi_shortname, 646 SMB_SHORTNAMELEN - 1); 647 } 648 649 (void) smb_mbc_encodef(&sr->reply, "b8c3c.wwlbYl13c", 650 resume_char, 651 fileinfo.fi_name83, fileinfo.fi_name83+9, 652 index, odid, client_key, 653 fileinfo.fi_dosattr & 0xff, 654 smb_gmt2local(sr, fileinfo.fi_mtime.tv_sec), 655 (int32_t)fileinfo.fi_size, 656 name); 657 658 count++; 659 index++; 660 } 661 662 smb_odir_release(od); 663 smb_odir_close(od); 664 665 if (rc != 0) 666 return (SDRC_ERROR); 667 668 if (count == 0) { 669 smbsr_warn(sr, NT_STATUS_NO_MORE_FILES, 670 ERRDOS, ERROR_NO_MORE_FILES); 671 return (SDRC_ERROR); 672 } 673 674 rc = (MBC_LENGTH(&sr->reply) - sr->cur_reply_offset) - 8; 675 if (smb_mbc_poke(&sr->reply, sr->cur_reply_offset, 676 "bwwbw", 1, count, rc+3, 5, rc) < 0) { 677 return (SDRC_ERROR); 678 } 679 680 return (SDRC_SUCCESS); 681 } 682