Changeset 134 for branches/samba-3.0/source/utils/net.c
- Timestamp:
- May 23, 2008, 6:56:41 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/utils/net.c
r124 r134 347 347 348 348 /**************************************************************************** 349 Use the local machine 'spassword for this session.349 Use the local machine account (krb) and password for this session. 350 350 ****************************************************************************/ 351 351 352 int net_use_ machine_password(void)352 int net_use_krb_machine_account(void) 353 353 { 354 354 char *user_name = NULL; … … 359 359 } 360 360 361 user_name = NULL;362 361 opt_password = secrets_fetch_machine_password(opt_target_workgroup, NULL, NULL); 363 362 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 373 int 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) { 364 384 return -1; 365 385 } … … 1035 1055 machine account for testing purposes and for domain leave */ 1036 1056 1037 net_use_ machine_password();1057 net_use_krb_machine_account(); 1038 1058 } 1039 1059
Note:
See TracChangeset
for help on using the changeset viewer.