Changeset: 32303447e717 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=32303447e717
Modified Files:
sql/backends/monet5/Makefile.ag
sql/backends/monet5/sql_user.c
Branch: sciql
Log Message:
merged with default
diffs (112 lines):
diff --git a/clients/mapilib/Makefile.ag b/clients/mapilib/Makefile.ag
--- a/clients/mapilib/Makefile.ag
+++ b/clients/mapilib/Makefile.ag
@@ -18,7 +18,7 @@
MTSAFE
INCLUDES = ../../common/options ../../common/stream ../../common/utils \
- $(openssl_CFLAGS) $(MSGCONTROL_FLAGS)
+ $(MSGCONTROL_FLAGS)
lib_mapi = {
VERSION = $(MAPI_VERSION)
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -831,10 +831,6 @@ _CRTIMP char *__cdecl crypt(const char *
# endif
#endif
-#include <openssl/md5.h>
-#include <openssl/sha.h>
-#include <openssl/ripemd.h>
-
#ifndef INVALID_SOCKET
#define INVALID_SOCKET (-1)
#endif
diff --git a/common/utils/Makefile.ag b/common/utils/Makefile.ag
--- a/common/utils/Makefile.ag
+++ b/common/utils/Makefile.ag
@@ -19,6 +19,8 @@
MTSAFE
+INCLUDES = $(openssl_CFLAGS)
+
lib_mutils = {
NOINST
SOURCES = mutils.c mutils.h
diff --git a/monetdb5/mal/Makefile.ag b/monetdb5/mal/Makefile.ag
--- a/monetdb5/mal/Makefile.ag
+++ b/monetdb5/mal/Makefile.ag
@@ -21,7 +21,7 @@ INCLUDES = ../misc \
../../common/utils \
../../clients/mapilib \
../../gdk \
- $(READLINE_INCS) $(openssl_CFLAGS)
+ $(READLINE_INCS)
MTSAFE
lib_mal = {
diff --git a/sql/backends/monet5/Makefile.ag b/sql/backends/monet5/Makefile.ag
--- a/sql/backends/monet5/Makefile.ag
+++ b/sql/backends/monet5/Makefile.ag
@@ -31,6 +31,7 @@ INCLUDES = ../../include ../../common ..
../../../clients/mapilib \
../../../common/options \
../../../common/stream \
+ ../../../common/utils \
../../../gdk \
$(RDF_INC) \
$(READLINE_INCS)
diff --git a/sql/backends/monet5/sql_user.c b/sql/backends/monet5/sql_user.c
--- a/sql/backends/monet5/sql_user.c
+++ b/sql/backends/monet5/sql_user.c
@@ -31,6 +31,7 @@
#include "sql_mvc.h"
#include "bat5.h"
#include "mal_authorize.h"
+#include "mcrypt.h"
#if 0
int
@@ -111,10 +112,10 @@ monet5_create_user(ptr _mvc, str user, s
BUNins(scens, "sql", 0, FALSE);
bid = BBPcacheid(scens);
if (!enc) {
- int len = (int) strlen(passwd);
- if ((ret = AUTHBackendSum(&pwd, &passwd, &len)) != MAL_SUCCEED)
{
+ pwd = mcrypt_BackendSum(passwd, strlen(passwd));
+ if (pwd != NULL) {
BBPunfix(bid);
- return ret;
+ throw(MAL, "sql.create_user", "crypt backend hash not
found");
}
} else {
pwd = passwd;
@@ -277,19 +278,15 @@ monet5_alter_user(ptr _mvc, str user, st
str pwd = NULL;
str opwd = NULL;
if (!enc) {
- int len = (int) strlen(passwd);
- if ((err = AUTHBackendSum(&pwd, &passwd, &len)) !=
MAL_SUCCEED) {
- (void)sql_error(m, 02, "ALTER USER: %s", err);
- GDKfree(err);
+ pwd = mcrypt_BackendSum(passwd, strlen(passwd));
+ if (pwd == NULL) {
+ (void)sql_error(m, 02, "ALTER USER: crypt
backend hash not found");
return FALSE;
}
if (oldpasswd != NULL) {
- len = (int)strlen(oldpasswd);
- if ((err = AUTHBackendSum(&opwd, &oldpasswd,
&len))
- != MAL_SUCCEED)
- {
- (void)sql_error(m, 02, "ALTER USER:
%s", err);
- GDKfree(err);
+ opwd = mcrypt_BackendSum(oldpasswd,
strlen(oldpasswd));
+ if (opwd == NULL) {
+ (void)sql_error(m, 02, "ALTER USER:
crypt backend hash not found");
return FALSE;
}
}
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list