X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibrewrite%2Fxmap.c;h=fbc73d0bf4050d9011c9535128d42adfb843d56d;hb=fe8e3b7efa1a3abd22f3c9ebf4b82ae28f270d74;hp=876c4dadea45a659ed894e665c9f09c5f8ee531e;hpb=fbba83b20f3a645b2dc19b8ec4a0026f71f5b15c;p=openldap
diff --git a/libraries/librewrite/xmap.c b/libraries/librewrite/xmap.c
index 876c4dadea..fbc73d0bf4 100644
--- a/libraries/librewrite/xmap.c
+++ b/libraries/librewrite/xmap.c
@@ -1,7 +1,7 @@
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software .
*
- * Copyright 2000-2003 The OpenLDAP Foundation.
+ * Copyright 2000-2006 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,6 +25,7 @@
#include
#endif
+#define LDAP_DEPRECATED 1
#include "rewrite-int.h"
#include "rewrite-map.h"
@@ -94,7 +95,7 @@ rewrite_xmap_parse(
* Experimental file map:
* looks up key in a `key value' ascii file
*/
- } else if ( strncasecmp(s, "xfile", 5 ) == 0 ) {
+ } else if ( strncasecmp( s, "xfile", 5 ) == 0 ) {
char *filename;
const char *p;
int l;
@@ -258,11 +259,11 @@ rewrite_xmap_apply(
ldap_pvt_thread_mutex_unlock( &xpasswd_mutex );
#endif /* USE_REWRITE_LDAP_PVT_THREADS */
- rc = REWRITE_NO_SUCH_OBJECT;
+ rc = LDAP_NO_SUCH_OBJECT;
break;
}
-#ifdef HAVE_PW_GECOS
+#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
if ( pwd->pw_gecos != NULL && pwd->pw_gecos[0] != '\0' ) {
int l = strlen( pwd->pw_gecos );
@@ -278,7 +279,7 @@ rewrite_xmap_apply(
}
val->bv_len = l;
} else
-#endif /* HAVE_PW_GECOS */
+#endif /* HAVE_STRUCT_PASSWD_PW_GECOS */
{
val->bv_val = strdup( key->bv_val );
val->bv_len = key->bv_len;
@@ -436,8 +437,8 @@ rewrite_xmap_destroy(
{
struct rewrite_map *map;
- assert( pmap );
- assert( *pmap );
+ assert( pmap != NULL );
+ assert( *pmap != NULL );
map = *pmap;