[Fedora-directory-commits] mod_admserv mod_admserv.c,1.25,1.26
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/mod_admserv
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1621
Modified Files:
mod_admserv.c
Log Message:
[197757] ��� Strange random 'Cannot Connect to the Directory Server - Invalid Credentials' message (comment #9)
Changes [Change(1) and (2) in Comment#2]:
1) updated the auth_user_cache after all the password update is successfully
done.
2) eliminated unnecessary ldap_search.
Index: mod_admserv.c
===================================================================
RCS file: /cvs/dirsec/mod_admserv/mod_admserv.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- mod_admserv.c 15 Jun 2006 17:00:29 -0000 1.25
+++ mod_admserv.c 17 Jul 2006 19:01:29 -0000 1.26
@@ -110,6 +110,7 @@
static int sync_task_sie_data(const char *name, char *query, void *arg, request_rec *r);
static int change_sie_password(const char *name, char *query, void* arg, request_rec *r);
+static int create_auth_users_cache_entry(char *user, char *userDN, const char *userPW, char *ldapURL);
static int admserv_check_user_id(request_rec *r);
@@ -1141,13 +1142,13 @@
* Return value: if successful, 1; otherwise, 0 is returned.
*/
static int
-task_update_registry_server_bindpw(char *uid, char *password, char* bindpw)
+task_update_registry_server_bindpw(char *uid, char *password,
+ const char* bindpw, request_rec *r)
{
LDAP *ld;
int ldapError;
- char *filter = NULL;
- char *userDN = NULL;
- LDAPMessage *result;
+ char *ldapURL = NULL;
+ const char *userDN = NULL;
LDAPMod mod, *mods[2];
char *vals[2];
char *attrs[2];
@@ -1160,35 +1161,7 @@
return rval;
}
- filter = (char *)malloc(strlen(uid) + 5); /* "uid=<uid>" */
- if (NULL == filter) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
- "task_update_registry_server_bindpw(): cannot allocate %d byte memory",
- strlen(uid) + 5);
- goto bailout;
- }
- attrs[0] = "dn"; /* we just need dn ... */
- attrs[1] = NULL;
- sprintf(filter, "uid=%s", uid);
- ldapError = ldap_search_s(ld, NETSCAPE_ROOT_BASEDN, LDAP_SCOPE_SUBTREE,
- filter, attrs, 0, &result);
- if (ldapError != LDAP_SUCCESS || ldap_count_entries(ld, result) == 0) {
- ldap_msgfree(result);
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
- "task_update_registry_server_bindpw(): ldap_search %s under %s failed: %s",
- filter, NETSCAPE_ROOT_BASEDN, ldap_err2string(ldapError));
- goto bailout;
- } else {
- LDAPMessage *entry = ldap_first_entry(ld, result);
- userDN = ldap_get_dn(ld, entry);
- ldap_msgfree(result);
- }
- if (NULL == userDN || 0 == strlen(userDN)) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
- "task_update_registry_server_bindpw(): ldap_search %s under %s returned %s",
- filter, NETSCAPE_ROOT_BASEDN, userDN?"empty string":"NULL");
- goto bailout;
- }
+ userDN = apr_table_get(r->notes, RQ_NOTES_USERDN);
/* authenticate to LDAP server */
if (LDAP_SUCCESS != (ldapError = ldap_simple_bind_s(ld, userDN, bindpw))) {
@@ -1229,13 +1202,16 @@
userDN, ldap_err2string(ldapError));
goto bailout;
}
+ /* update the auth_users cache */
+ ldapURL = formLdapURL(®istryServer, r->pool);
+ create_auth_users_cache_entry(uid, (char *)userDN, password, ldapURL);
registryServer.bindPW = password;
rval = 1;
bailout:
closeLDAPConnection(ld);
- if (NULL != filter)
- free(filter);
+ if (NULL != ldapURL)
+ free(ldapURL);
return rval;
}
@@ -1245,16 +1221,16 @@
static int
change_sie_password(const char *name, char *query, void* arg, request_rec *r)
{
- FILE *f;
- char *uid=NULL ,*pw=NULL, *col=NULL;
- char *newpw=query;
- char filename[BIG_LINE];
- char inbuf[BIG_LINE];
- char outbuf[64]; /* needs at least 36 bytes */
- char path[PATH_MAX];
- char *origpw = apr_table_get(r->notes, RQ_NOTES_USERPW);
- int ds_done = 0;
- int admpwd_done = 0;
+ FILE *f;
+ char *uid=NULL ,*pw=NULL, *col=NULL;
+ char *newpw=query;
+ char filename[BIG_LINE];
+ char inbuf[BIG_LINE];
+ char outbuf[64]; /* needs at least 36 bytes */
+ char path[PATH_MAX];
+ char *origpw = (char *)apr_table_get(r->notes, RQ_NOTES_USERPW);
+ int ds_done = 0;
+ int admpwd_done = 0;
apr_snprintf(path, sizeof(path), "%s%cadmin-serv%cconfig",
serverroot, FILE_PATHSEP, FILE_PATHSEP);
@@ -1303,7 +1279,7 @@
}
admpwd_done = 1;
- if (!task_update_registry_server_bindpw(uid, strdup(newpw), origpw)) {
+ if (!task_update_registry_server_bindpw(uid, strdup(newpw), origpw, r)) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
"failed to update server bindpw");
goto recover;
16 years, 6 months
[Fedora-directory-commits] coolkey/src/coolkey machdep.cpp,1.1,1.2
by Doctor Conrad
Author: rrelyea
Update of /cvs/dirsec/coolkey/src/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14747/src/coolkey
Modified Files:
machdep.cpp
Log Message:
fix pthread issue.
Index: machdep.cpp
===================================================================
RCS file: /cvs/dirsec/coolkey/src/coolkey/machdep.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- machdep.cpp 9 Jun 2006 18:39:11 -0000 1.1
+++ machdep.cpp 13 Jul 2006 21:32:39 -0000 1.2
@@ -328,7 +328,7 @@
pthread_mutex_t mutex;
};
-static pthread_mutexattr_t OSLock_attr;
+static pthread_mutexattr_t OSLock_attr = {0};
static int OSLock_attr_init = 0;
OSLock::OSLock(bool exceptionAllowed)
@@ -336,6 +336,7 @@
int rc;
lockData = NULL;
+#ifdef MAC
if (!OSLock_attr_init) {
rc = pthread_mutexattr_init(&OSLock_attr);
if (rc < 0) {
@@ -347,6 +348,7 @@
}
OSLock_attr_init = 1;
}
+#endif
lockData = new OSLockData;
if (lockData) {
rc = pthread_mutex_init(&lockData->mutex, &OSLock_attr);
16 years, 6 months
[Fedora-directory-commits] coolkey coolkey.spec,1.4,1.5
by Doctor Conrad
Author: rrelyea
Update of /cvs/dirsec/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14747
Modified Files:
coolkey.spec
Log Message:
fix pthread issue.
Index: coolkey.spec
===================================================================
RCS file: /cvs/dirsec/coolkey/coolkey.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- coolkey.spec 12 Jun 2006 20:51:32 -0000 1.4
+++ coolkey.spec 13 Jul 2006 21:32:39 -0000 1.5
@@ -18,7 +18,7 @@
# END COPYRIGHT BLOCK
Name: coolkey
-Version: 1.0.0
+Version: 1.0.1
Release: 1
Summary: CoolKey PKCS #11 module
License: LGPL
@@ -30,8 +30,10 @@
BuildRequires: zlib-devel
Requires: pcsc-lite
Requires: ifd-egate
+Requires: ccid
Provides: CoolKey Openkey
Obsoletes: CoolKey Openkey
+ExcludeArch: s390 s390x # 390 does not have libusb or smartCards
%description
Linux Driver support for the CoolKey and CAC products.
@@ -81,5 +83,11 @@
%changelog
+* Mon Jul 10 2006 Bob Relyea <rrelyea(a)redhat.com> - 1.0.1-1
+- Don't require pthread library in coolkey
+
+* Mon Jul 10 2006 Bob Relyea <rrelyea(a)redhat.com> - 1.0.0-2
+- remove s390 from the build
+
* Mon Jun 5 2006 Bob Relyea <rrelyea(a)redhat.com> - 1.0.0-1
- Initial revision for fedora
16 years, 6 months
[Fedora-directory-commits] mod_nss nss_engine_config.c,1.11,1.12
by Doctor Conrad
Author: rcritten
Update of /cvs/dirsec/mod_nss
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4330
Modified Files:
nss_engine_config.c
Log Message:
197681
Initialize the ECC certificate and key pointers to NULL.
Index: nss_engine_config.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_config.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- nss_engine_config.c 20 Jun 2006 20:25:20 -0000 1.11
+++ nss_engine_config.c 5 Jul 2006 15:20:00 -0000 1.12
@@ -82,6 +82,8 @@
mctx->nickname = NULL;
#ifdef NSS_ENABLE_ECC
mctx->eccnickname = NULL;
+ mctx->eccservercert = NULL;
+ mctx->eccserverkey = NULL;
#endif
mctx->servercert = NULL;
mctx->serverkey = NULL;
16 years, 7 months