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/utils
Files:
7 edited

Legend:

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

    r206 r221  
    577577        }
    578578
    579         if (getpwnam(sharename)) {
    580                 d_fprintf(stderr, "ERROR: share name %s is already a valid "
    581                           "system user name.\n", sharename);
    582                 goto done;
    583         }
    584 
    585579        if (strequal(sharename, GLOBAL_NAME)) {
    586580                d_fprintf(stderr,
  • branches/samba-3.3.x/source/utils/net_rpc.c

    r206 r221  
    43794379        int ret;
    43804380        bool r;
    4381         ENUM_HND hnd;
    43824381        uint32 i;
    43834382        FILE *f;
     
    44114410        for (i=0; i<num_tokens; i++)
    44124411                collect_alias_memberships(&tokens[i].token);
    4413 
    4414         init_enum_hnd(&hnd, 0);
    44154412
    44164413        share_list.num_shares = 0;
  • branches/samba-3.3.x/source/utils/net_rpc_join.c

    r206 r221  
    244244        CHECK_RPC_ERR(rpccli_samr_Connect2(pipe_hnd, mem_ctx,
    245245                                           pipe_hnd->desthost,
    246                                            SEC_RIGHTS_MAXIMUM_ALLOWED,
     246                                           SAMR_ACCESS_ENUM_DOMAINS
     247                                           | SAMR_ACCESS_OPEN_DOMAIN,
    247248                                           &sam_pol),
    248249                      "could not connect to SAM database");
     
    251252        CHECK_RPC_ERR(rpccli_samr_OpenDomain(pipe_hnd, mem_ctx,
    252253                                             &sam_pol,
    253                                              SEC_RIGHTS_MAXIMUM_ALLOWED,
     254                                             SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1
     255                                             | SAMR_DOMAIN_ACCESS_CREATE_USER
     256                                             | SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT,
    254257                                             domain_sid,
    255258                                             &domain_pol),
     
    483486int net_rpc_testjoin(struct net_context *c, int argc, const char **argv)
    484487{
    485         char *domain = smb_xstrdup(c->opt_target_workgroup);
    486488        NTSTATUS nt_status;
    487489
     
    494496
    495497        /* Display success or failure */
    496         nt_status = net_rpc_join_ok(c, domain, NULL, NULL);
     498        nt_status = net_rpc_join_ok(c, c->opt_target_workgroup, NULL, NULL);
    497499        if (!NT_STATUS_IS_OK(nt_status)) {
    498500                fprintf(stderr,"Join to domain '%s' is not valid: %s\n",
    499                         domain, nt_errstr(nt_status));
    500                 free(domain);
     501                        c->opt_target_workgroup, nt_errstr(nt_status));
    501502                return -1;
    502503        }
    503504
    504         printf("Join to '%s' is OK\n",domain);
    505         free(domain);
     505        printf("Join to '%s' is OK\n", c->opt_target_workgroup);
    506506        return 0;
    507507}
  • branches/samba-3.3.x/source/utils/ntlm_auth.c

    r206 r221  
    524524        static const char zeros[16] = { 0, };
    525525        NTSTATUS nt_status;
    526         char *error_string;
     526        char *error_string = NULL;
    527527        uint8 lm_key[8];
    528528        uint8 user_sess_key[16];
    529         char *unix_name;
     529        char *unix_name = NULL;
    530530
    531531        nt_status = contact_winbind_auth_crap(ntlmssp_state->user, ntlmssp_state->domain,
     
    549549                }
    550550                ntlmssp_state->auth_context = talloc_strdup(ntlmssp_state->mem_ctx, unix_name);
    551                 SAFE_FREE(unix_name);
    552551        } else {
    553552                DEBUG(NT_STATUS_EQUAL(nt_status, NT_STATUS_ACCESS_DENIED) ? 0 : 3,
     
    558557                ntlmssp_state->auth_context = NULL;
    559558        }
     559
     560        SAFE_FREE(error_string);
     561        SAFE_FREE(unix_name);
    560562        return nt_status;
    561563}
     
    18151817                                x_fprintf(x_stdout, "Authenticated: No\n");
    18161818                                x_fprintf(x_stdout, "Authentication-Error: %s\n.\n", error_string);
    1817                                 SAFE_FREE(error_string);
    18181819                        } else {
    18191820                                static char zeros[16];
     
    18431844                                }
    18441845                        }
     1846                        SAFE_FREE(error_string);
    18451847                }
    18461848                /* clear out the state */
  • branches/samba-3.3.x/source/utils/profiles.c

    r206 r221  
    5858static bool swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 )
    5959{
    60         SEC_ACL *acl;
     60        SEC_ACL *theacl;
    6161        int i;
    6262        bool update = False;
     
    7979        }
    8080
    81         acl = sd->dacl;
    82         verbose_output("  DACL: %d entries:\n", acl->num_aces);
    83         for ( i=0; i<acl->num_aces; i++ ) {
     81        theacl = sd->dacl;
     82        verbose_output("  DACL: %d entries:\n", theacl->num_aces);
     83        for ( i=0; i<theacl->num_aces; i++ ) {
    8484                verbose_output("    Trustee SID: %s\n",
    85                         sid_string_tos(&acl->aces[i].trustee));
    86                 if ( sid_equal( &acl->aces[i].trustee, s1 ) ) {
    87                         sid_copy( &acl->aces[i].trustee, s2 );
     85                        sid_string_tos(&theacl->aces[i].trustee));
     86                if ( sid_equal( &theacl->aces[i].trustee, s1 ) ) {
     87                        sid_copy( &theacl->aces[i].trustee, s2 );
    8888                        update = True;
    8989                        verbose_output("    New Trustee SID: %s\n",
    90                                 sid_string_tos(&acl->aces[i].trustee));
     90                                sid_string_tos(&theacl->aces[i].trustee));
    9191                }
    9292        }
    9393
    9494#if 0
    95         acl = sd->sacl;
    96         verbose_output("  SACL: %d entries: \n", acl->num_aces);
    97         for ( i=0; i<acl->num_aces; i++ ) {
     95        theacl = sd->sacl;
     96        verbose_output("  SACL: %d entries: \n", theacl->num_aces);
     97        for ( i=0; i<theacl->num_aces; i++ ) {
    9898                verbose_output("    Trustee SID: %s\n",
    99                         sid_string_tos(&acl->aces[i].trustee));
    100                 if ( sid_equal( &acl->aces[i].trustee, s1 ) ) {
    101                         sid_copy( &acl->aces[i].trustee, s2 );
     99                        sid_string_tos(&theacl->aces[i].trustee));
     100                if ( sid_equal( &theacl->aces[i].trustee, s1 ) ) {
     101                        sid_copy( &theacl->aces[i].trustee, s2 );
    102102                        update = True;
    103103                        verbose_output("    New Trustee SID: %s\n",
    104                                 sid_string_tos(&acl->aces[i].trustee));
     104                                sid_string_tos(&theacl->aces[i].trustee));
    105105                }
    106106        }
  • branches/samba-3.3.x/source/utils/sharesec.c

    r206 r221  
    294294        SEC_DESC *sd = NULL;
    295295        SEC_ACE *ace;
    296         SEC_ACL *acl;
     296        SEC_ACL *theacl;
    297297        int num_ace;
    298298        const char *pacl;
     
    322322        }
    323323       
    324         if ( !(acl = make_sec_acl( mem_ctx, NT4_ACL_REVISION, num_ace, ace )) )
     324        if ( !(theacl = make_sec_acl( mem_ctx, NT4_ACL_REVISION, num_ace, ace )) )
    325325                return NULL;
    326326               
    327327        sd = make_sec_desc( mem_ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
    328                 NULL, NULL, NULL, acl, sd_size);
     328                NULL, NULL, NULL, theacl, sd_size);
    329329
    330330        return sd;
  • branches/samba-3.3.x/source/utils/smbget.c

    r206 r221  
    195195               
    196196                if(chmod(relname, remotestat.st_mode) < 0) {
    197                         fprintf(stderr, "Unable to change mode of local dir %s to %o\n", relname, remotestat.st_mode);
     197                        fprintf(stderr, "Unable to change mode of local dir %s to %o\n", relname,
     198                                (unsigned int)remotestat.st_mode);
    198199                        smbc_closedir(dirhandle);
    199200                        return 0;
     
    472473        if(keep_permissions && !send_stdout) {
    473474                if(fchmod(localhandle, remotestat.st_mode) < 0) {
    474                         fprintf(stderr, "Unable to change mode of local file %s to %o\n", path, remotestat.st_mode);
     475                        fprintf(stderr, "Unable to change mode of local file %s to %o\n", path,
     476                                (unsigned int)remotestat.st_mode);
    475477                        smbc_close(remotehandle);
    476478                        close(localhandle);
     
    488490        char bs[100];
    489491        human_readable(total_bytes, bs, sizeof(bs));
    490         if(!quiet)fprintf(stderr, "Downloaded %s in %lu seconds\n", bs, time(NULL) - total_start_time);
     492        if(!quiet)fprintf(stderr, "Downloaded %s in %lu seconds\n", bs,
     493                (unsigned long)(time(NULL) - total_start_time));
    491494        exit(0);
    492495}
Note: See TracChangeset for help on using the changeset viewer.