Wed, 31 Jul 2013 11:35:57 +0200
fixed solaris build
configure | file | annotate | diff | comparison | revisions | |
make/solaris.mk | file | annotate | diff | comparison | revisions | |
src/server/daemon/ldap_auth.c | file | annotate | diff | comparison | revisions | |
src/server/webdav/parser.c | file | annotate | diff | comparison | revisions |
--- a/configure Tue Jul 16 12:14:13 2013 +0200 +++ b/configure Wed Jul 31 11:35:57 2013 +0200 @@ -35,8 +35,8 @@ HOST=`uname -n` INSTALL_DIR=`pwd`/work -OPENSSL_CFLAGS=`pkg-config --cflags openssl` -OPENSSL_LDFLAGS=`pkg-config --libs openssl` +LIBS_CFLAGS=`pkg-config --cflags libxml-2.0 openssl` +LIBS_LDFLAGS=`pkg-config --libs libxml-2.0 openssl` # create config.mk echo "generate config.mk" @@ -72,8 +72,8 @@ include \$(BUILD_ROOT)/make/$CCONF include \$(BUILD_ROOT)/make/$PLATFORM -CFLAGS += $OPENSSL_CFLAGS -LDFLAGS += $OPENSSL_LDFLAGS +CFLAGS += $LIBS_CFLAGS +LDFLAGS += $LIBS_LDFLAGS " >> config.mk
--- a/make/solaris.mk Tue Jul 16 12:14:13 2013 +0200 +++ b/make/solaris.mk Wed Jul 31 11:35:57 2013 +0200 @@ -28,7 +28,7 @@ # compiler and linker flags - +CFLAGS += -DSOLARIS LDFLAGS += -lsendfile -lposix4 -lpthread -ldl -lm -lxerces-c -lldap PLUGINS = java
--- a/src/server/daemon/ldap_auth.c Tue Jul 16 12:14:13 2013 +0200 +++ b/src/server/daemon/ldap_auth.c Wed Jul 31 11:35:57 2013 +0200 @@ -36,6 +36,14 @@ #include "ldap_auth.h" +static void ws_ldap_close(LDAP *ldap) { +#ifdef SOLARIS + ldap_unbind(ldap); +#else + ldap_unbind_ext_s(ld, NULL, NULL); +#endif +} + AuthDB* create_ldap_authdb(char *name, LDAPConfig *conf) { LDAPAuthDB *authdb = malloc(sizeof(LDAPAuthDB)); authdb->authdb.name = strdup(name); @@ -92,8 +100,8 @@ NULL, &server_cred); if (r != LDAP_SUCCESS) { - //ldap_unbind(ld); - ldap_unbind_ext_s(ld, NULL, NULL); + ws_ldap_close(ld); + fprintf(stderr, "ldap_simple_bind_s failed: %s\n", ldap_err2string(r)); return NULL; } @@ -122,8 +130,8 @@ 1, // size limit &result); if (r != LDAP_SUCCESS) { - //ldap_unbind(ld); - ldap_unbind_ext_s(ld, NULL, NULL); + ws_ldap_close(ld); + fprintf(stderr, "ldap_search_ext_s failed\n"); return NULL; } @@ -150,7 +158,7 @@ } } - ldap_unbind_ext_s(ld, NULL, NULL); + ws_ldap_close(ld); return NULL; } @@ -188,7 +196,6 @@ LDAPUser *user = (LDAPUser*)u; ldap_memfree(user->userdn); // TODO: use connection pool - //ldap_unbind(user->ldap); - ldap_unbind_ext_s(user->ldap, NULL, NULL); + ws_ldap_close(user->ldap); free(user); }
--- a/src/server/webdav/parser.c Tue Jul 16 12:14:13 2013 +0200 +++ b/src/server/webdav/parser.c Wed Jul 31 11:35:57 2013 +0200 @@ -111,7 +111,7 @@ } else if(p->davPropTag && !p->rq->allprop && depth == 2) { DavProperty *property = pool_malloc(pool, sizeof(DavProperty)); property->xmlns = xmlnsmap_put(p->rq->nsmap, (char*)ns); - property->name = pool_strdup(pool, name); + property->name = pool_strdup(pool, (const char*)name); // add property to DavRequest UcxDlist *elm = pool_malloc(pool, sizeof(UcxDlist));