Changeset 221 for branches/samba-3.3.x/source/libsmb/libsmb_context.c
- Timestamp:
- May 24, 2009, 7:17:10 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/libsmb/libsmb_context.c
r206 r221 95 95 smbc_setFunctionFtruncate(context, SMBC_ftruncate_ctx); 96 96 smbc_setFunctionStat(context, SMBC_stat_ctx); 97 smbc_setFunctionStatVFS(context, SMBC_statvfs_ctx); 98 smbc_setFunctionFstatVFS(context, SMBC_fstatvfs_ctx); 97 99 smbc_setFunctionFstat(context, SMBC_fstat_ctx); 98 100 smbc_setFunctionOpendir(context, SMBC_opendir_ctx); … … 645 647 cli_cm_set_credentials(); 646 648 } 649 650 void smbc_set_credentials_with_fallback(SMBCCTX *context, 651 const char *workgroup, 652 const char *user, 653 const char *password) 654 { 655 smbc_bool use_kerberos = false; 656 const char *signing_state = "off"; 657 658 if (!context || 659 ! workgroup || ! *workgroup || 660 ! user || ! *user || 661 ! password || ! *password) { 662 663 return; 664 } 665 666 if (smbc_getOptionUseKerberos(context)) { 667 use_kerberos = True; 668 } 669 670 if (lp_client_signing()) { 671 signing_state = "on"; 672 } 673 674 if (lp_client_signing() == Required) { 675 signing_state = "force"; 676 } 677 678 /* Using CONST_DISCARD here is ugly, but 679 * we know that smbc_set_credentials() doesn't 680 * actually modify the strings, and should have 681 * been const from the start. We're constrained 682 * by the ABI here. 683 */ 684 685 smbc_set_credentials(CONST_DISCARD(char *,workgroup), 686 CONST_DISCARD(char *,user), 687 CONST_DISCARD(char *,password), 688 use_kerberos, 689 CONST_DISCARD(char *,signing_state)); 690 691 if (smbc_getOptionFallbackAfterKerberos(context)) { 692 cli_cm_set_fallback_after_kerberos(); 693 } 694 }
Note:
See TracChangeset
for help on using the changeset viewer.