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

Update Samba 3.3 to 3.3.1

Location:
branches/samba-3.3.x/source/libnet
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/libnet/libnet_join.c

    r206 r221  
    791791        status = rpccli_samr_Connect2(pipe_hnd, mem_ctx,
    792792                                      pipe_hnd->desthost,
    793                                       SEC_RIGHTS_MAXIMUM_ALLOWED,
     793                                      SAMR_ACCESS_ENUM_DOMAINS
     794                                      | SAMR_ACCESS_OPEN_DOMAIN,
    794795                                      &sam_pol);
    795796        if (!NT_STATUS_IS_OK(status)) {
     
    799800        status = rpccli_samr_OpenDomain(pipe_hnd, mem_ctx,
    800801                                        &sam_pol,
    801                                         SEC_RIGHTS_MAXIMUM_ALLOWED,
     802                                        SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1
     803                                        | SAMR_DOMAIN_ACCESS_CREATE_USER
     804                                        | SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT,
    802805                                        r->out.domain_sid,
    803806                                        &domain_pol);
  • branches/samba-3.3.x/source/libnet/libnet_samsync_keytab.c

    r206 r221  
    112112        krb5_error_code ret = 0;
    113113        NTSTATUS status;
    114         struct libnet_keytab_context *keytab_ctx;
     114        struct libnet_keytab_context *keytab_ctx = NULL;
    115115        struct libnet_keytab_entry *entry;
    116116        uint64_t old_sequence_num = 0;
  • branches/samba-3.3.x/source/libnet/libnet_samsync_ldif.c

    r206 r221  
    346346        groupmap[0].group_dn    = talloc_asprintf(mem_ctx,
    347347                "cn=Domain Admins,ou=%s,%s", group_attr, suffix);
    348         NT_STATUS_HAVE_NO_MEMORY(groupmap[0].sambaSID);
    349         NT_STATUS_HAVE_NO_MEMORY(groupmap[0].group_dn);
     348        if (groupmap[0].sambaSID == NULL || groupmap[0].group_dn == NULL) {
     349                goto err;
     350        }
    350351
    351352        accountmap[0].rid       = 512;
    352353        accountmap[0].cn        = talloc_strdup(mem_ctx, "Domain Admins");
    353         NT_STATUS_HAVE_NO_MEMORY(accountmap[0].cn);
     354        if (accountmap[0].cn == NULL) {
     355                goto err;
     356        }
    354357
    355358        groupmap[1].rid         = 513;
     
    358361        groupmap[1].group_dn    = talloc_asprintf(mem_ctx,
    359362                "cn=Domain Users,ou=%s,%s", group_attr, suffix);
    360         NT_STATUS_HAVE_NO_MEMORY(groupmap[1].sambaSID);
    361         NT_STATUS_HAVE_NO_MEMORY(groupmap[1].group_dn);
     363        if (groupmap[1].sambaSID == NULL || groupmap[1].group_dn == NULL) {
     364                goto err;
     365        }
    362366
    363367        accountmap[1].rid       = 513;
    364368        accountmap[1].cn        = talloc_strdup(mem_ctx, "Domain Users");
    365         NT_STATUS_HAVE_NO_MEMORY(accountmap[1].cn);
     369        if (accountmap[1].cn == NULL) {
     370                goto err;
     371        }
    366372
    367373        groupmap[2].rid         = 514;
     
    370376        groupmap[2].group_dn    = talloc_asprintf(mem_ctx,
    371377                "cn=Domain Guests,ou=%s,%s", group_attr, suffix);
    372         NT_STATUS_HAVE_NO_MEMORY(groupmap[2].sambaSID);
    373         NT_STATUS_HAVE_NO_MEMORY(groupmap[2].group_dn);
     378        if (groupmap[2].sambaSID == NULL || groupmap[2].group_dn == NULL) {
     379                goto err;
     380        }
    374381
    375382        accountmap[2].rid       = 514;
    376383        accountmap[2].cn        = talloc_strdup(mem_ctx, "Domain Guests");
    377         NT_STATUS_HAVE_NO_MEMORY(accountmap[2].cn);
     384        if (accountmap[2].cn == NULL) {
     385                goto err;
     386        }
    378387
    379388        groupmap[3].rid         = 515;
     
    382391        groupmap[3].group_dn    = talloc_asprintf(mem_ctx,
    383392                "cn=Domain Computers,ou=%s,%s", group_attr, suffix);
    384         NT_STATUS_HAVE_NO_MEMORY(groupmap[3].sambaSID);
    385         NT_STATUS_HAVE_NO_MEMORY(groupmap[3].group_dn);
     393        if (groupmap[3].sambaSID == NULL || groupmap[3].group_dn == NULL) {
     394                goto err;
     395        }
    386396
    387397        accountmap[3].rid       = 515;
    388398        accountmap[3].cn        = talloc_strdup(mem_ctx, "Domain Computers");
    389         NT_STATUS_HAVE_NO_MEMORY(accountmap[3].cn);
     399        if (accountmap[3].cn == NULL) {
     400                goto err;
     401        }
    390402
    391403        groupmap[4].rid         = 544;
     
    394406        groupmap[4].group_dn    = talloc_asprintf(mem_ctx,
    395407                "cn=Administrators,ou=%s,%s", group_attr, suffix);
    396         NT_STATUS_HAVE_NO_MEMORY(groupmap[4].sambaSID);
    397         NT_STATUS_HAVE_NO_MEMORY(groupmap[4].group_dn);
     408        if (groupmap[4].sambaSID == NULL || groupmap[4].group_dn == NULL) {
     409                goto err;
     410        }
    398411
    399412        accountmap[4].rid       = 515;
    400413        accountmap[4].cn        = talloc_strdup(mem_ctx, "Administrators");
    401         NT_STATUS_HAVE_NO_MEMORY(accountmap[4].cn);
     414        if (accountmap[4].cn == NULL) {
     415                goto err;
     416        }
    402417
    403418        groupmap[5].rid         = 550;
     
    406421        groupmap[5].group_dn    = talloc_asprintf(mem_ctx,
    407422                "cn=Print Operators,ou=%s,%s", group_attr, suffix);
    408         NT_STATUS_HAVE_NO_MEMORY(groupmap[5].sambaSID);
    409         NT_STATUS_HAVE_NO_MEMORY(groupmap[5].group_dn);
     423        if (groupmap[5].sambaSID == NULL || groupmap[5].group_dn == NULL) {
     424                goto err;
     425        }
    410426
    411427        accountmap[5].rid       = 550;
    412428        accountmap[5].cn        = talloc_strdup(mem_ctx, "Print Operators");
    413         NT_STATUS_HAVE_NO_MEMORY(accountmap[5].cn);
     429        if (accountmap[5].cn == NULL) {
     430                goto err;
     431        }
    414432
    415433        groupmap[6].rid         = 551;
     
    418436        groupmap[6].group_dn    = talloc_asprintf(mem_ctx,
    419437                "cn=Backup Operators,ou=%s,%s", group_attr, suffix);
    420         NT_STATUS_HAVE_NO_MEMORY(groupmap[6].sambaSID);
    421         NT_STATUS_HAVE_NO_MEMORY(groupmap[6].group_dn);
     438        if (groupmap[6].sambaSID == NULL || groupmap[6].group_dn == NULL) {
     439                goto err;
     440        }
    422441
    423442        accountmap[6].rid       = 551;
    424443        accountmap[6].cn        = talloc_strdup(mem_ctx, "Backup Operators");
    425         NT_STATUS_HAVE_NO_MEMORY(accountmap[6].cn);
     444        if (accountmap[6].cn == NULL) {
     445                goto err;
     446        }
    426447
    427448        groupmap[7].rid         = 552;
     
    430451        groupmap[7].group_dn    = talloc_asprintf(mem_ctx,
    431452                "cn=Replicators,ou=%s,%s", group_attr, suffix);
    432         NT_STATUS_HAVE_NO_MEMORY(groupmap[7].sambaSID);
    433         NT_STATUS_HAVE_NO_MEMORY(groupmap[7].group_dn);
     453        if (groupmap[7].sambaSID == NULL || groupmap[7].group_dn == NULL) {
     454                goto err;
     455        }
    434456
    435457        accountmap[7].rid       = 551;
    436458        accountmap[7].cn        = talloc_strdup(mem_ctx, "Replicators");
    437         NT_STATUS_HAVE_NO_MEMORY(accountmap[7].cn);
     459        if (accountmap[7].cn == NULL) {
     460                goto err;
     461        }
    438462
    439463        SAFE_FREE(group_attr);
    440464
    441465        return NT_STATUS_OK;
     466
     467  err:
     468
     469        SAFE_FREE(group_attr);
     470        return NT_STATUS_NO_MEMORY;
    442471}
    443472
     
    543572        groupmap->group_dn      = talloc_asprintf(mem_ctx,
    544573             "cn=%s,ou=%s,%s", groupname, group_attr, suffix);
    545         NT_STATUS_HAVE_NO_MEMORY(groupmap->sambaSID);
    546         NT_STATUS_HAVE_NO_MEMORY(groupmap->group_dn);
     574        if (groupmap->sambaSID == NULL || groupmap->group_dn == NULL) {
     575                SAFE_FREE(group_attr);
     576                return NT_STATUS_NO_MEMORY;
     577        }
    547578
    548579        /* Write the data to the temporary add ldif file */
     
    777808        groupmap->gidNumber = ldif_gid;
    778809        groupmap->sambaSID = talloc_asprintf(mem_ctx, "%s-%d", sid, g_rid);
    779         NT_STATUS_HAVE_NO_MEMORY(groupmap->sambaSID);
     810        if (groupmap->sambaSID == NULL) {
     811                SAFE_FREE(group_attr);
     812                return NT_STATUS_NO_MEMORY;
     813        }
    780814
    781815        /* Write the data to the temporary add ldif file */
Note: See TracChangeset for help on using the changeset viewer.