Ignore:
Timestamp:
Aug 2, 2010, 6:40:21 PM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba 3.5: vendor update to 3.5.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/passdb/secrets.c

    r414 r478  
    325325
    326326/**
     327
     328
     329
     330
     331
     332
     333
     334
     335
     336
     337
     338
     339
     340
     341
     342
     343
    327344 * Form a key for fetching the machine trust account password
    328345 *
     
    572589
    573590/************************************************************************
    574  Routine to delete the plaintext machine account password
     591 Routine to delete the old plaintext machine account password if any
     592************************************************************************/
     593
     594static bool secrets_delete_prev_machine_password(const char *domain)
     595{
     596        char *oldpass = (char *)secrets_fetch(machine_prev_password_keystr(domain), NULL);
     597        if (oldpass == NULL) {
     598                return true;
     599        }
     600        SAFE_FREE(oldpass);
     601        return secrets_delete(machine_prev_password_keystr(domain));
     602}
     603
     604/************************************************************************
     605 Routine to delete the plaintext machine account password and old
     606 password if any
    575607************************************************************************/
    576608
    577609bool secrets_delete_machine_password(const char *domain)
    578610{
     611
     612
     613
    579614        return secrets_delete(machine_password_keystr(domain));
    580615}
    581616
    582617/************************************************************************
    583  Routine to delete the plaintext machine account password, sec channel type and
    584  last change time from secrets database
     618 Routine to delete the plaintext machine account password,
     619 last change time from secrets database
    585620************************************************************************/
    586621
    587622bool secrets_delete_machine_password_ex(const char *domain)
    588623{
     624
     625
     626
    589627        if (!secrets_delete(machine_password_keystr(domain))) {
    590628                return false;
     
    606644
    607645/************************************************************************
     646
     647
     648
     649
     650
     651
     652
     653
     654
     655
     656
     657
     658
     659
     660
     661
     662
     663
     664
    608665 Routine to set the plaintext machine account password for a realm
    609 the password is assumed to be a null terminated ascii string
     666 the password is assumed to be a null terminated ascii string.
     667 Before storing
    610668************************************************************************/
    611669
     
    617675        uint32 sec_channel_type;
    618676
     677
     678
     679
     680
    619681        ret = secrets_store(machine_password_keystr(domain), pass, strlen(pass)+1);
    620682        if (!ret)
     
    628690
    629691        return ret;
     692
     693
     694
     695
     696
     697
     698
     699
     700
     701
     702
    630703}
    631704
Note: See TracChangeset for help on using the changeset viewer.