Ignore:
Timestamp:
May 23, 2008, 6:56:41 AM (17 years ago)
Author:
Paul Smedley
Message:

Update source to 3.0.29

File:
1 edited

Legend:

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

    r124 r134  
    347347
    348348/****************************************************************************
    349  Use the local machine's password for this session.
     349 Use the local machine account (krb) and password for this session.
    350350****************************************************************************/
    351351
    352 int net_use_machine_password(void)
     352int net_use_krb_machine_account(void)
    353353{
    354354        char *user_name = NULL;
     
    359359        }
    360360
    361         user_name = NULL;
    362361        opt_password = secrets_fetch_machine_password(opt_target_workgroup, NULL, NULL);
    363362        if (asprintf(&user_name, "%s$@%s", global_myname(), lp_realm()) == -1) {
     363                return -1;
     364        }
     365        opt_user_name = user_name;
     366        return 0;
     367}
     368
     369/****************************************************************************
     370 Use the machine account name and password for this session.
     371****************************************************************************/
     372
     373int net_use_machine_account(void)
     374{
     375        char *user_name = NULL;
     376               
     377        if (!secrets_init()) {
     378                d_fprintf(stderr, "ERROR: Unable to open secrets database\n");
     379                exit(1);
     380        }
     381
     382        opt_password = secrets_fetch_machine_password(opt_target_workgroup, NULL, NULL);
     383        if (asprintf(&user_name, "%s$", global_myname()) == -1) {
    364384                return -1;
    365385        }
     
    10351055                   machine account for testing purposes and for domain leave */
    10361056
    1037                 net_use_machine_password();
     1057                net_use_krb_machine_account();
    10381058        }
    10391059
Note: See TracChangeset for help on using the changeset viewer.