Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. ndex: libmapi/IProfAdmin.c
  2. ===================================================================
  3. --- libmapi/IProfAdmin.c (revision 2895)
  4. +++ libmapi/IProfAdmin.c (working copy)
  5. @@ -64,7 +64,7 @@
  6. msg = res->msgs[0];
  7.  
  8. profile->username = ldb_msg_find_attr_as_string(msg, "username", NULL);
  9. - profile->password = password ? password : ldb_msg_find_attr_as_string(msg, "password", "");
  10. + profile->password = password ? password : ldb_msg_find_attr_as_string(msg, "password", NULL);
  11. profile->workstation = ldb_msg_find_attr_as_string(msg, "workstation", NULL);
  12. profile->realm = ldb_msg_find_attr_as_string(msg, "realm", NULL);
  13. profile->domain = ldb_msg_find_attr_as_string(msg, "domain", NULL);
  14. @@ -752,12 +752,19 @@
  15.  
  16. profile->credentials = cli_credentials_init(mem_ctx);
  17. OPENCHANGE_RETVAL_IF(!profile->credentials, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
  18. - cli_credentials_set_username(profile->credentials, profile->username, CRED_SPECIFIED);
  19. - cli_credentials_set_password(profile->credentials, profile->password, CRED_SPECIFIED);
  20. +
  21. cli_credentials_set_workstation(profile->credentials, profile->workstation, CRED_SPECIFIED);
  22. cli_credentials_set_realm(profile->credentials, profile->realm, CRED_SPECIFIED);
  23. cli_credentials_set_domain(profile->credentials, profile->domain, CRED_SPECIFIED);
  24.  
  25. + cli_credentials_set_username(profile->credentials, profile->username, CRED_SPECIFIED);
  26. + if (profile->password) {
  27. + cli_credentials_set_password(profile->credentials,
  28. + profile->password, CRED_SPECIFIED);
  29. + }
  30. +
  31. + cli_credentials_guess(profile->credentials, mapi_ctx->lp_ctx);
  32. +
  33. return MAPI_E_SUCCESS;
  34. }
  35.  
  36. Index: utils/mapiprofile.c
  37. ===================================================================
  38. --- utils/mapiprofile.c (revision 2895)
  39. +++ utils/mapiprofile.c (working copy)
  40. @@ -803,7 +803,7 @@
  41.  
  42. if (create == true) {
  43. if (!profname) show_help(pc, "profile");
  44. - if (!password) show_help(pc, "password");
  45. + if (!password && !nopass) show_help(pc, "password");
  46. if (!username) show_help(pc, "username");
  47. if (!address) show_help(pc, "address");
  48. if (!domain) show_help(pc, "domain");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement