Ignore:
Timestamp:
May 24, 2009, 7:55:48 AM (17 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 branch to 3.3.4

Location:
branches/samba-3.3.x/source/utils
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/utils/net.c

    r206 r224  
    636636                {"stdin",       'i', POPT_ARG_NONE,   &c->opt_stdin},
    637637                {"timeout",     't', POPT_ARG_INT,    &c->opt_timeout},
     638
    638639                {"machine-pass",'P', POPT_ARG_NONE,   &c->opt_machine_pass},
    639640                {"kerberos",    'k', POPT_ARG_NONE,   &c->opt_kerberos},
  • branches/samba-3.3.x/source/utils/net.h

    r206 r224  
    4444        int opt_flags;
    4545        int opt_timeout;
     46
    4647        const char *opt_target_workgroup;
    4748        int opt_machine_pass;
  • branches/samba-3.3.x/source/utils/net_conf.c

    r223 r224  
    301301                        goto done;
    302302                case 2:
    303                         servicename = talloc_strdup_lower(mem_ctx, argv[1]);
     303                        servicename = talloc_strdup(mem_ctx, argv[1]);
    304304                        if (servicename == NULL) {
    305305                                d_printf("error: out of memory!\n");
     
    341341                        goto cancel;
    342342                }
     343
     344
     345
     346
     347
     348
     349
     350
    343351                werr = import_process_service(c, conf_ctx, service);
    344352                if (!W_ERROR_IS_OK(werr)) {
     
    502510        }
    503511
    504         sharename = talloc_strdup_lower(mem_ctx, argv[0]);
     512        sharename = talloc_strdup(mem_ctx, argv[0]);
    505513        if (sharename == NULL) {
    506514                d_printf("error: out of memory!\n");
     
    515523        }
    516524
    517         d_printf("[%s]\n", sharename);
     525        d_printf("[%s]\n", sname);
    518526
    519527        for (count = 0; count < service->num_params; count++) {
     
    601609                case 2:
    602610                        path = argv[1];
    603                         sharename = talloc_strdup_lower(mem_ctx, argv[0]);
     611                        sharename = talloc_strdup(mem_ctx, argv[0]);
    604612                        if (sharename == NULL) {
    605613                                d_printf("error: out of memory!\n");
     
    729737                goto done;
    730738        }
    731         sharename = talloc_strdup_lower(mem_ctx, argv[0]);
     739        sharename = talloc_strdup(mem_ctx, argv[0]);
    732740        if (sharename == NULL) {
    733741                d_printf("error: out of memory!\n");
     
    762770                goto done;
    763771        }
    764         service = talloc_strdup_lower(mem_ctx, argv[0]);
     772        service = talloc_strdup(mem_ctx, argv[0]);
    765773        if (service == NULL) {
    766774                d_printf("error: out of memory!\n");
     
    814822                goto done;
    815823        }
    816         service = talloc_strdup_lower(mem_ctx, argv[0]);
     824        service = talloc_strdup(mem_ctx, argv[0]);
    817825        if (service == NULL) {
    818826                d_printf("error: out of memory!\n");
     
    864872                goto done;
    865873        }
    866         service = talloc_strdup_lower(mem_ctx, argv[0]);
     874        service = talloc_strdup(mem_ctx, argv[0]);
    867875        if (service == NULL) {
    868876                d_printf("error: out of memory!\n");
     
    917925        }
    918926
    919         service = talloc_strdup_lower(mem_ctx, argv[0]);
     927        service = talloc_strdup(mem_ctx, argv[0]);
    920928        if (service == NULL) {
    921929                d_printf("error: out of memory!\n");
     
    957965        }
    958966
    959         service = talloc_strdup_lower(mem_ctx, argv[0]);
     967        service = talloc_strdup(mem_ctx, argv[0]);
    960968        if (service == NULL) {
    961969                d_printf("error: out of memory!\n");
     
    9971005        }
    9981006
    999         service = talloc_strdup_lower(mem_ctx, argv[0]);
     1007        service = talloc_strdup(mem_ctx, argv[0]);
    10001008        if (service == NULL) {
    10011009                d_printf("error: out of memory!\n");
  • branches/samba-3.3.x/source/utils/net_rpc.c

    r221 r224  
    121121        DOM_SID *domain_sid;
    122122        const char *domain_name;
     123
    123124
    124125        /* make use of cli_state handed over as an argument, if possible */
     
    142143        if (!(mem_ctx = talloc_init("run_rpc_command"))) {
    143144                DEBUG(0, ("talloc_init() failed\n"));
    144                 cli_shutdown(cli);
    145                 return -1;
     145                goto fail;
    146146        }
    147147
     
    149149                                              &domain_name);
    150150        if (!NT_STATUS_IS_OK(nt_status)) {
    151                 cli_shutdown(cli);
    152                 return -1;
     151                goto fail;
    153152        }
    154153
     
    165164                                DEBUG(0, ("Could not initialise schannel netlogon pipe. Error was %s\n",
    166165                                        nt_errstr(nt_status) ));
    167                                 cli_shutdown(cli);
    168                                 return -1;
     166                                goto fail;
    169167                        }
    170168                } else {
     
    185183                                                debug_ctx(), cli, interface),
    186184                                        nt_errstr(nt_status) ));
    187                                 cli_shutdown(cli);
    188                                 return -1;
     185                                goto fail;
    189186                        }
    190187                }
     
    196193                DEBUG(1, ("rpc command function failed! (%s)\n", nt_errstr(nt_status)));
    197194        } else {
     195
    198196                DEBUG(5, ("rpc command function succedded\n"));
    199197        }
     
    205203        }
    206204
     205
    207206        /* close the connection only if it was opened here */
    208207        if (!cli_arg) {
     
    211210
    212211        talloc_destroy(mem_ctx);
    213         return (!NT_STATUS_IS_OK(nt_status));
     212        return ;
    214213}
    215214
     
    61286127        nt_status = rpccli_samr_Connect2(pipe_hnd, mem_ctx,
    61296128                                         pipe_hnd->desthost,
    6130                                          SAMR_ACCESS_OPEN_DOMAIN,
     6129                                         SAMR_ACCESS__DOMAIN,
    61316130                                         &connect_hnd);
    61326131        if (!NT_STATUS_IS_OK(nt_status)) {
  • branches/samba-3.3.x/source/utils/net_rpc_join.c

    r221 r224  
    245245                                           pipe_hnd->desthost,
    246246                                           SAMR_ACCESS_ENUM_DOMAINS
    247                                            | SAMR_ACCESS_OPEN_DOMAIN,
     247                                           | SAMR_ACCESS__DOMAIN,
    248248                                           &sam_pol),
    249249                      "could not connect to SAM database");
  • branches/samba-3.3.x/source/utils/net_rpc_service.c

    r206 r224  
    583583********************************************************************/
    584584
     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
    585740static int rpc_service_list(struct net_context *c, int argc, const char **argv )
    586741{
     
    674829        return run_rpc_command(c, NULL, &ndr_table_svcctl.syntax_id, 0,
    675830                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
    676863}
    677864
     
    730917                        "    View current status of a service"
    731918                },
     919
     920
     921
     922
     923
     924
     925
     926
     927
     928
     929
     930
     931
     932
     933
     934
     935
    732936                {NULL, NULL, 0, NULL, NULL}
    733937        };
  • branches/samba-3.3.x/source/utils/net_util.c

    r206 r224  
    522522                          nt_errstr(nt_status));
    523523                cli = NULL;
     524
     525
    524526        }
    525527
  • branches/samba-3.3.x/source/utils/smbpasswd.c

    r206 r224  
    431431               
    432432                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);
    439444                        }
    440                         TALLOC_FREE(passwd);
    441445
    442446                        new_passwd = prompt_for_new_password(stdin_passwd_get);
Note: See TracChangeset for help on using the changeset viewer.