Ignore:
Timestamp:
Jul 11, 2008, 1:13:42 AM (17 years ago)
Author:
Paul Smedley
Message:

Update branch to 3.0.31 release

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/utils/net_domain.c

    r124 r140  
    214214        uchar pwbuf[532];
    215215        SAM_USERINFO_CTR ctr;
     216        SAM_USER_INFO_24 p24;
    216217        SAM_USER_INFO_25 p25;
    217218        const int infolevel = 25;
     
    338339                                           infolevel, &cli->user_session_key, &ctr);
    339340
     341        if (NT_STATUS_EQUAL(status, NT_STATUS(DCERPC_FAULT_INVALID_TAG))) {
     342
     343                uchar pwbuf2[516];
     344
     345                ZERO_STRUCT(p24);
     346
     347                encode_pw_buffer(pwbuf2, clear_pw, STR_UNICODE);
     348
     349                /* retry with level 24 */
     350                init_sam_user_info24(&p24, (char *)pwbuf2, 24);
     351
     352                ctr.switch_value = 24;
     353                ctr.info.id24    = &p24;
     354
     355                status = rpccli_samr_set_userinfo(pipe_hnd, mem_ctx,
     356                                                  &user_pol,
     357                                                  24,
     358                                                  &cli->user_session_key,
     359                                                  &ctr);
     360        }
     361
    340362        if ( !NT_STATUS_IS_OK(status) ) {
    341363                d_fprintf( stderr, "Failed to set password for machine account (%s)\n",
Note: See TracChangeset for help on using the changeset viewer.