Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: libmapi/IProfAdmin.c
- ===================================================================
- --- libmapi/IProfAdmin.c (revision 2895)
- +++ libmapi/IProfAdmin.c (working copy)
- @@ -64,7 +64,7 @@
- msg = res->msgs[0];
- profile->username = ldb_msg_find_attr_as_string(msg, "username", NULL);
- - profile->password = password ? password : ldb_msg_find_attr_as_string(msg, "password", "");
- + profile->password = password ? password : ldb_msg_find_attr_as_string(msg, "password", NULL);
- profile->workstation = ldb_msg_find_attr_as_string(msg, "workstation", NULL);
- profile->realm = ldb_msg_find_attr_as_string(msg, "realm", NULL);
- profile->domain = ldb_msg_find_attr_as_string(msg, "domain", NULL);
- @@ -80,7 +80,7 @@
- profile->method = ldb_msg_find_attr_as_int(msg, "method", 0);
- profile->exchange_version = ldb_msg_find_attr_as_int(msg, "exchange_version", 0);
- - if (!profile->password) return MAPI_E_INVALID_PARAMETER;
- + /* if (!profile->password) return MAPI_E_INVALID_PARAMETER; */
- return MAPI_E_SUCCESS;
- }
- @@ -752,12 +752,19 @@
- profile->credentials = cli_credentials_init(mem_ctx);
- OPENCHANGE_RETVAL_IF(!profile->credentials, MAPI_E_NOT_ENOUGH_RESOURCES, NULL);
- - cli_credentials_set_username(profile->credentials, profile->username, CRED_SPECIFIED);
- - cli_credentials_set_password(profile->credentials, profile->password, CRED_SPECIFIED);
- +
- cli_credentials_set_workstation(profile->credentials, profile->workstation, CRED_SPECIFIED);
- cli_credentials_set_realm(profile->credentials, profile->realm, CRED_SPECIFIED);
- cli_credentials_set_domain(profile->credentials, profile->domain, CRED_SPECIFIED);
- + cli_credentials_set_username(profile->credentials, profile->username, CRED_SPECIFIED);
- + if (profile->password) {
- + cli_credentials_set_password(profile->credentials,
- + profile->password, CRED_SPECIFIED);
- + }
- +
- + cli_credentials_guess(profile->credentials, mapi_ctx->lp_ctx);
- +
- return MAPI_E_SUCCESS;
- }
- Index: utils/mapiprofile.c
- ===================================================================
- --- utils/mapiprofile.c (revision 2895)
- +++ utils/mapiprofile.c (working copy)
- @@ -803,7 +803,7 @@
- if (create == true) {
- if (!profname) show_help(pc, "profile");
- - if (!password) show_help(pc, "password");
- + if (!password && !nopass) show_help(pc, "password");
- if (!username) show_help(pc, "username");
- if (!address) show_help(pc, "address");
- if (!domain) show_help(pc, "domain");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement