Hi there,
I'm updating the experimental packages for dbmail-2 (sorry for the
long delay).
I've had to fix some typos in authldap.c
Patch attached for your building pleasure. Ilja, can you commit this
please ?
--
________________________________________________________________
Paul Stevens [EMAIL PROTECTED]
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl
--- dbmail_cvs/auth/authldap.c 2003-12-03 11:03:50.000000000 +0100
+++ dbmail/auth/authldap.c 2003-12-03 12:51:17.000000000 +0100
@@ -25,6 +25,7 @@
#include "config.h"
#endif
+#include "assert.h"
#include "auth.h"
#include "dbmail.h"
#include "db.h"
@@ -40,7 +41,7 @@
#define AUTH_QUERY_SIZE 1024
-extern char *configFile;
+static char *configFile = DEFAULT_CONFIG_FILE;
LDAP *_ldap_conn;
LDAPMod **_ldap_mod;
@@ -88,6 +89,8 @@
trace(TRACE_DEBUG, #func ": value for " #val " stored in " #var "
as [%s]", var)
/* that's correct, no final ; so when the macro is called, it
looks "normal" */
+static void __auth_get_config(void);
+
static void __auth_get_config()
{
struct list ldapItems;
@@ -181,6 +184,7 @@
* calls. OTOH, if the calls are always far between, we'd
* rather just be connected strictly as needed...
*/
+int auth_reconnect(void);
int auth_reconnect()
{
/* Destroy the old... */
@@ -628,7 +632,7 @@
id_char = __auth_get_first_match( query, fields );
*user_idnr = ( id_char ) ? strtoull( id_char, NULL, 0 ) : 0;
- trace(TRACE_DEBUG, "auth_user_exists(): returned value is [%llu]",
id );
+ trace(TRACE_DEBUG, "auth_user_exists(): returned value is [%llu]",
user_idnr );
if( id_char ) free( id_char );
@@ -686,7 +690,7 @@
cid_char = __auth_get_first_match( query, fields );
*client_idnr = ( cid_char ) ? strtoull( cid_char, NULL, 0 ) : 0;
- trace(TRACE_DEBUG, "auth_getclientid(): returned value is [%llu]",
cid );
+ trace(TRACE_DEBUG, "auth_getclientid(): returned value is [%llu]",
client_idnr );
if( cid_char ) free( cid_char );
@@ -742,7 +746,7 @@
* return -2 on mem error, -1 on db-error, 0 on success */
int auth_get_known_users(struct list *users)
{
- u64_t known;
+ int64_t known;
/* u64_t curr; unused variable */
char query[AUTH_QUERY_SIZE];
char *fields[] = { _ldap_cfg.field_uid, NULL };
@@ -1675,7 +1679,7 @@
if( ldap_err )
{
trace(TRACE_ERROR,"auth_validate(): ldap_bind_s failed: %s",
ldap_err2string( ldap_err ) );
- id = 0;
+ user_idnr = 0;
}
else
{
@@ -1715,11 +1719,11 @@
// struct list templist;
// struct element *tempelem1, *tempelem2, *tempelem3;
//
-// /* do the first entry here */
+// // do the first entry here
// tempelem1 = list_getstart( retlist );
// count1 = retlist->total_nodes;
//
-// /* we'll get the next entry at the _end_ of the loop! */
+// // we'll get the next entry at the _end_ of the loop!
// printf( "retlist has %d nodes\n", retlist->total_nodes );
// for( c1 = 0; c1 < count1; c1++ )
// {