Changeset 740 for vendor/current/source3/lib/smbconf
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- Location:
- vendor/current/source3/lib/smbconf
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/lib/smbconf/smbconf_init.c
r414 r740 22 22 #include "lib/smbconf/smbconf_txt.h" 23 23 #include "lib/smbconf/smbconf_reg.h" 24 #include "lib/smbconf/smbconf_init.h" 24 25 25 26 /** … … 34 35 * - "txt" or "file" 35 36 */ 36 WERRORsmbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,37 sbcErr smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, 37 38 const char *source) 38 39 { 39 WERROR werr;40 sbcErr err; 40 41 char *backend = NULL; 41 42 char *path = NULL; … … 44 45 45 46 if (conf_ctx == NULL) { 46 werr = WERR_INVALID_PARAM;47 err = SBC_ERR_INVALID_PARAM; 47 48 goto done; 48 49 } 49 50 50 51 if ((source == NULL) || (*source == '\0')) { 51 werr = WERR_INVALID_PARAM;52 err = SBC_ERR_INVALID_PARAM; 52 53 goto done; 53 54 } … … 55 56 backend = talloc_strdup(tmp_ctx, source); 56 57 if (backend == NULL) { 57 werr = WERR_NOMEM;58 err = SBC_ERR_NOMEM; 58 59 goto done; 59 60 } … … 69 70 70 71 if (strequal(backend, "registry") || strequal(backend, "reg")) { 71 werr = smbconf_init_reg(mem_ctx, conf_ctx, path);72 err = smbconf_init_reg(mem_ctx, conf_ctx, path); 72 73 } else if (strequal(backend, "file") || strequal(backend, "txt")) { 73 werr = smbconf_init_txt(mem_ctx, conf_ctx, path);74 err = smbconf_init_txt(mem_ctx, conf_ctx, path); 74 75 } else if (sep == NULL) { 75 76 /* … … 78 79 * string as a path argument. 79 80 */ 80 werr = smbconf_init_txt(mem_ctx, conf_ctx, backend);81 err = smbconf_init_txt(mem_ctx, conf_ctx, backend); 81 82 } else { 82 83 /* … … 87 88 * 'include = /path/to/file.%T' 88 89 */ 89 werr = smbconf_init_txt(mem_ctx, conf_ctx, source);90 err = smbconf_init_txt(mem_ctx, conf_ctx, source); 90 91 } 91 92 92 93 done: 93 94 talloc_free(tmp_ctx); 94 return werr;95 return err; 95 96 } -
vendor/current/source3/lib/smbconf/smbconf_init.h
r414 r740 27 27 * takes source string in the form of "backend:path" 28 28 */ 29 WERRORsmbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,29 sbcErr smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, 30 30 const char *source); 31 31 -
vendor/current/source3/lib/smbconf/smbconf_reg.c
r414 r740 20 20 #include "includes.h" 21 21 #include "lib/smbconf/smbconf_private.h" 22 #include "registry.h" 23 #include "registry/reg_api.h" 24 #include "registry/reg_backend_db.h" 25 #include "registry/reg_util_token.h" 26 #include "registry/reg_api_util.h" 27 #include "registry/reg_init_smbconf.h" 28 #include "lib/smbconf/smbconf_init.h" 29 #include "lib/smbconf/smbconf_reg.h" 30 #include "../libcli/registry/util_reg.h" 22 31 23 32 #define INCLUDES_VALNAME "includes" … … 75 84 * Open a subkey of the base key (i.e a service) 76 85 */ 77 static WERRORsmbconf_reg_open_service_key(TALLOC_CTX *mem_ctx,86 static sbcErr smbconf_reg_open_service_key(TALLOC_CTX *mem_ctx, 78 87 struct smbconf_ctx *ctx, 79 88 const char *servicename, … … 85 94 if (servicename == NULL) { 86 95 *key = rpd(ctx)->base_key; 87 return WERR_OK;96 return SBC_ERR_OK; 88 97 } 89 98 werr = reg_openkey(mem_ctx, rpd(ctx)->base_key, servicename, 90 99 desired_access, key); 91 92 100 if (W_ERROR_EQUAL(werr, WERR_BADFILE)) { 93 werr = WERR_NO_SUCH_SERVICE; 94 } 95 96 return werr; 101 return SBC_ERR_NO_SUCH_SERVICE; 102 } 103 if (!W_ERROR_IS_OK(werr)) { 104 return SBC_ERR_NOMEM; 105 } 106 107 return SBC_ERR_OK; 97 108 } 98 109 … … 119 130 * create a subkey of the base key (i.e. a service...) 120 131 */ 121 static WERRORsmbconf_reg_create_service_key(TALLOC_CTX *mem_ctx,132 static sbcErr smbconf_reg_create_service_key(TALLOC_CTX *mem_ctx, 122 133 struct smbconf_ctx *ctx, 123 134 const char * subkeyname, 124 135 struct registry_key **newkey) 125 136 { 126 WERROR werr = WERR_OK; 137 WERROR werr; 138 sbcErr err = SBC_ERR_OK; 127 139 TALLOC_CTX *create_ctx; 128 140 enum winreg_CreateAction action = REG_ACTION_NONE; … … 137 149 if (W_ERROR_IS_OK(werr) && (action != REG_CREATED_NEW_KEY)) { 138 150 DEBUG(10, ("Key '%s' already exists.\n", subkeyname)); 139 werr = WERR_FILE_EXISTS;151 err = SBC_ERR_FILE_EXISTS; 140 152 } 141 153 if (!W_ERROR_IS_OK(werr)) { 142 154 DEBUG(5, ("Error creating key %s: %s\n", 143 155 subkeyname, win_errstr(werr))); 156 err = SBC_ERR_UNKNOWN_FAILURE; 144 157 } 145 158 146 159 talloc_free(create_ctx); 147 return werr;160 return err; 148 161 } 149 162 … … 151 164 * add a value to a key. 152 165 */ 153 static WERRORsmbconf_reg_set_value(struct registry_key *key,166 static sbcErr smbconf_reg_set_value(struct registry_key *key, 154 167 const char *valname, 155 168 const char *valstr) … … 157 170 struct registry_value val; 158 171 WERROR werr = WERR_OK; 172 sbcErr err; 159 173 char *subkeyname; 160 174 const char *canon_valname; … … 172 186 "parameter '%s'\n", valstr, valname)); 173 187 } 174 werr = WERR_INVALID_PARAM;188 err = SBC_ERR_INVALID_PARAM; 175 189 goto done; 176 190 } … … 179 193 DEBUG(5, ("Parameter '%s' not allowed in registry.\n", 180 194 canon_valname)); 181 werr = WERR_INVALID_PARAM;195 err = SBC_ERR_INVALID_PARAM; 182 196 goto done; 183 197 } … … 187 201 DEBUG(5, ("Invalid registry key '%s' given as " 188 202 "smbconf section.\n", key->key->name)); 189 werr = WERR_INVALID_PARAM;203 err = SBC_ERR_INVALID_PARAM; 190 204 goto done; 191 205 } … … 197 211 "service definition ('%s').\n", canon_valname, 198 212 subkeyname)); 199 werr = WERR_INVALID_PARAM;213 err = SBC_ERR_INVALID_PARAM; 200 214 goto done; 201 215 } … … 204 218 205 219 val.type = REG_SZ; 206 val.v.sz.str = CONST_DISCARD(char *, canon_valstr); 207 val.v.sz.len = strlen(canon_valstr) + 1; 220 if (!push_reg_sz(talloc_tos(), &val.data, canon_valstr)) { 221 err = SBC_ERR_NOMEM; 222 goto done; 223 } 208 224 209 225 werr = reg_setvalue(key, canon_valname, &val); … … 212 228 "key '%s': %s\n", 213 229 canon_valname, key->key->name, win_errstr(werr))); 214 } 215 216 done: 217 return werr; 218 } 219 220 static WERROR smbconf_reg_set_multi_sz_value(struct registry_key *key, 230 err = SBC_ERR_NOMEM; 231 goto done; 232 } 233 234 err = SBC_ERR_OK; 235 done: 236 return err; 237 } 238 239 static sbcErr smbconf_reg_set_multi_sz_value(struct registry_key *key, 221 240 const char *valname, 222 241 const uint32_t num_strings, … … 224 243 { 225 244 WERROR werr; 245 sbcErr err = SBC_ERR_OK; 226 246 struct registry_value *value; 227 247 uint32_t count; 228 248 TALLOC_CTX *tmp_ctx = talloc_stackframe(); 249 const char **array; 229 250 230 251 if (strings == NULL) { 231 werr = WERR_INVALID_PARAM; 252 err = SBC_ERR_INVALID_PARAM; 253 goto done; 254 } 255 256 array = talloc_zero_array(tmp_ctx, const char *, num_strings + 1); 257 if (array == NULL) { 258 err = SBC_ERR_NOMEM; 232 259 goto done; 233 260 } 234 261 235 262 value = TALLOC_ZERO_P(tmp_ctx, struct registry_value); 263 if (value == NULL) { 264 err = SBC_ERR_NOMEM; 265 goto done; 266 } 236 267 237 268 value->type = REG_MULTI_SZ; 238 value->v.multi_sz.num_strings = num_strings; 239 value->v.multi_sz.strings = TALLOC_ARRAY(tmp_ctx, char *, num_strings); 240 if (value->v.multi_sz.strings == NULL) { 241 werr = WERR_NOMEM; 242 goto done; 243 } 269 244 270 for (count = 0; count < num_strings; count++) { 245 value->v.multi_sz.strings[count] = 246 talloc_strdup(value->v.multi_sz.strings, 247 strings[count]); 248 if (value->v.multi_sz.strings[count] == NULL) { 249 werr = WERR_NOMEM; 250 goto done; 251 } 271 array[count] = talloc_strdup(value, strings[count]); 272 if (array[count] == NULL) { 273 err = SBC_ERR_NOMEM; 274 goto done; 275 } 276 } 277 278 if (!push_reg_multi_sz(value, &value->data, array)) { 279 err = SBC_ERR_NOMEM; 280 goto done; 252 281 } 253 282 … … 256 285 DEBUG(5, ("Error adding value '%s' to key '%s': %s\n", 257 286 valname, key->key->name, win_errstr(werr))); 287 err = SBC_ERR_ACCESS_DENIED; 258 288 } 259 289 260 290 done: 261 291 talloc_free(tmp_ctx); 262 return werr;292 return err; 263 293 } 264 294 … … 282 312 switch (value->type) { 283 313 case REG_DWORD: 284 result = talloc_asprintf(mem_ctx, "%d", value->v.dword); 314 if (value->data.length >= 4) { 315 uint32_t v = IVAL(value->data.data, 0); 316 result = talloc_asprintf(mem_ctx, "%d", v); 317 } 285 318 break; 286 319 case REG_SZ: 287 case REG_EXPAND_SZ: 288 result = talloc_asprintf(mem_ctx, "%s", value->v.sz.str); 320 case REG_EXPAND_SZ: { 321 const char *s; 322 if (!pull_reg_sz(mem_ctx, &value->data, &s)) { 323 break; 324 } 325 result = talloc_strdup(mem_ctx, s); 289 326 break; 327 } 290 328 case REG_MULTI_SZ: { 291 329 uint32 j; 292 for (j = 0; j < value->v.multi_sz.num_strings; j++) { 330 const char **a = NULL; 331 if (!pull_reg_multi_sz(mem_ctx, &value->data, &a)) { 332 break; 333 } 334 for (j = 0; a[j] != NULL; j++) { 293 335 result = talloc_asprintf(mem_ctx, "%s\"%s\" ", 294 336 result ? result : "" , 295 value->v.multi_sz.strings[j]);337 a[j]); 296 338 if (result == NULL) { 297 339 break; … … 302 344 case REG_BINARY: 303 345 result = talloc_asprintf(mem_ctx, "binary (%d bytes)", 304 (int)value-> v.binary.length);346 (int)value->data.length); 305 347 break; 306 348 default: … … 311 353 } 312 354 313 static WERRORsmbconf_reg_get_includes_internal(TALLOC_CTX *mem_ctx,355 static sbcErr smbconf_reg_get_includes_internal(TALLOC_CTX *mem_ctx, 314 356 struct registry_key *key, 315 357 uint32_t *num_includes, … … 317 359 { 318 360 WERROR werr; 361 sbcErr err; 319 362 uint32_t count; 320 363 struct registry_value *value = NULL; 321 364 char **tmp_includes = NULL; 365 const char **array = NULL; 322 366 TALLOC_CTX *tmp_ctx = talloc_stackframe(); 323 367 … … 326 370 *num_includes = 0; 327 371 *includes = NULL; 328 werr = WERR_OK;372 err = SBC_ERR_OK; 329 373 goto done; 330 374 } … … 332 376 werr = reg_queryvalue(tmp_ctx, key, INCLUDES_VALNAME, &value); 333 377 if (!W_ERROR_IS_OK(werr)) { 378 err = SBC_ERR_ACCESS_DENIED; 334 379 goto done; 335 380 } … … 337 382 if (value->type != REG_MULTI_SZ) { 338 383 /* wrong type -- ignore */ 339 goto done; 340 } 341 342 for (count = 0; count < value->v.multi_sz.num_strings; count++) 343 { 344 werr = smbconf_add_string_to_array(tmp_ctx, 384 err = SBC_ERR_OK; 385 goto done; 386 } 387 388 if (!pull_reg_multi_sz(tmp_ctx, &value->data, &array)) { 389 err = SBC_ERR_NOMEM; 390 goto done; 391 } 392 393 for (count = 0; array[count] != NULL; count++) { 394 err = smbconf_add_string_to_array(tmp_ctx, 345 395 &tmp_includes, 346 396 count, 347 value->v.multi_sz.strings[count]);348 if (! W_ERROR_IS_OK(werr)) {397 array[count]); 398 if (!SBC_ERROR_IS_OK(err)) { 349 399 goto done; 350 400 } … … 354 404 *includes = talloc_move(mem_ctx, &tmp_includes); 355 405 if (*includes == NULL) { 356 werr = WERR_NOMEM;406 err = SBC_ERR_NOMEM; 357 407 goto done; 358 408 } … … 363 413 } 364 414 415 err = SBC_ERR_OK; 365 416 done: 366 417 talloc_free(tmp_ctx); 367 return werr;418 return err; 368 419 } 369 420 … … 372 423 * and a list of value strings (ordered) 373 424 */ 374 static WERRORsmbconf_reg_get_values(TALLOC_CTX *mem_ctx,425 static sbcErr smbconf_reg_get_values(TALLOC_CTX *mem_ctx, 375 426 struct registry_key *key, 376 427 uint32_t *num_values, … … 380 431 TALLOC_CTX *tmp_ctx = NULL; 381 432 WERROR werr = WERR_OK; 433 sbcErr err; 382 434 uint32_t count; 383 435 struct registry_value *valvalue = NULL; … … 392 444 (value_strings == NULL)) 393 445 { 394 werr = WERR_INVALID_PARAM;446 err = SBC_ERR_INVALID_PARAM; 395 447 goto done; 396 448 } … … 409 461 } 410 462 411 werr = smbconf_add_string_to_array(tmp_ctx,412 413 414 if (! W_ERROR_IS_OK(werr)) {463 err = smbconf_add_string_to_array(tmp_ctx, 464 &tmp_valnames, 465 tmp_num_values, valname); 466 if (!SBC_ERROR_IS_OK(err)) { 415 467 goto done; 416 468 } 417 469 418 470 valstring = smbconf_format_registry_value(tmp_ctx, valvalue); 419 werr = smbconf_add_string_to_array(tmp_ctx, &tmp_valstrings,420 421 if (! W_ERROR_IS_OK(werr)) {471 err = smbconf_add_string_to_array(tmp_ctx, &tmp_valstrings, 472 tmp_num_values, valstring); 473 if (!SBC_ERROR_IS_OK(err)) { 422 474 goto done; 423 475 } … … 425 477 } 426 478 if (!W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, werr)) { 479 err = SBC_ERR_NOMEM; 427 480 goto done; 428 481 } 429 482 430 483 /* now add the includes at the end */ 431 werr = smbconf_reg_get_includes_internal(tmp_ctx, key, &num_includes,484 err = smbconf_reg_get_includes_internal(tmp_ctx, key, &num_includes, 432 485 &includes); 433 if (!W_ERROR_IS_OK(werr)) { 434 goto done; 435 } 486 if (!SBC_ERROR_IS_OK(err)) { 487 goto done; 488 } 489 436 490 for (count = 0; count < num_includes; count++) { 437 werr = smbconf_add_string_to_array(tmp_ctx, &tmp_valnames,438 439 if (! W_ERROR_IS_OK(werr)) {440 goto done; 441 } 442 443 werr = smbconf_add_string_to_array(tmp_ctx, &tmp_valstrings,444 445 446 if (! W_ERROR_IS_OK(werr)) {491 err = smbconf_add_string_to_array(tmp_ctx, &tmp_valnames, 492 tmp_num_values, "include"); 493 if (!SBC_ERROR_IS_OK(err)) { 494 goto done; 495 } 496 497 err = smbconf_add_string_to_array(tmp_ctx, &tmp_valstrings, 498 tmp_num_values, 499 includes[count]); 500 if (!SBC_ERROR_IS_OK(err)) { 447 501 goto done; 448 502 } … … 462 516 done: 463 517 talloc_free(tmp_ctx); 464 return werr;518 return err; 465 519 } 466 520 … … 491 545 * delete all values from a key 492 546 */ 493 static WERROR smbconf_reg_delete_values(struct registry_key *key) 494 { 495 WERROR werr; 547 static sbcErr smbconf_reg_delete_values(struct registry_key *key) 548 { 549 WERROR werr; 550 sbcErr err; 496 551 char *valname; 497 552 struct registry_value *valvalue; … … 506 561 werr = reg_deletevalue(key, valname); 507 562 if (!W_ERROR_IS_OK(werr)) { 563 err = SBC_ERR_ACCESS_DENIED; 508 564 goto done; 509 565 } … … 514 570 key->key->name, 515 571 win_errstr(werr))); 516 goto done; 517 } 518 519 werr = WERR_OK; 572 err = SBC_ERR_ACCESS_DENIED; 573 goto done; 574 } 575 576 err = SBC_ERR_OK; 520 577 521 578 done: 522 579 talloc_free(mem_ctx); 523 return werr;580 return err; 524 581 } 525 582 … … 533 590 * initialize the registry smbconf backend 534 591 */ 535 static WERRORsmbconf_reg_init(struct smbconf_ctx *ctx, const char *path)592 static sbcErr smbconf_reg_init(struct smbconf_ctx *ctx, const char *path) 536 593 { 537 594 WERROR werr = WERR_OK; 538 struct nt_user_token *token; 595 sbcErr err; 596 struct security_token *token; 539 597 540 598 if (path == NULL) { … … 543 601 ctx->path = talloc_strdup(ctx, path); 544 602 if (ctx->path == NULL) { 545 werr = WERR_NOMEM;603 err = SBC_ERR_NOMEM; 546 604 goto done; 547 605 } … … 552 610 if (!W_ERROR_IS_OK(werr)) { 553 611 DEBUG(1, ("Error creating admin token\n")); 612 err = SBC_ERR_UNKNOWN_FAILURE; 554 613 goto done; 555 614 } … … 558 617 werr = registry_init_smbconf(path); 559 618 if (!W_ERROR_IS_OK(werr)) { 560 goto done; 561 } 562 563 werr = ctx->ops->open_conf(ctx); 564 if (!W_ERROR_IS_OK(werr)) { 619 err = SBC_ERR_BADFILE; 620 goto done; 621 } 622 623 err = ctx->ops->open_conf(ctx); 624 if (!SBC_ERROR_IS_OK(err)) { 565 625 DEBUG(1, ("Error opening the registry.\n")); 566 626 goto done; … … 571 631 token, &rpd(ctx)->base_key); 572 632 if (!W_ERROR_IS_OK(werr)) { 573 goto done; 574 } 575 576 done: 577 return werr; 633 err = SBC_ERR_UNKNOWN_FAILURE; 634 goto done; 635 } 636 637 done: 638 return err; 578 639 } 579 640 … … 604 665 } 605 666 606 static WERRORsmbconf_reg_open(struct smbconf_ctx *ctx)667 static sbcErr smbconf_reg_open(struct smbconf_ctx *ctx) 607 668 { 608 669 WERROR werr; 609 670 610 671 if (rpd(ctx)->open) { 611 return WERR_OK;672 return SBC_ERR_OK; 612 673 } 613 674 614 675 werr = regdb_open(); 615 if (W_ERROR_IS_OK(werr)) { 616 rpd(ctx)->open = true; 617 } 618 return werr; 676 if (!W_ERROR_IS_OK(werr)) { 677 return SBC_ERR_BADFILE; 678 } 679 680 rpd(ctx)->open = true; 681 return SBC_ERR_OK; 619 682 } 620 683 … … 646 709 } 647 710 648 if (! W_ERROR_IS_OK(ctx->ops->open_conf(ctx))) {711 if (!SBC_ERROR_IS_OK(ctx->ops->open_conf(ctx))) { 649 712 return; 650 713 } … … 656 719 * Drop the whole configuration (restarting empty) - registry version 657 720 */ 658 static WERRORsmbconf_reg_drop(struct smbconf_ctx *ctx)721 static sbcErr smbconf_reg_drop(struct smbconf_ctx *ctx) 659 722 { 660 723 char *path, *p; 661 724 WERROR werr = WERR_OK; 725 sbcErr err = SBC_ERR_OK; 662 726 struct registry_key *parent_key = NULL; 663 727 struct registry_key *new_key = NULL; 664 728 TALLOC_CTX* mem_ctx = talloc_stackframe(); 665 729 enum winreg_CreateAction action; 666 struct nt_user_token *token;730 struct security_token *token; 667 731 668 732 werr = ntstatus_to_werror(registry_create_admin_token(ctx, &token)); 669 733 if (!W_ERROR_IS_OK(werr)) { 670 734 DEBUG(1, ("Error creating admin token\n")); 735 err = SBC_ERR_UNKNOWN_FAILURE; 671 736 goto done; 672 737 } … … 674 739 path = talloc_strdup(mem_ctx, ctx->path); 675 740 if (path == NULL) { 676 werr = WERR_NOMEM;741 err = SBC_ERR_NOMEM; 677 742 goto done; 678 743 } 679 744 p = strrchr(path, '\\'); 745 if (p == NULL) { 746 err = SBC_ERR_INVALID_PARAM; 747 goto done; 748 } 680 749 *p = '\0'; 681 750 werr = reg_open_path(mem_ctx, path, REG_KEY_WRITE, token, 682 751 &parent_key); 683 684 if (!W_ERROR_IS_OK(werr)) {685 goto done; 686 } 687 688 werr = reg_deletekey_recursive( mem_ctx,parent_key, p+1);689 690 if (!W_ERROR_IS_OK(werr)) {752 if (!W_ERROR_IS_OK(werr)) { 753 err = SBC_ERR_IO_FAILURE; 754 goto done; 755 } 756 757 werr = reg_deletekey_recursive(parent_key, p+1); 758 if (!W_ERROR_IS_OK(werr)) { 759 err = SBC_ERR_IO_FAILURE; 691 760 goto done; 692 761 } … … 694 763 werr = reg_createkey(mem_ctx, parent_key, p+1, REG_KEY_WRITE, 695 764 &new_key, &action); 765 if (!W_ERROR_IS_OK(werr)) { 766 err = SBC_ERR_IO_FAILURE; 767 goto done; 768 } 696 769 697 770 done: 698 771 talloc_free(mem_ctx); 699 return werr;772 return err; 700 773 } 701 774 … … 704 777 * registry version. 705 778 */ 706 static WERRORsmbconf_reg_get_share_names(struct smbconf_ctx *ctx,779 static sbcErr smbconf_reg_get_share_names(struct smbconf_ctx *ctx, 707 780 TALLOC_CTX *mem_ctx, 708 781 uint32_t *num_shares, … … 712 785 uint32_t added_count = 0; 713 786 TALLOC_CTX *tmp_ctx = NULL; 714 WERROR werr = WERR_OK; 787 WERROR werr; 788 sbcErr err = SBC_ERR_OK; 715 789 char *subkey_name = NULL; 716 790 char **tmp_share_names = NULL; 717 791 718 792 if ((num_shares == NULL) || (share_names == NULL)) { 719 werr = WERR_INVALID_PARAM; 720 goto done; 793 return SBC_ERR_INVALID_PARAM; 721 794 } 722 795 … … 726 799 727 800 if (smbconf_reg_key_has_values(rpd(ctx)->base_key)) { 728 werr = smbconf_add_string_to_array(tmp_ctx, &tmp_share_names,801 err = smbconf_add_string_to_array(tmp_ctx, &tmp_share_names, 729 802 0, NULL); 730 if (! W_ERROR_IS_OK(werr)) {803 if (!SBC_ERROR_IS_OK(err)) { 731 804 goto done; 732 805 } … … 736 809 /* make sure "global" is always listed first */ 737 810 if (smbconf_share_exists(ctx, GLOBAL_NAME)) { 738 werr = smbconf_add_string_to_array(tmp_ctx, &tmp_share_names,739 740 if (! W_ERROR_IS_OK(werr)) {811 err = smbconf_add_string_to_array(tmp_ctx, &tmp_share_names, 812 added_count, GLOBAL_NAME); 813 if (!SBC_ERROR_IS_OK(err)) { 741 814 goto done; 742 815 } … … 754 827 } 755 828 756 werr = smbconf_add_string_to_array(tmp_ctx,829 err = smbconf_add_string_to_array(tmp_ctx, 757 830 &tmp_share_names, 758 831 added_count, 759 832 subkey_name); 760 if (! W_ERROR_IS_OK(werr)) {833 if (!SBC_ERROR_IS_OK(err)) { 761 834 goto done; 762 835 } … … 764 837 } 765 838 if (!W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, werr)) { 766 goto done; 767 } 768 werr = WERR_OK; 839 err = SBC_ERR_NO_MORE_ITEMS; 840 goto done; 841 } 842 err = SBC_ERR_OK; 769 843 770 844 *num_shares = added_count; … … 777 851 done: 778 852 talloc_free(tmp_ctx); 779 return werr;853 return err; 780 854 } 781 855 … … 787 861 { 788 862 bool ret = false; 789 WERROR werr = WERR_OK;863 sbcErr err; 790 864 TALLOC_CTX *mem_ctx = talloc_stackframe(); 791 865 struct registry_key *key = NULL; 792 866 793 werr = smbconf_reg_open_service_key(mem_ctx, ctx, servicename,794 795 if ( W_ERROR_IS_OK(werr)) {867 err = smbconf_reg_open_service_key(mem_ctx, ctx, servicename, 868 REG_KEY_READ, &key); 869 if (SBC_ERROR_IS_OK(err)) { 796 870 ret = true; 797 871 } … … 804 878 * Add a service if it does not already exist - registry version 805 879 */ 806 static WERRORsmbconf_reg_create_share(struct smbconf_ctx *ctx,880 static sbcErr smbconf_reg_create_share(struct smbconf_ctx *ctx, 807 881 const char *servicename) 808 882 { 809 WERROR werr;883 sbcErr err; 810 884 struct registry_key *key = NULL; 811 885 812 886 if (servicename == NULL) { 813 return WERR_OK;814 } 815 816 werr = smbconf_reg_create_service_key(talloc_tos(), ctx,817 887 return SBC_ERR_OK; 888 } 889 890 err = smbconf_reg_create_service_key(talloc_tos(), ctx, 891 servicename, &key); 818 892 819 893 talloc_free(key); 820 return werr;894 return err; 821 895 } 822 896 … … 824 898 * get a definition of a share (service) from configuration. 825 899 */ 826 static WERRORsmbconf_reg_get_share(struct smbconf_ctx *ctx,900 static sbcErr smbconf_reg_get_share(struct smbconf_ctx *ctx, 827 901 TALLOC_CTX *mem_ctx, 828 902 const char *servicename, 829 903 struct smbconf_service **service) 830 904 { 831 WERROR werr = WERR_OK;905 sbcErr err; 832 906 struct registry_key *key = NULL; 833 907 struct smbconf_service *tmp_service = NULL; 834 908 TALLOC_CTX *tmp_ctx = talloc_stackframe(); 835 909 836 werr = smbconf_reg_open_service_key(tmp_ctx, ctx, servicename,837 838 if (! W_ERROR_IS_OK(werr)) {910 err = smbconf_reg_open_service_key(tmp_ctx, ctx, servicename, 911 REG_KEY_READ, &key); 912 if (!SBC_ERROR_IS_OK(err)) { 839 913 goto done; 840 914 } … … 842 916 tmp_service = TALLOC_ZERO_P(tmp_ctx, struct smbconf_service); 843 917 if (tmp_service == NULL) { 844 werr = WERR_NOMEM;918 err = SBC_ERR_NOMEM; 845 919 goto done; 846 920 } … … 849 923 tmp_service->name = talloc_strdup(tmp_service, servicename); 850 924 if (tmp_service->name == NULL) { 851 werr = WERR_NOMEM; 852 goto done; 853 } 854 } 855 856 werr = smbconf_reg_get_values(tmp_service, key, 857 &(tmp_service->num_params), 858 &(tmp_service->param_names), 859 &(tmp_service->param_values)); 860 861 if (W_ERROR_IS_OK(werr)) { 925 err = SBC_ERR_NOMEM; 926 goto done; 927 } 928 } 929 930 err = smbconf_reg_get_values(tmp_service, key, 931 &(tmp_service->num_params), 932 &(tmp_service->param_names), 933 &(tmp_service->param_values)); 934 if (SBC_ERROR_IS_OK(err)) { 862 935 *service = talloc_move(mem_ctx, &tmp_service); 863 936 } … … 865 938 done: 866 939 talloc_free(tmp_ctx); 867 return werr;940 return err; 868 941 } 869 942 … … 871 944 * delete a service from configuration 872 945 */ 873 static WERRORsmbconf_reg_delete_share(struct smbconf_ctx *ctx,946 static sbcErr smbconf_reg_delete_share(struct smbconf_ctx *ctx, 874 947 const char *servicename) 875 948 { 876 WERROR werr = WERR_OK; 949 WERROR werr; 950 sbcErr err = SBC_ERR_OK; 877 951 TALLOC_CTX *mem_ctx = talloc_stackframe(); 878 952 879 953 if (servicename != NULL) { 880 werr = reg_deletekey_recursive(mem_ctx, rpd(ctx)->base_key, 881 servicename); 954 werr = reg_deletekey_recursive(rpd(ctx)->base_key, servicename); 955 if (!W_ERROR_IS_OK(werr)) { 956 err = SBC_ERR_ACCESS_DENIED; 957 } 882 958 } else { 883 werr = smbconf_reg_delete_values(rpd(ctx)->base_key);959 err = smbconf_reg_delete_values(rpd(ctx)->base_key); 884 960 } 885 961 886 962 talloc_free(mem_ctx); 887 return werr;963 return err; 888 964 } 889 965 … … 891 967 * set a configuration parameter to the value provided. 892 968 */ 893 static WERRORsmbconf_reg_set_parameter(struct smbconf_ctx *ctx,969 static sbcErr smbconf_reg_set_parameter(struct smbconf_ctx *ctx, 894 970 const char *service, 895 971 const char *param, 896 972 const char *valstr) 897 973 { 898 WERROR werr;974 sbcErr err; 899 975 struct registry_key *key = NULL; 900 976 TALLOC_CTX *mem_ctx = talloc_stackframe(); 901 977 902 werr = smbconf_reg_open_service_key(mem_ctx, ctx, service,903 904 if (! W_ERROR_IS_OK(werr)) {905 goto done; 906 } 907 908 werr = smbconf_reg_set_value(key, param, valstr);978 err = smbconf_reg_open_service_key(mem_ctx, ctx, service, 979 REG_KEY_WRITE, &key); 980 if (!SBC_ERROR_IS_OK(err)) { 981 goto done; 982 } 983 984 err = smbconf_reg_set_value(key, param, valstr); 909 985 910 986 done: 911 987 talloc_free(mem_ctx); 912 return werr;988 return err; 913 989 } 914 990 … … 916 992 * get the value of a configuration parameter as a string 917 993 */ 918 static WERRORsmbconf_reg_get_parameter(struct smbconf_ctx *ctx,994 static sbcErr smbconf_reg_get_parameter(struct smbconf_ctx *ctx, 919 995 TALLOC_CTX *mem_ctx, 920 996 const char *service, … … 923 999 { 924 1000 WERROR werr = WERR_OK; 1001 sbcErr err; 925 1002 struct registry_key *key = NULL; 926 1003 struct registry_value *value = NULL; 927 1004 928 werr = smbconf_reg_open_service_key(mem_ctx, ctx, service,929 930 if (! W_ERROR_IS_OK(werr)) {1005 err = smbconf_reg_open_service_key(mem_ctx, ctx, service, 1006 REG_KEY_READ, &key); 1007 if (!SBC_ERROR_IS_OK(err)) { 931 1008 goto done; 932 1009 } 933 1010 934 1011 if (!smbconf_reg_valname_valid(param)) { 935 werr = WERR_INVALID_PARAM;1012 err = SBC_ERR_INVALID_PARAM; 936 1013 goto done; 937 1014 } 938 1015 939 1016 if (!smbconf_value_exists(key, param)) { 940 werr = WERR_INVALID_PARAM;1017 err = SBC_ERR_INVALID_PARAM; 941 1018 goto done; 942 1019 } … … 944 1021 werr = reg_queryvalue(mem_ctx, key, param, &value); 945 1022 if (!W_ERROR_IS_OK(werr)) { 1023 err = SBC_ERR_NOMEM; 946 1024 goto done; 947 1025 } 948 1026 949 1027 *valstr = smbconf_format_registry_value(mem_ctx, value); 950 951 1028 if (*valstr == NULL) { 952 werr = WERR_NOMEM;1029 err = SBC_ERR_NOMEM; 953 1030 } 954 1031 … … 956 1033 talloc_free(key); 957 1034 talloc_free(value); 958 return werr;1035 return err; 959 1036 } 960 1037 … … 962 1039 * delete a parameter from configuration 963 1040 */ 964 static WERRORsmbconf_reg_delete_parameter(struct smbconf_ctx *ctx,1041 static sbcErr smbconf_reg_delete_parameter(struct smbconf_ctx *ctx, 965 1042 const char *service, 966 1043 const char *param) 967 1044 { 968 1045 struct registry_key *key = NULL; 969 WERROR werr = WERR_OK; 1046 WERROR werr; 1047 sbcErr err; 970 1048 TALLOC_CTX *mem_ctx = talloc_stackframe(); 971 1049 972 werr = smbconf_reg_open_service_key(mem_ctx, ctx, service,973 974 if (! W_ERROR_IS_OK(werr)) {1050 err = smbconf_reg_open_service_key(mem_ctx, ctx, service, 1051 REG_KEY_ALL, &key); 1052 if (!SBC_ERROR_IS_OK(err)) { 975 1053 goto done; 976 1054 } 977 1055 978 1056 if (!smbconf_reg_valname_valid(param)) { 979 werr = WERR_INVALID_PARAM;1057 err = SBC_ERR_INVALID_PARAM; 980 1058 goto done; 981 1059 } 982 1060 983 1061 if (!smbconf_value_exists(key, param)) { 984 werr = WERR_INVALID_PARAM;1062 err = SBC_ERR_OK; 985 1063 goto done; 986 1064 } 987 1065 988 1066 werr = reg_deletevalue(key, param); 1067 if (!W_ERROR_IS_OK(werr)) { 1068 err = SBC_ERR_ACCESS_DENIED; 1069 } 989 1070 990 1071 done: 991 1072 talloc_free(mem_ctx); 992 return werr;993 } 994 995 static WERRORsmbconf_reg_get_includes(struct smbconf_ctx *ctx,1073 return err; 1074 } 1075 1076 static sbcErr smbconf_reg_get_includes(struct smbconf_ctx *ctx, 996 1077 TALLOC_CTX *mem_ctx, 997 1078 const char *service, … … 999 1080 char ***includes) 1000 1081 { 1001 WERROR werr;1082 sbcErr err; 1002 1083 struct registry_key *key = NULL; 1003 1084 TALLOC_CTX *tmp_ctx = talloc_stackframe(); 1004 1085 1005 werr = smbconf_reg_open_service_key(tmp_ctx, ctx, service,1006 1007 if (! W_ERROR_IS_OK(werr)) {1008 goto done; 1009 } 1010 1011 werr = smbconf_reg_get_includes_internal(mem_ctx, key, num_includes,1086 err = smbconf_reg_open_service_key(tmp_ctx, ctx, service, 1087 REG_KEY_READ, &key); 1088 if (!SBC_ERROR_IS_OK(err)) { 1089 goto done; 1090 } 1091 1092 err = smbconf_reg_get_includes_internal(mem_ctx, key, num_includes, 1012 1093 includes); 1094 if (!SBC_ERROR_IS_OK(err)) { 1095 goto done; 1096 } 1013 1097 1014 1098 done: 1015 1099 talloc_free(tmp_ctx); 1016 return werr;1017 } 1018 1019 static WERRORsmbconf_reg_set_includes(struct smbconf_ctx *ctx,1100 return err; 1101 } 1102 1103 static sbcErr smbconf_reg_set_includes(struct smbconf_ctx *ctx, 1020 1104 const char *service, 1021 1105 uint32_t num_includes, … … 1023 1107 { 1024 1108 WERROR werr = WERR_OK; 1109 sbcErr err; 1025 1110 struct registry_key *key = NULL; 1026 1111 TALLOC_CTX *tmp_ctx = talloc_stackframe(); 1027 1112 1028 werr = smbconf_reg_open_service_key(tmp_ctx, ctx, service,1029 1030 if (! W_ERROR_IS_OK(werr)) {1113 err = smbconf_reg_open_service_key(tmp_ctx, ctx, service, 1114 REG_KEY_ALL, &key); 1115 if (!SBC_ERROR_IS_OK(err)) { 1031 1116 goto done; 1032 1117 } … … 1034 1119 if (num_includes == 0) { 1035 1120 if (!smbconf_value_exists(key, INCLUDES_VALNAME)) { 1121 err = SBC_ERR_OK; 1036 1122 goto done; 1037 1123 } 1038 1124 werr = reg_deletevalue(key, INCLUDES_VALNAME); 1125 if (!W_ERROR_IS_OK(werr)) { 1126 err = SBC_ERR_ACCESS_DENIED; 1127 goto done; 1128 } 1039 1129 } else { 1040 werr = smbconf_reg_set_multi_sz_value(key, INCLUDES_VALNAME,1130 err = smbconf_reg_set_multi_sz_value(key, INCLUDES_VALNAME, 1041 1131 num_includes, includes); 1042 1132 } … … 1044 1134 done: 1045 1135 talloc_free(tmp_ctx); 1046 return werr;1047 } 1048 1049 static WERRORsmbconf_reg_delete_includes(struct smbconf_ctx *ctx,1136 return err; 1137 } 1138 1139 static sbcErr smbconf_reg_delete_includes(struct smbconf_ctx *ctx, 1050 1140 const char *service) 1051 1141 { 1052 WERROR werr = WERR_OK; 1142 WERROR werr; 1143 sbcErr err; 1053 1144 struct registry_key *key = NULL; 1054 1145 TALLOC_CTX *tmp_ctx = talloc_stackframe(); 1055 1146 1056 werr = smbconf_reg_open_service_key(tmp_ctx, ctx, service,1057 1058 if (! W_ERROR_IS_OK(werr)) {1147 err = smbconf_reg_open_service_key(tmp_ctx, ctx, service, 1148 REG_KEY_ALL, &key); 1149 if (!SBC_ERROR_IS_OK(err)) { 1059 1150 goto done; 1060 1151 } 1061 1152 1062 1153 if (!smbconf_value_exists(key, INCLUDES_VALNAME)) { 1154 err = SBC_ERR_OK; 1063 1155 goto done; 1064 1156 } 1065 1157 1066 1158 werr = reg_deletevalue(key, INCLUDES_VALNAME); 1067 1068 1159 if (!W_ERROR_IS_OK(werr)) { 1160 err = SBC_ERR_ACCESS_DENIED; 1161 goto done; 1162 } 1163 1164 err = SBC_ERR_OK; 1069 1165 done: 1070 1166 talloc_free(tmp_ctx); 1071 return werr; 1072 } 1073 1074 static WERROR smbconf_reg_transaction_start(struct smbconf_ctx *ctx) 1075 { 1076 return regdb_transaction_start(); 1077 } 1078 1079 static WERROR smbconf_reg_transaction_commit(struct smbconf_ctx *ctx) 1080 { 1081 return regdb_transaction_commit(); 1082 } 1083 1084 static WERROR smbconf_reg_transaction_cancel(struct smbconf_ctx *ctx) 1085 { 1086 return regdb_transaction_cancel(); 1167 return err; 1168 } 1169 1170 static sbcErr smbconf_reg_transaction_start(struct smbconf_ctx *ctx) 1171 { 1172 WERROR werr; 1173 1174 werr = regdb_transaction_start(); 1175 if (!W_ERROR_IS_OK(werr)) { 1176 return SBC_ERR_IO_FAILURE; 1177 } 1178 1179 return SBC_ERR_OK; 1180 } 1181 1182 static sbcErr smbconf_reg_transaction_commit(struct smbconf_ctx *ctx) 1183 { 1184 WERROR werr; 1185 1186 werr = regdb_transaction_commit(); 1187 if (!W_ERROR_IS_OK(werr)) { 1188 return SBC_ERR_IO_FAILURE; 1189 } 1190 1191 return SBC_ERR_OK; 1192 } 1193 1194 static sbcErr smbconf_reg_transaction_cancel(struct smbconf_ctx *ctx) 1195 { 1196 WERROR werr; 1197 1198 werr = regdb_transaction_cancel(); 1199 if (!W_ERROR_IS_OK(werr)) { 1200 return SBC_ERR_IO_FAILURE; 1201 } 1202 1203 return SBC_ERR_OK; 1087 1204 } 1088 1205 … … 1117 1234 * the only function that is exported from this module 1118 1235 */ 1119 WERRORsmbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,1236 sbcErr smbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, 1120 1237 const char *path) 1121 1238 { -
vendor/current/source3/lib/smbconf/smbconf_reg.h
r414 r740 27 27 */ 28 28 29 WERRORsmbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,29 sbcErr smbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, 30 30 const char *path); 31 31 -
vendor/current/source3/lib/smbconf/testsuite.c
r414 r740 19 19 20 20 #include "includes.h" 21 #include "popt_common.h" 22 #include "lib/smbconf/smbconf.h" 23 #include "lib/smbconf/smbconf_init.h" 24 #include "lib/smbconf/smbconf_reg.h" 25 #include "lib/smbconf/smbconf_txt.h" 21 26 22 27 static void print_strings(const char *prefix, … … 36 41 static bool test_get_includes(struct smbconf_ctx *ctx) 37 42 { 38 WERROR werr;43 sbcErr err; 39 44 bool ret = false; 40 45 uint32_t num_includes = 0; … … 43 48 44 49 printf("TEST: get_includes\n"); 45 werr = smbconf_get_global_includes(ctx, mem_ctx,46 47 if (! W_ERROR_IS_OK(werr)) {48 printf("FAIL: get_includes - %s\n", win_errstr(werr));50 err = smbconf_get_global_includes(ctx, mem_ctx, 51 &num_includes, &includes); 52 if (!SBC_ERROR_IS_OK(err)) { 53 printf("FAIL: get_includes - %s\n", sbcErrorString(err)); 49 54 goto done; 50 55 } … … 64 69 static bool test_set_get_includes(struct smbconf_ctx *ctx) 65 70 { 66 WERROR werr;71 sbcErr err; 67 72 uint32_t count; 68 73 bool ret = false; … … 78 83 printf("TEST: set_get_includes\n"); 79 84 80 werr = smbconf_set_global_includes(ctx, set_num_includes, set_includes);81 if (! W_ERROR_IS_OK(werr)) {85 err = smbconf_set_global_includes(ctx, set_num_includes, set_includes); 86 if (!SBC_ERROR_IS_OK(err)) { 82 87 printf("FAIL: get_set_includes (setting includes) - %s\n", 83 win_errstr(werr));84 goto done; 85 } 86 87 werr = smbconf_get_global_includes(ctx, mem_ctx, &get_num_includes,88 89 if (! W_ERROR_IS_OK(werr)) {88 sbcErrorString(err)); 89 goto done; 90 } 91 92 err = smbconf_get_global_includes(ctx, mem_ctx, &get_num_includes, 93 &get_includes); 94 if (!SBC_ERROR_IS_OK(err)) { 90 95 printf("FAIL: get_set_includes (getting includes) - %s\n", 91 win_errstr(werr));96 sbcErrorString(err)); 92 97 goto done; 93 98 } … … 121 126 static bool test_delete_includes(struct smbconf_ctx *ctx) 122 127 { 123 WERROR werr;128 sbcErr err; 124 129 bool ret = false; 125 130 const char *set_includes[] = { … … 133 138 printf("TEST: delete_includes\n"); 134 139 135 werr = smbconf_set_global_includes(ctx, set_num_includes, set_includes);136 if (! W_ERROR_IS_OK(werr)) {140 err = smbconf_set_global_includes(ctx, set_num_includes, set_includes); 141 if (!SBC_ERROR_IS_OK(err)) { 137 142 printf("FAIL: delete_includes (setting includes) - %s\n", 138 win_errstr(werr));139 goto done; 140 } 141 142 werr = smbconf_delete_global_includes(ctx);143 if (! W_ERROR_IS_OK(werr)) {143 sbcErrorString(err)); 144 goto done; 145 } 146 147 err = smbconf_delete_global_includes(ctx); 148 if (!SBC_ERROR_IS_OK(err)) { 144 149 printf("FAIL: delete_includes (deleting includes) - %s\n", 145 win_errstr(werr));146 goto done; 147 } 148 149 werr = smbconf_get_global_includes(ctx, mem_ctx, &get_num_includes,150 151 if (! W_ERROR_IS_OK(werr)) {150 sbcErrorString(err)); 151 goto done; 152 } 153 154 err = smbconf_get_global_includes(ctx, mem_ctx, &get_num_includes, 155 &get_includes); 156 if (!SBC_ERROR_IS_OK(err)) { 152 157 printf("FAIL: delete_includes (getting includes) - %s\n", 153 win_errstr(werr));158 sbcErrorString(err)); 154 159 goto done; 155 160 } … … 160 165 } 161 166 162 werr = smbconf_delete_global_includes(ctx);163 if (! W_ERROR_IS_OK(werr)) {167 err = smbconf_delete_global_includes(ctx); 168 if (!SBC_ERROR_IS_OK(err)) { 164 169 printf("FAIL: delete_includes (delete empty includes) - " 165 "%s\n", win_errstr(werr));170 "%s\n", sbcErrorString(err)); 166 171 goto done; 167 172 } … … 199 204 static bool torture_smbconf_txt(void) 200 205 { 201 WERROR werr;206 sbcErr err; 202 207 bool ret = true; 203 208 const char *filename = "/tmp/smb.conf.smbconf_testsuite"; … … 213 218 214 219 printf("TEST: init\n"); 215 werr = smbconf_init_txt(mem_ctx, &conf_ctx, filename);216 if (! W_ERROR_IS_OK(werr)) {217 printf("FAIL: text backend failed: %s\n", win_errstr(werr));220 err = smbconf_init_txt(mem_ctx, &conf_ctx, filename); 221 if (!SBC_ERROR_IS_OK(err)) { 222 printf("FAIL: text backend failed: %s\n", sbcErrorString(err)); 218 223 ret = false; 219 224 goto done; … … 241 246 static bool torture_smbconf_reg(void) 242 247 { 243 WERROR werr;248 sbcErr err; 244 249 bool ret = true; 245 250 struct smbconf_ctx *conf_ctx = NULL; … … 249 254 250 255 printf("TEST: init\n"); 251 werr = smbconf_init_reg(mem_ctx, &conf_ctx, NULL);252 if (! W_ERROR_IS_OK(werr)) {253 printf("FAIL: init failed: %s\n", win_errstr(werr));256 err = smbconf_init_reg(mem_ctx, &conf_ctx, NULL); 257 if (!SBC_ERROR_IS_OK(err)) { 258 printf("FAIL: init failed: %s\n", sbcErrorString(err)); 254 259 ret = false; 255 260 goto done; … … 290 295 291 296 load_case_tables(); 292 dbf = x_stderr;297 setup_logging(argv[0], DEBUG_STDERR); 293 298 294 299 /* parse options */
Note:
See TracChangeset
for help on using the changeset viewer.