Pārlūkot izejas kodu

Ticket #47700 - Unresolved external symbol references break loading of the ACL plugin

Description of problem by [email protected]:
Various functions in the directory server are declared with extern "C"
linkage, causing the compiler to emit references to an unmangled symbol
name, but because their definitions don't match the declarations, and
the definitions are compiled using the C++ compiler, the implementations
are emitted as mangled symbols.

Fix description: Using ld option "-z defs", cleaned all the undefined
references.

https://fedorahosted.org/389/ticket/47700

Reviewed by [email protected] (Thank you, Rich!!)
Noriko Hosoi 11 gadi atpakaļ
vecāks
revīzija
16386dde80
3 mainītis faili ar 3 papildinājumiem un 14 dzēšanām
  1. 2 2
      include/base/ereport.h
  2. 0 10
      include/libaccess/aclerror.h
  3. 1 2
      include/libaccess/acleval.h

+ 2 - 2
include/base/ereport.h

@@ -65,13 +65,13 @@ NSPR_BEGIN_EXTERN_C
  * the current date.
  */
 
-NSAPI_PUBLIC int INTereport(int degree, const char *fmt, ...)
+NSAPI_PUBLIC int INTereport(int degree, char *fmt, ...)
 #ifdef __GNUC__ 
         __attribute__ ((format (printf, 2, 3)));
 #else
         ;
 #endif
-NSAPI_PUBLIC int INTereport_v(int degree, const char *fmt, va_list args);
+NSAPI_PUBLIC int INTereport_v(int degree, char *fmt, va_list args);
 
 NSPR_END_EXTERN_C
 

+ 0 - 10
include/libaccess/aclerror.h

@@ -219,16 +219,6 @@ NSPR_END_EXTERN_C
 /* ACL_DatabaseRegister */
 #define ACLERR4500	4500		/* database name is missing */
 
-/* ACL_ReadDbMapFile */
-#define	ACLERR4600	4600		/* Error reading the Map file */
-#define	ACLERR4610	4610		/* Couldn't determine dbtype */
-#define	ACLERR4620	4620		/* Missing URL for database */
-#define	ACLERR4630	4630		/* Invalid proprty pair */
-#define	ACLERR4640	4640		/* Register database failed */
-#define	ACLERR4650	4650		/* Default database not LDAP */
-#define	ACLERR4660	4660		/* Multiple default databases */
-#define	ACLERR4670	4670		/* No default database */
-
 /* LASDnsBuild */
 #define	ACLERR4700	4700		/* Cannot allocatae hash */
 #define	ACLERR4710	4710		/* Cannot add token to hash */

+ 1 - 2
include/libaccess/acleval.h

@@ -63,8 +63,7 @@
 NSPR_BEGIN_EXTERN_C
 
 /* Functions in acleval.c */
-extern int aclDNSLookup(DNSFilter_t * dnf,
-			char * dnsspec, int fqdn, char **match);
+extern int aclDNSLookup(DNSFilter_t * dnf, const char * dnsspec, int fqdn, const char **match);
 extern int aclIPLookup(IPFilter_t * ipf, IPAddr_t ipaddr, void **match);
 extern int aclUserLookup(UidUser_t * uup, UserObj_t * uoptr);
 extern int aclEvaluate(ACL_t * acl, USI_t arid, ClAuth_t * clauth, int * padn);