Changeset: a7b565049fd9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a7b565049fd9 Modified Files: monetdb5/modules/mal/remote.c Branch: remote_auth Log Message:
Signal to MAPI that the password is hashed This should fix the test sql/test/BugTracker-2015/local-remotetable-crash.Bug-3754 that was broken. diffs (27 lines): diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c --- a/monetdb5/modules/mal/remote.c +++ b/monetdb5/modules/mal/remote.c @@ -279,10 +279,22 @@ RMTconnectURI(Client cntxt, MalBlkPtr mb rethrow("remote.connect", tmp, AUTHgetRemoteTableCredentials(uri, cntxt, &remoteuser, &passwd)); - msg = RMTconnectScen(&ret, &uri, &remoteuser, &passwd, &scen); + /* The password we just got is hashed. Add the byte \1 in front to + * signal this fact to the mapi. */ + size_t pwlen = strlen(passwd); + char *pwhash = (char*)GDKmalloc(pwlen + 2); + if (pwhash == NULL) { + GDKfree(remoteuser); + GDKfree(passwd); + throw(MAL, "remote.connect", SQLSTATE(HY001) MAL_MALLOC_FAIL); + } + snprintf(pwhash, pwlen + 2, "\1%s", passwd); + + msg = RMTconnectScen(&ret, &uri, &remoteuser, &pwhash, &scen); GDKfree(remoteuser); GDKfree(passwd); + GDKfree(pwhash); if (msg == MAL_SUCCEED) { v = &stk->stk[pci->argv[0]]; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list