Changeset 224 for branches/samba-3.3.x/source/utils
- Timestamp:
- May 24, 2009, 7:55:48 AM (17 years ago)
- Location:
- branches/samba-3.3.x/source/utils
- Files:
-
- 8 edited
-
net.c (modified) (1 diff)
-
net.h (modified) (1 diff)
-
net_conf.c (modified) (12 diffs)
-
net_rpc.c (modified) (9 diffs)
-
net_rpc_join.c (modified) (1 diff)
-
net_rpc_service.c (modified) (3 diffs)
-
net_util.c (modified) (1 diff)
-
smbpasswd.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/utils/net.c
r206 r224 636 636 {"stdin", 'i', POPT_ARG_NONE, &c->opt_stdin}, 637 637 {"timeout", 't', POPT_ARG_INT, &c->opt_timeout}, 638 638 639 {"machine-pass",'P', POPT_ARG_NONE, &c->opt_machine_pass}, 639 640 {"kerberos", 'k', POPT_ARG_NONE, &c->opt_kerberos}, -
branches/samba-3.3.x/source/utils/net.h
r206 r224 44 44 int opt_flags; 45 45 int opt_timeout; 46 46 47 const char *opt_target_workgroup; 47 48 int opt_machine_pass; -
branches/samba-3.3.x/source/utils/net_conf.c
r223 r224 301 301 goto done; 302 302 case 2: 303 servicename = talloc_strdup _lower(mem_ctx, argv[1]);303 servicename = talloc_strdup(mem_ctx, argv[1]); 304 304 if (servicename == NULL) { 305 305 d_printf("error: out of memory!\n"); … … 341 341 goto cancel; 342 342 } 343 344 345 346 347 348 349 350 343 351 werr = import_process_service(c, conf_ctx, service); 344 352 if (!W_ERROR_IS_OK(werr)) { … … 502 510 } 503 511 504 sharename = talloc_strdup _lower(mem_ctx, argv[0]);512 sharename = talloc_strdup(mem_ctx, argv[0]); 505 513 if (sharename == NULL) { 506 514 d_printf("error: out of memory!\n"); … … 515 523 } 516 524 517 d_printf("[%s]\n", s harename);525 d_printf("[%s]\n", sname); 518 526 519 527 for (count = 0; count < service->num_params; count++) { … … 601 609 case 2: 602 610 path = argv[1]; 603 sharename = talloc_strdup _lower(mem_ctx, argv[0]);611 sharename = talloc_strdup(mem_ctx, argv[0]); 604 612 if (sharename == NULL) { 605 613 d_printf("error: out of memory!\n"); … … 729 737 goto done; 730 738 } 731 sharename = talloc_strdup _lower(mem_ctx, argv[0]);739 sharename = talloc_strdup(mem_ctx, argv[0]); 732 740 if (sharename == NULL) { 733 741 d_printf("error: out of memory!\n"); … … 762 770 goto done; 763 771 } 764 service = talloc_strdup _lower(mem_ctx, argv[0]);772 service = talloc_strdup(mem_ctx, argv[0]); 765 773 if (service == NULL) { 766 774 d_printf("error: out of memory!\n"); … … 814 822 goto done; 815 823 } 816 service = talloc_strdup _lower(mem_ctx, argv[0]);824 service = talloc_strdup(mem_ctx, argv[0]); 817 825 if (service == NULL) { 818 826 d_printf("error: out of memory!\n"); … … 864 872 goto done; 865 873 } 866 service = talloc_strdup _lower(mem_ctx, argv[0]);874 service = talloc_strdup(mem_ctx, argv[0]); 867 875 if (service == NULL) { 868 876 d_printf("error: out of memory!\n"); … … 917 925 } 918 926 919 service = talloc_strdup _lower(mem_ctx, argv[0]);927 service = talloc_strdup(mem_ctx, argv[0]); 920 928 if (service == NULL) { 921 929 d_printf("error: out of memory!\n"); … … 957 965 } 958 966 959 service = talloc_strdup _lower(mem_ctx, argv[0]);967 service = talloc_strdup(mem_ctx, argv[0]); 960 968 if (service == NULL) { 961 969 d_printf("error: out of memory!\n"); … … 997 1005 } 998 1006 999 service = talloc_strdup _lower(mem_ctx, argv[0]);1007 service = talloc_strdup(mem_ctx, argv[0]); 1000 1008 if (service == NULL) { 1001 1009 d_printf("error: out of memory!\n"); -
branches/samba-3.3.x/source/utils/net_rpc.c
r221 r224 121 121 DOM_SID *domain_sid; 122 122 const char *domain_name; 123 123 124 124 125 /* make use of cli_state handed over as an argument, if possible */ … … 142 143 if (!(mem_ctx = talloc_init("run_rpc_command"))) { 143 144 DEBUG(0, ("talloc_init() failed\n")); 144 cli_shutdown(cli); 145 return -1; 145 goto fail; 146 146 } 147 147 … … 149 149 &domain_name); 150 150 if (!NT_STATUS_IS_OK(nt_status)) { 151 cli_shutdown(cli); 152 return -1; 151 goto fail; 153 152 } 154 153 … … 165 164 DEBUG(0, ("Could not initialise schannel netlogon pipe. Error was %s\n", 166 165 nt_errstr(nt_status) )); 167 cli_shutdown(cli); 168 return -1; 166 goto fail; 169 167 } 170 168 } else { … … 185 183 debug_ctx(), cli, interface), 186 184 nt_errstr(nt_status) )); 187 cli_shutdown(cli); 188 return -1; 185 goto fail; 189 186 } 190 187 } … … 196 193 DEBUG(1, ("rpc command function failed! (%s)\n", nt_errstr(nt_status))); 197 194 } else { 195 198 196 DEBUG(5, ("rpc command function succedded\n")); 199 197 } … … 205 203 } 206 204 205 207 206 /* close the connection only if it was opened here */ 208 207 if (!cli_arg) { … … 211 210 212 211 talloc_destroy(mem_ctx); 213 return (!NT_STATUS_IS_OK(nt_status));212 return ; 214 213 } 215 214 … … 6128 6127 nt_status = rpccli_samr_Connect2(pipe_hnd, mem_ctx, 6129 6128 pipe_hnd->desthost, 6130 SAMR_ACCESS_ OPEN_DOMAIN,6129 SAMR_ACCESS__DOMAIN, 6131 6130 &connect_hnd); 6132 6131 if (!NT_STATUS_IS_OK(nt_status)) { -
branches/samba-3.3.x/source/utils/net_rpc_join.c
r221 r224 245 245 pipe_hnd->desthost, 246 246 SAMR_ACCESS_ENUM_DOMAINS 247 | SAMR_ACCESS_ OPEN_DOMAIN,247 | SAMR_ACCESS__DOMAIN, 248 248 &sam_pol), 249 249 "could not connect to SAM database"); -
branches/samba-3.3.x/source/utils/net_rpc_service.c
r206 r224 583 583 ********************************************************************/ 584 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 585 740 static int rpc_service_list(struct net_context *c, int argc, const char **argv ) 586 741 { … … 674 829 return run_rpc_command(c, NULL, &ndr_table_svcctl.syntax_id, 0, 675 830 rpc_service_status_internal, argc, argv ); 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 676 863 } 677 864 … … 730 917 " View current status of a service" 731 918 }, 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 732 936 {NULL, NULL, 0, NULL, NULL} 733 937 }; -
branches/samba-3.3.x/source/utils/net_util.c
r206 r224 522 522 nt_errstr(nt_status)); 523 523 cli = NULL; 524 525 524 526 } 525 527 -
branches/samba-3.3.x/source/utils/smbpasswd.c
r206 r224 431 431 432 432 if((local_flags & LOCAL_SET_PASSWORD) && (new_passwd == NULL)) { 433 struct passwd *passwd = getpwnam_alloc(NULL, user_name); 434 435 if (!passwd) { 436 fprintf(stderr, "Cannot locate Unix account for " 437 "'%s'!\n", user_name); 438 exit(1); 433 struct passwd *passwd; 434 435 if (remote_machine == NULL) { 436 passwd = getpwnam_alloc(NULL, user_name); 437 438 if (!passwd) { 439 fprintf(stderr, "Cannot locate Unix account for " 440 "'%s'!\n", user_name); 441 exit(1); 442 } 443 TALLOC_FREE(passwd); 439 444 } 440 TALLOC_FREE(passwd);441 445 442 446 new_passwd = prompt_for_new_password(stdin_passwd_get);
Note:
See TracChangeset
for help on using the changeset viewer.
