Skip Menu |
 

Subject: krb5-1.6-pre: fix warnings/ improve 64bit compatibility in the ldap plugin
fix some "implicite declaration" and "differ in signedness"
warnings. Improve 64bit compatibility.
#
# fix some "implicite declaration" and "differ in signedness"
# warnings. Improve 64bit compatibility.
#
--- src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c
+++ src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c 2006/10/17 11:18:38
@@ -32,11 +32,15 @@
#include "kdb_ldap.h"
#include "ldap_misc.h"
#include "ldap_err.h"
+#include "ldap_handle.h"

#ifdef NEED_STRPTIME_PROTO
extern char *strptime (const char *, const char *, struct tm *);
#endif

+/* forward declaration */
+krb5_error_code remove_overlapping_subtrees(char **listin, char ***listop, int *subtcount, int sscope);
+
/* Linux (GNU Libc) provides a length-limited variant of strdup.
But all the world's not Linux. */
#undef strndup
@@ -550,7 +554,7 @@
void *value;
{
unsigned int currlen=0, tldatalen=0;
- char *curr=NULL;
+ unsigned char *curr=NULL;
void *reallocptr=NULL;

tl_data->tl_data_type = KDB_TL_USER_INFO;
@@ -573,7 +577,7 @@
free (reallocptr);
return ENOMEM;
}
- curr = (char *) (tl_data->tl_data_contents + currlen);
+ curr = (unsigned char *) (tl_data->tl_data_contents + currlen);

/* store the tl_type value */
memset(curr, tl_type, 1);
@@ -604,7 +608,7 @@
free (reallocptr);
return ENOMEM;
}
- curr = (char *) (tl_data->tl_data_contents + currlen);
+ curr = (unsigned char *) (tl_data->tl_data_contents + currlen);

/* store the tl_type value */
memset(curr, tl_type, 1);
@@ -1587,7 +1591,8 @@
krb5_error_code
krb5_ldap_get_reference_count (krb5_context context, char *dn, char *refattr,
int *count, LDAP *ld) {
- int i, ntrees, st = 0, tempst = 0, gothandle = 0;
+ int st = 0, tempst = 0, gothandle = 0;
+ unsigned int i, ntrees;
char *refcntattr[2];
char *filter = NULL;
char **subtree = NULL, *ptr = NULL;
--- src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c
+++ src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c 2006/10/17 11:19:00
@@ -32,6 +32,7 @@
#include "ldap_realm.h"
#include "ldap_principal.h"
#include "ldap_err.h"
+#include "ldap_pwd_policy.h"

#define END_OF_LIST -1
char *realm_attributes[] = {"krbSearchScope","krbSubTrees", "krbPrincContainerRef",
@@ -99,7 +100,7 @@
* Function to remove all special characters from a string (rfc2254).
* Use whenever exact matching is to be done ...
*/
-char *ldap_filter_correct (unsigned char *in, unsigned int len)
+char *ldap_filter_correct (char *in, unsigned int len)
{
int i, count;
char *out, *ptr;
--- src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.h
+++ src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.h 2006/10/17 11:19:14
@@ -101,4 +101,7 @@
krb5_error_code
krb5_ldap_delete_realm_1(krb5_context, char *, char **);

+char *
+ldap_filter_correct (char *in, unsigned int len);
+
#endif
From: raeburn@mit.edu
Subject: SVN Commit
Some related changes were already in, and I found a couple more to make:

* ldap_realm.c (ldap_filter_correct): Change string argument to char *. Delete
length argument, which was always strlen of the string argument, and compute
it locally, using size_t instead of (unsigned) int for length-related values.
Update all calls.

* ldap_realm.h (ldap_filter_correct): Updated declaration.

* ldap_misc.c (remove_overlapping_subtrees): Add forward declaration. Make
static.
(is_principal_in_realm): Change local variable defrealmlen to size_t.
(store_tl_data): Change local variable curr to point to unsigned char, since
that's what the tl_data_contents array is declared as, and what the STORE16_INT
macro is happier with.
(krb5_ldap_get_reference_count): Make local variable i unsigned.


Commit By: raeburn



Revision: 19009
Changed Files:
U trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c
U trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c
U trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.h
From: tlyu@mit.edu
Subject: SVN Commit
Download (untitled) / with headers
text/plain 1.1KiB
pull up r19009 from trunk

r19009@cathode-dark-space: raeburn | 2006-12-21 20:26:59 -0500
ticket: 4453
target_version: 1.6
tags: pullup

Some related changes were already in, and I found a couple more to make:

* ldap_realm.c (ldap_filter_correct): Change string argument to char *. Delete
length argument, which was always strlen of the string argument, and compute
it locally, using size_t instead of (unsigned) int for length-related values.
Update all calls.

* ldap_realm.h (ldap_filter_correct): Updated declaration.

* ldap_misc.c (remove_overlapping_subtrees): Add forward declaration. Make
static.
(is_principal_in_realm): Change local variable defrealmlen to size_t.
(store_tl_data): Change local variable curr to point to unsigned char, since
that's what the tl_data_contents array is declared as, and what the STORE16_INT
macro is happier with.
(krb5_ldap_get_reference_count): Make local variable i unsigned.




Commit By: tlyu



Revision: 19010
Changed Files:
_U branches/krb5-1-6/
U branches/krb5-1-6/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c
U branches/krb5-1-6/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c
U branches/krb5-1-6/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.h