Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. Index: 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. @@ -80,7 +80,7 @@
  15. profile->method = ldb_msg_find_attr_as_int(msg, "method", 0);
  16. profile->exchange_version = ldb_msg_find_attr_as_int(msg, "exchange_version", 0);
  17.  
  18. - if (!profile->password) return MAPI_E_INVALID_PARAMETER;
  19. + /* if (!profile->password) return MAPI_E_INVALID_PARAMETER; */
  20.  
  21. return MAPI_E_SUCCESS;
  22. }
  23. @@ -752,12 +752,19 @@
  24.  
  25. profile->credentials = cli_credentials_init(mem_ctx);
  26. OPENCHANGE_RETVAL_IF(!profile->credentials, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
  27. - cli_credentials_set_username(profile->credentials, profile->username, CRED_SPECIFIED);
  28. - cli_credentials_set_password(profile->credentials, profile->password, CRED_SPECIFIED);
  29. +
  30. cli_credentials_set_workstation(profile->credentials, profile->workstation, CRED_SPECIFIED);
  31. cli_credentials_set_realm(profile->credentials, profile->realm, CRED_SPECIFIED);
  32. cli_credentials_set_domain(profile->credentials, profile->domain, CRED_SPECIFIED);
  33.  
  34. + cli_credentials_set_username(profile->credentials, profile->username, CRED_SPECIFIED);
  35. + if (profile->password) {
  36. + cli_credentials_set_password(profile->credentials,
  37. + profile->password, CRED_SPECIFIED);
  38. + }
  39. +
  40. + cli_credentials_guess(profile->credentials, mapi_ctx->lp_ctx);
  41. +
  42. return MAPI_E_SUCCESS;
  43. }
  44.  
  45. Index: utils/mapiprofile.c
  46. ===================================================================
  47. --- utils/mapiprofile.c (revision 2895)
  48. +++ utils/mapiprofile.c (working copy)
  49. @@ -803,7 +803,7 @@
  50.  
  51. if (create == true) {
  52. if (!profname) show_help(pc, "profile");
  53. - if (!password) show_help(pc, "password");
  54. + if (!password && !nopass) show_help(pc, "password");
  55. if (!username) show_help(pc, "username");
  56. if (!address) show_help(pc, "address");
  57. if (!domain) show_help(pc, "domain");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement