Hello,
this patch fixes __attribute__ ((hidden)) use. The hidden_def(SYM)/hidden_proto(SYM) pair should be used for symbols that are a part of the public API; it creates hidden aliases (SYM_internal) for use within the shared library, which speeds up both dynamic linking and code execution. Symbols that are not in the public API should use "hidden" in the function declaration.

This patch replaces all incorrect uses of hidden_def/hidden_proto by "hidden" (some uses in lib/private.h are left because these symbols used to be declared in libaudit.h). It also adds hidden_def/hidden_proto macros to those public symbols that are referenced from within the libraries.
        Mirek

diff -ur audit/auparse/auditd-config.c audit-1.6.7/auparse/auditd-config.c
--- audit/auparse/auditd-config.c	2008-01-07 20:10:34.000000000 +0100
+++ audit-1.6.7/auparse/auditd-config.c	2008-02-11 18:51:23.000000000 +0100
@@ -217,7 +217,6 @@
 	fclose(f);
 	return 0;
 }
-hidden_def(load_config);
 
 static char *get_line(FILE *f, char *buf)
 {
@@ -418,5 +417,4 @@
 	free((void *)config->disk_full_exe);
 	free((void *)config->disk_error_exe);
 }
-hidden_def(free_config);
 
diff -ur audit/auparse/auparse.c audit-1.6.7/auparse/auparse.c
--- audit/auparse/auparse.c	2008-01-31 15:55:38.000000000 +0100
+++ audit-1.6.7/auparse/auparse.c	2008-02-11 18:44:22.000000000 +0100
@@ -484,6 +484,7 @@
 	au->search_where = AUSEARCH_STOP_EVENT;
 	au->search_how = AUSEARCH_RULE_CLEAR;
 }
+hidden_def(ausearch_clear)
 
 void auparse_destroy(auparse_state_t *au)
 {
@@ -1062,7 +1063,7 @@
 		}
 	}	
 }
-
+hidden_def(auparse_next_event)
 
 /* Accessors to event data */
 const au_event_t *auparse_get_timestamp(auparse_state_t *au)
@@ -1167,6 +1168,7 @@
 	
 	return 1;
 }
+hidden_def(auparse_first_record)
 
 
 int auparse_next_record(auparse_state_t *au)
@@ -1181,6 +1183,7 @@
 	else
 		return 0;
 }
+hidden_def(auparse_next_record)
 
 
 /* Accessors to record data */
@@ -1291,6 +1294,7 @@
 	}
 	return NULL;
 }
+hidden_def(auparse_find_field_next)
 
 
 /* Accessors to field data */
@@ -1314,6 +1318,7 @@
 	}
 	return NULL;
 }
+hidden_def(auparse_get_field_str)
 
 
 int auparse_get_field_int(auparse_state_t *au)
diff -ur audit/auparse/auparse.h audit-1.6.7/auparse/auparse.h
--- audit/auparse/auparse.h	2007-11-19 19:44:04.000000000 +0100
+++ audit-1.6.7/auparse/auparse.h	2008-02-11 18:46:07.000000000 +0100
@@ -32,10 +32,8 @@
 
 /* Library type definitions */
 
-#ifndef AUPARSE_INTERNAL_HEADER
 /* opaque data type used for maintaining library state */
 typedef struct opaque auparse_state_t;
-#endif
 
 typedef void (*user_destroy)(void *user_data);
 typedef void (*auparse_callback_ptr)(auparse_state_t *au,
diff -ur audit/auparse/data_buf.c audit-1.6.7/auparse/data_buf.c
--- audit/auparse/data_buf.c	2007-09-16 18:14:26.000000000 +0200
+++ audit-1.6.7/auparse/data_buf.c	2008-02-11 17:05:39.000000000 +0100
@@ -142,7 +142,6 @@
     }
     printf("\n");
 }
-hidden_def(databuf_print);
 
 int databuf_init(DataBuf *db, size_t size, unsigned flags)
 {
@@ -167,7 +166,6 @@
 
     return 1;
 }
-hidden_def(databuf_init);
 
 void databuf_free(DataBuf *db)
 {
@@ -185,7 +183,6 @@
 
     DATABUF_VALIDATE(db);
 }
-hidden_def(databuf_free);
 
 char *databuf_export(DataBuf *db)
 {
@@ -194,7 +191,6 @@
     DATABUF_VALIDATE(db);
     return db->alloc_ptr;
 }
-hidden_def(databuf_export);
 
 int databuf_append(DataBuf *db, const char *src, size_t src_size)
 {
@@ -236,7 +232,6 @@
     DATABUF_VALIDATE(db);
     return 1;
 }
-hidden_def(databuf_append);
 
 int databuf_strcat(DataBuf *db, const char *str)
 {
@@ -264,7 +259,6 @@
     DATABUF_VALIDATE(db);
     return 1;
 }
-hidden_def(databuf_strcat);
 
 int databuf_advance(DataBuf *db, size_t advance)
 {
@@ -285,7 +279,6 @@
         return -1;
     }
 }
-hidden_def(databuf_advance);
 
 
 int databuf_compress(DataBuf *db)
@@ -305,7 +298,6 @@
     DATABUF_VALIDATE(db);
     return 1;
 }
-hidden_def(databuf_compress);
 
 int databuf_reset(DataBuf *db)
 {
@@ -316,7 +308,6 @@
     if (debug) databuf_print(db, 1, "databuf_reset() exit");
     return 1;
 }
-hidden_def(databuf_reset);
 
 /*****************************************************************************/
 /*******************************  Test Program  ******************************/
diff -ur audit/auparse/data_buf.h audit-1.6.7/auparse/data_buf.h
--- audit/auparse/data_buf.h	2007-09-16 18:12:05.000000000 +0200
+++ audit-1.6.7/auparse/data_buf.h	2008-02-11 17:00:46.000000000 +0100
@@ -80,25 +80,14 @@
 /****************************  Exported Functions  ***************************/
 /*****************************************************************************/
 
-void databuf_print(DataBuf *db, int print_data, char *fmt, ...);
-int databuf_init(DataBuf *db, size_t size, unsigned flags);
-void databuf_free(DataBuf *db);
-char *databuf_export(DataBuf *db);
-int databuf_append(DataBuf *db, const char *src, size_t src_size);
-int databuf_strcat(DataBuf *db, const char *str);
-int databuf_advance(DataBuf *db, size_t advance);
-int databuf_compress(DataBuf *db);
-int databuf_reset(DataBuf *db);
-
-/* Mark these private to prevent conflict with other libraries */
-hidden_proto(databuf_print);
-hidden_proto(databuf_init);
-hidden_proto(databuf_free);
-hidden_proto(databuf_export);
-hidden_proto(databuf_append);
-hidden_proto(databuf_strcat);
-hidden_proto(databuf_advance);
-hidden_proto(databuf_compress);
-hidden_proto(databuf_reset);
+void databuf_print(DataBuf *db, int print_data, char *fmt, ...) hidden;
+int databuf_init(DataBuf *db, size_t size, unsigned flags) hidden;
+void databuf_free(DataBuf *db) hidden;
+char *databuf_export(DataBuf *db) hidden;
+int databuf_append(DataBuf *db, const char *src, size_t src_size) hidden;
+int databuf_strcat(DataBuf *db, const char *str) hidden;
+int databuf_advance(DataBuf *db, size_t advance) hidden;
+int databuf_compress(DataBuf *db) hidden;
+int databuf_reset(DataBuf *db) hidden;
 
 #endif
diff -ur audit/auparse/ellist.c audit-1.6.7/auparse/ellist.c
--- audit/auparse/ellist.c	2007-11-12 20:27:31.000000000 +0100
+++ audit-1.6.7/auparse/ellist.c	2008-02-11 17:13:19.000000000 +0100
@@ -37,7 +37,6 @@
 	l->e.serial = 0L;
 	l->e.host = NULL;
 }
-hidden_def(aup_list_create);
 
 static void aup_list_last(event_list_t *l)
 {
@@ -58,7 +57,6 @@
 		l->cur = l->cur->next;
 	return l->cur;
 }
-hidden_def(aup_list_next);
 
 /* This funtion does the heavy duty work of splitting a record into
  * its little tiny pieces */
@@ -243,7 +241,6 @@
 	// Then parse the record up into nvlist
 	return parse_up_record(r);	
 }
-hidden_def(aup_list_append);
 
 void aup_list_clear(event_list_t* l)
 {
@@ -270,7 +267,6 @@
 	free((char *)l->e.host);
 	l->e.host = NULL;      
 }
-hidden_def(aup_list_clear);
 
 /*int aup_list_get_event(event_list_t* l, au_event_t *e)
 {
@@ -285,8 +281,7 @@
 	else
 	        e->host = NULL;
 	return 1;
-}
-hidden_def(aup_list_get_event); */
+} */
 
 int aup_list_set_event(event_list_t* l, au_event_t *e)
 {
@@ -300,7 +295,6 @@
 	e->host = NULL;
 	return 1;
 }
-hidden_def(aup_list_set_event);
 
 rnode *aup_list_find_rec(event_list_t *l, int i)
 {
@@ -316,7 +310,6 @@
 	}
 	return NULL;
 }
-hidden_def(aup_list_find_rec);
 
 rnode *aup_list_find_rec_range(event_list_t *l, int low, int high)
 {
@@ -335,7 +328,6 @@
 	}
 	return NULL;
 }
-hidden_def(aup_list_find_rec_range);
 
 int aup_list_first_field(event_list_t *l)
 {
@@ -345,5 +337,4 @@
 	} else
 		return 0;
 }
-hidden_def(aup_list_first_field);
 
diff -ur audit/auparse/ellist.h audit-1.6.7/auparse/ellist.h
--- audit/auparse/ellist.h	2007-09-17 23:11:55.000000000 +0200
+++ audit-1.6.7/auparse/ellist.h	2008-02-11 17:12:19.000000000 +0100
@@ -41,38 +41,23 @@
 	au_event_t e;		// event - time & serial number
 } event_list_t;
 
-void aup_list_create(event_list_t *l);
-void aup_list_clear(event_list_t* l);
+void aup_list_create(event_list_t *l) hidden;
+void aup_list_clear(event_list_t* l) hidden;
 static inline unsigned int aup_list_get_cnt(event_list_t *l) { return l->cnt; }
 static inline void aup_list_first(event_list_t *l) { l->cur = l->head; }
 static inline rnode *aup_list_get_cur(event_list_t *l) { return l->cur; }
-rnode *aup_list_next(event_list_t *l);
-int aup_list_append(event_list_t *l, char *record, int list_idx, unsigned int line_number);
-//int aup_list_get_event(event_list_t* l, au_event_t *e);
-int aup_list_set_event(event_list_t* l, au_event_t *e);
+rnode *aup_list_next(event_list_t *l) hidden;
+int aup_list_append(event_list_t *l, char *record, int list_idx, unsigned int line_number) hidden;
+//int aup_list_get_event(event_list_t* l, au_event_t *e) hidden;
+int aup_list_set_event(event_list_t* l, au_event_t *e) hidden;
 
 /* Given a message type, find the matching node */
-rnode *aup_list_find_rec(event_list_t *l, int i);
+rnode *aup_list_find_rec(event_list_t *l, int i) hidden;
 
 /* Given two message types, find the first matching node */
-rnode *aup_list_find_rec_range(event_list_t *l, int low, int high);
+rnode *aup_list_find_rec_range(event_list_t *l, int low, int high) hidden;
 
-int aup_list_first_field(event_list_t *l);
-
-/* Make these hidden to prevent conflicts */
-hidden_proto(aup_list_create);
-hidden_proto(aup_list_clear);
-hidden_proto(aup_list_get_cnt);
-hidden_proto(aup_list_first);
-hidden_proto(aup_list_get_cur);
-hidden_proto(aup_list_next);
-hidden_proto(aup_list_append);
-hidden_proto(aup_list_set_event);
-hidden_proto(aup_list_first_field);
-// not fully exposed, but we them here
-//hidden_proto(aup_list_get_event);
-hidden_proto(aup_list_find_rec);
-hidden_proto(aup_list_find_rec_range);
+int aup_list_first_field(event_list_t *l) hidden;
 
 #endif
 
diff -ur audit/auparse/internal.h audit-1.6.7/auparse/internal.h
--- audit/auparse/internal.h	2007-09-05 20:27:55.000000000 +0200
+++ audit-1.6.7/auparse/internal.h	2008-02-11 18:56:48.000000000 +0100
@@ -63,7 +63,7 @@
 	const char *name;
 };
 
-typedef struct opaque
+struct opaque
 {
 	ausource_t source;		// Source type
 	char **source_list;		// Array of buffers, or array of
@@ -94,20 +94,11 @@
 
 	// function to call when user_data is destroyed
 	void (*callback_user_data_destroy)(void *user_data);
-}auparse_state_t;
-
-// This is the main messaging function used internally
-extern int audit_send_user_message(int fd, int type, const char *message);
-
-// libaudit.c
-hidden_proto(audit_send_user_message)
+};
 
 // auditd-config.c
-hidden_proto(load_config)
-hidden_proto(free_config)
-
-// rlist.c
-hidden_proto(aurule_next)
+int load_config(struct daemon_conf *config, log_test_t lt) hidden;
+void free_config(struct daemon_conf *config) hidden;
 
 
 #ifdef __cplusplus
diff -ur audit/auparse/interpret.c audit-1.6.7/auparse/interpret.c
--- audit/auparse/interpret.c	2007-09-18 16:36:49.000000000 +0200
+++ audit-1.6.7/auparse/interpret.c	2008-02-11 17:22:15.000000000 +0100
@@ -284,7 +284,6 @@
 	nvpair_clear(&uid_nvl); 
 	uid_list_created = 0;
 }
-hidden_def(aulookup_destroy_uid_list);
 
 static nvpair gid_nvl;
 static int gid_list_created=0;
@@ -334,7 +333,6 @@
 	nvpair_clear(&gid_nvl); 
 	gid_list_created = 0;
 }
-hidden_def(aulookup_destroy_gid_list);
 
 static const char *print_uid(const char *val)
 {
@@ -1212,4 +1210,3 @@
 
 	return out;
 }
-hidden_def(interpret);
diff -ur audit/auparse/message.c audit-1.6.7/auparse/message.c
--- audit/auparse/message.c	2007-04-09 23:50:01.000000000 +0200
+++ audit-1.6.7/auparse/message.c	2008-02-11 17:26:40.000000000 +0100
@@ -56,4 +56,3 @@
 	}
         va_end( ap );
 }
-hidden_def(audit_msg)
diff -ur audit/auparse/nvlist.c audit-1.6.7/auparse/nvlist.c
--- audit/auparse/nvlist.c	2007-04-09 23:50:01.000000000 +0200
+++ audit-1.6.7/auparse/nvlist.c	2008-02-11 17:24:55.000000000 +0100
@@ -34,7 +34,6 @@
 	l->cur = NULL;
 	l->cnt = 0;
 }
-hidden_def(nvlist_create);
 
 static void nvlist_last(nvlist *l)
 {
@@ -55,7 +54,6 @@
 		l->cur = l->cur->next;
 	return l->cur;
 }
-hidden_def(nvlist_next);
 
 void nvlist_append(nvlist *l, nvnode *node)
 {
@@ -84,7 +82,6 @@
 	l->cur = newnode;
 	l->cnt++;
 }
-hidden_def(nvlist_append);
 
 int nvlist_find_name(nvlist *l, const char *name)
 {
@@ -100,7 +97,6 @@
 	}
 	return 0;
 }
-hidden_def(nvlist_find_name);
 
 const char *nvlist_interp_cur_val(const rnode *r)
 {
@@ -109,7 +105,6 @@
 		return l->cur->interp_val;
 	return interpret(r);
 }
-hidden_def(nvlist_interp_cur_val);
 
 void nvlist_clear(nvlist* l)
 {
@@ -129,5 +124,3 @@
 	l->cur = NULL;
 	l->cnt = 0;
 }
-hidden_def(nvlist_clear);
-
diff -ur audit/auparse/nvlist.h audit-1.6.7/auparse/nvlist.h
--- audit/auparse/nvlist.h	2007-04-09 23:50:01.000000000 +0200
+++ audit-1.6.7/auparse/nvlist.h	2008-02-11 17:24:43.000000000 +0100
@@ -31,35 +31,20 @@
 #include "ellist.h"
 
 
-void nvlist_create(nvlist *l);
-void nvlist_clear(nvlist* l);
+void nvlist_create(nvlist *l) hidden;
+void nvlist_clear(nvlist* l) hidden;
 static inline unsigned int nvlist_get_cnt(nvlist *l) { return l->cnt; }
 static inline void nvlist_first(nvlist *l) { l->cur = l->head; }
 static inline nvnode *nvlist_get_cur(const nvlist *l) { return l->cur; }
-nvnode *nvlist_next(nvlist *l);
+nvnode *nvlist_next(nvlist *l) hidden;
 static inline const char *nvlist_get_cur_name(const nvlist *l) {return l->cur->name;}
 static inline const char *nvlist_get_cur_val(const nvlist *l) {return l->cur->val;}
 static inline const char *nvlist_get_cur_val_interp(const nvlist *l) {return l->cur->interp_val;}
-const char *nvlist_interp_cur_val(const rnode *r);
-void nvlist_append(nvlist *l, nvnode *node);
+const char *nvlist_interp_cur_val(const rnode *r) hidden;
+void nvlist_append(nvlist *l, nvnode *node) hidden;
 
 /* Given a numeric index, find that record. */
-int nvlist_find_name(nvlist *l, const char *name);
-
-
-/* Make these hidden to prevent conflicts */
-hidden_proto(nvlist_create);
-hidden_proto(nvlist_clear);
-hidden_proto(nvlist_get_cnt);
-hidden_proto(nvlist_first);
-hidden_proto(nvlist_get_cur);
-hidden_proto(nvlist_next);
-hidden_proto(nvlist_get_cur_name);
-hidden_proto(nvlist_get_cur_val);
-hidden_proto(nvlist_get_cur_val_interp);
-hidden_proto(nvlist_interp_cur_val);
-hidden_proto(nvlist_append);
-hidden_proto(nvlist_find_name);
+int nvlist_find_name(nvlist *l, const char *name) hidden;
 
 #endif
 
diff -ur audit/auparse/nvpair.c audit-1.6.7/auparse/nvpair.c
--- audit/auparse/nvpair.c	2007-04-09 23:50:01.000000000 +0200
+++ audit-1.6.7/auparse/nvpair.c	2008-02-11 17:25:18.000000000 +0100
@@ -32,7 +32,6 @@
 	l->cur = NULL;
 	l->cnt = 0;
 }
-hidden_def(nvpair_create);
 
 static void nvpair_last(nvpair *l)
 {
@@ -73,7 +72,6 @@
 	l->cur = newnode;
 	l->cnt++;
 }
-hidden_def(nvpair_append);
 
 int nvpair_find_val(nvpair *l, long val)
 {
@@ -89,7 +87,6 @@
 	}
 	return 0;
 }
-hidden_def(nvpair_find_val);
 
 void nvpair_clear(nvpair *l)
 {
@@ -107,5 +104,4 @@
 	l->cur = NULL;
 	l->cnt = 0;
 }
-hidden_def(nvpair_clear);
 
diff -ur audit/auparse/nvpair.h audit-1.6.7/auparse/nvpair.h
--- audit/auparse/nvpair.h	2007-04-09 23:50:01.000000000 +0200
+++ audit-1.6.7/auparse/nvpair.h	2008-02-11 17:25:11.000000000 +0100
@@ -45,20 +45,12 @@
   unsigned int cnt;	// How many items in this list
 } nvpair;
 
-void nvpair_create(nvpair *l);
+void nvpair_create(nvpair *l) hidden;
 static inline void nvpair_first(nvpair *l) { l->cur = l->head; }
 static inline nvpnode *nvpair_get_cur(nvpair *l) { return l->cur; }
-void nvpair_append(nvpair *l, nvpnode *node);
-void nvpair_clear(nvpair *l);
-int nvpair_find_val(nvpair *l, long val);
-
-/* Make these hidden to prevent conflicts */
-hidden_proto(nvpair_create);
-hidden_proto(nvpair_first);
-hidden_proto(nvpair_get_cur);
-hidden_proto(nvpair_append);
-hidden_proto(nvpair_clear);
-hidden_proto(nvpair_find_val);
+void nvpair_append(nvpair *l, nvpnode *node) hidden;
+void nvpair_clear(nvpair *l) hidden;
+int nvpair_find_val(nvpair *l, long val) hidden;
 
 
 #endif
diff -ur audit/auparse/private.h audit-1.6.7/auparse/private.h
--- audit/auparse/private.h	2007-04-09 23:50:01.000000000 +0200
+++ audit-1.6.7/auparse/private.h	2008-02-11 18:46:53.000000000 +0100
@@ -22,6 +22,9 @@
 #ifndef _PRIVATE_H_
 #define _PRIVATE_H_
 
+#include "auparse.h"
+#include "libaudit.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -48,14 +51,21 @@
 /* Internal syslog messaging */
 #define audit_msg auparse_msg
 #define set_aumessage_mode set_aup_message_mode
-void auparse_msg(int priority, const char *fmt, ...)
+void auparse_msg(int priority, const char *fmt, ...) hidden
 #ifdef __GNUC__
         __attribute__ ((format (printf, 2, 3)));
 #else
         ;
 #endif
+void set_aumessage_mode(message_t mode, debug_message_t debug) hidden;
 
-hidden_proto(audit_msg)
+// auparse.c
+hidden_proto(auparse_find_field_next);
+hidden_proto(auparse_first_record);
+hidden_proto(auparse_get_field_str);
+hidden_proto(auparse_next_event);
+hidden_proto(auparse_next_record);
+hidden_proto(ausearch_clear);
 
 #ifdef __cplusplus
 }
diff -ur audit/auparse/rlist.c audit-1.6.7/auparse/rlist.c
--- audit/auparse/rlist.c	2007-11-19 19:44:04.000000000 +0100
+++ audit-1.6.7/auparse/rlist.c	2008-02-11 17:27:44.000000000 +0100
@@ -33,7 +33,6 @@
 	l->cur = NULL;
 	l->cnt = 0;
 }
-hidden_def(aurule_create);
 
 static void aurule_last(aurule_list_t *l)
 {
@@ -73,7 +72,6 @@
 	l->cur = newnode;
 	l->cnt++;
 }
-hidden_def(aurule_append);
 
 void aurule_clear(aurule_list_t *l)
 {
@@ -94,7 +92,6 @@
 	l->cur = NULL;
 	l->cnt = 0;
 }
-hidden_def(aurule_clear);
 
 aurulenode *aurule_next(aurule_list_t *l)
 {
@@ -102,5 +99,4 @@
         	l->cur = l->cur->next;
         return l->cur;
 }
-hidden_def(aurule_next);
 
diff -ur audit/auparse/rlist.h audit-1.6.7/auparse/rlist.h
--- audit/auparse/rlist.h	2007-11-19 19:44:04.000000000 +0100
+++ audit-1.6.7/auparse/rlist.h	2008-02-11 17:27:35.000000000 +0100
@@ -54,20 +54,12 @@
   unsigned int cnt;	// How many items in this list
 } aurule_list_t;
 
-void aurule_create(aurule_list_t *l);
+void aurule_create(aurule_list_t *l) hidden;
 static inline void aurule_first(aurule_list_t *l) { l->cur = l->head; }
 static inline aurulenode *aurule_get_cur(aurule_list_t *l) { return l->cur; }
-void aurule_append(aurule_list_t *l, aurulenode *node);
-void aurule_clear(aurule_list_t *l);
-aurulenode *aurule_next(aurule_list_t *l);
-
-/* Make these hidden to prevent conflicts */
-hidden_proto(aurule_create);
-hidden_proto(aurule_first);
-hidden_proto(aurule_get_cur);
-hidden_proto(aurule_append);
-hidden_proto(aurule_clear);
-hidden_proto(aurule_next);
+void aurule_append(aurule_list_t *l, aurulenode *node) hidden;
+void aurule_clear(aurule_list_t *l) hidden;
+aurulenode *aurule_next(aurule_list_t *l) hidden;
 
 #endif
 
diff -ur audit/lib/deprecated.c audit-1.6.7/lib/deprecated.c
--- audit/lib/deprecated.c	2007-12-31 15:03:56.000000000 +0100
+++ audit-1.6.7/lib/deprecated.c	2008-02-11 16:50:30.000000000 +0100
@@ -32,10 +32,10 @@
 #include "libaudit.h"
 #include "private.h"
 
-extern int audit_archadded;
-extern int audit_syscalladded;
-extern unsigned int audit_elf;
-extern int audit_priority(int xerrno);
+extern int audit_archadded hidden;
+extern int audit_syscalladded hidden;
+extern unsigned int audit_elf hidden;
+extern int audit_priority(int xerrno) hidden;
 
 int audit_request_rules_list(int fd)
 {
diff -ur audit/lib/libaudit.c audit-1.6.7/lib/libaudit.c
--- audit/lib/libaudit.c	2007-12-31 15:04:19.000000000 +0100
+++ audit-1.6.7/lib/libaudit.c	2008-02-11 16:53:20.000000000 +0100
@@ -74,9 +74,9 @@
   { NULL,		0 }
 };
 
-int audit_archadded = 0;
-int audit_syscalladded = 0;
-unsigned int audit_elf = 0U;
+int audit_archadded hidden = 0;
+int audit_syscalladded hidden = 0;
+unsigned int audit_elf hidden = 0U;
 static struct libaudit_conf config;
 
 static int audit_failure_parser(const char *val, int line);
@@ -90,7 +90,7 @@
 };
 
 /* FIXME: Make this static again after deprecated functions no longer need it */
-int audit_priority(int xerrno)
+int hidden audit_priority(int xerrno)
 {
 	/* If they've compiled their own kernel and did not include
 	 * the audit susbsystem, they will get ECONNREFUSED. We'll
@@ -109,6 +109,7 @@
 			"Error sending status request (%s)", strerror(-rc));
 	return rc;
 }
+hidden_def(audit_request_status)
 
 /*
  * Set everything to its default value
@@ -580,6 +581,7 @@
 
 	return  0;
 }
+hidden_def(audit_add_watch_dir)
 
 int audit_add_rule_data(int fd, struct audit_rule_data *rule,
                         int flags, int action)
@@ -735,6 +737,7 @@
 	rule->mask[word] |= bit;
 	return 0;
 }
+hidden_def(audit_rule_syscall_data)
 
 int audit_rule_syscallbyname_data(struct audit_rule_data *rule,
                                   const char *scall)
@@ -762,6 +765,7 @@
 		return audit_rule_syscall_data(rule, nr);
 	return -1;
 }
+hidden_def(audit_rule_syscallbyname_data)
 
 int audit_rule_fieldpair_data(struct audit_rule_data **rulep, const char *pair,
                               int flags)
@@ -1112,4 +1116,4 @@
 		return audit_name_to_machine(uts.machine);
 	return -1;
 }
-
+hidden_def(audit_detect_machine)
diff -ur audit/lib/lookup_table.c audit-1.6.7/lib/lookup_table.c
--- audit/lib/lookup_table.c	2007-12-29 14:38:21.000000000 +0100
+++ audit-1.6.7/lib/lookup_table.c	2008-02-11 16:55:03.000000000 +0100
@@ -376,6 +376,7 @@
 	return audit_lookup_name(fieldtab, fieldtab_msgstr.str,
                                  AUDIT_FIELD_NAMES, field);
 }
+hidden_def(audit_name_to_field)
 
 const char *audit_field_to_name(int field)
 {
@@ -419,6 +420,7 @@
 	}
 	return -1;
 }
+hidden_def(audit_name_to_syscall)
 
 const char *audit_syscall_to_name(int sc, int machine)
 {
@@ -510,18 +512,21 @@
 	}
 	return -1;
 }
+hidden_def(audit_name_to_msg_type)
 
 const char *audit_msg_type_to_name(int msg_type)
 {
 	return audit_lookup_number(msg_typetab, msg_typetab_msgstr.str,
 				   AUDIT_MSG_TYPE_NAMES, msg_type);
 }
+hidden_def(audit_msg_type_to_name)
 
 int audit_name_to_machine(const char *machine)
 {
 	return audit_lookup_name(machinetab, machinetab_msgstr.str,
 				 AUDIT_MACHINE_NAMES, machine);
 }
+hidden_def(audit_name_to_machine)
 
 const char *audit_machine_to_name(int machine)
 {
@@ -538,6 +543,7 @@
 			return elftab[i].lvalue;
 	return 0;
 }
+hidden_def(audit_machine_to_elf)
 
 int audit_elf_to_machine(unsigned int elf)
 {
@@ -547,6 +553,7 @@
 		if (elftab[i].lvalue == elf) return elftab[i].key;
 	return -1;
 }
+hidden_def(audit_elf_to_machine)
 
 const char *audit_operator_to_symbol(int op)
 {
@@ -558,6 +565,7 @@
 	return audit_lookup_number(optab, optab_msgstr.str,
 				   AUDIT_NUM_OPERATORS, op);
 }
+hidden_def(audit_operator_to_symbol)
 
 /* This function returns 0 on error, otherwise the converted value */
 int audit_name_to_errno(const char *error)
@@ -575,6 +583,7 @@
 
 	return rc*minus;
 }
+hidden_def(audit_name_to_errno)
 
 /* This function does not handle negative numbers yet */
 const char *audit_errno_to_name(int error)
diff -ur audit/lib/message.c audit-1.6.7/lib/message.c
--- audit/lib/message.c	2007-04-09 23:50:01.000000000 +0200
+++ audit-1.6.7/lib/message.c	2008-02-11 16:31:33.000000000 +0100
@@ -56,4 +56,3 @@
 	}
         va_end( ap );
 }
-hidden_def(audit_msg)
diff -ur audit/lib/netlink.c audit-1.6.7/lib/netlink.c
--- audit/lib/netlink.c	2007-10-02 23:54:46.000000000 +0200
+++ audit-1.6.7/lib/netlink.c	2008-02-11 16:44:54.000000000 +0100
@@ -130,6 +130,7 @@
 		len = -errno;
 	return len; 
 }
+hidden_def(audit_get_reply)
 
 
 /* 
@@ -245,7 +246,6 @@
 
 	return 0;
 }
-hidden_def(audit_send)
 
 /*
  * This function will take a peek into the next packet and see if there's
diff -ur audit/lib/private.h audit-1.6.7/lib/private.h
--- audit/lib/private.h	2007-04-09 23:50:01.000000000 +0200
+++ audit-1.6.7/lib/private.h	2008-02-11 16:55:20.000000000 +0100
@@ -48,7 +48,7 @@
 typedef enum { REAL_ERR, HIDE_IT } hide_t;
 
 /* Internal syslog messaging */
-void audit_msg(int priority, const char *fmt, ...)
+void audit_msg(int priority, const char *fmt, ...) hidden
 #ifdef __GNUC__
 	__attribute__ ((format (printf, 2, 3)));
 #else
@@ -56,13 +56,16 @@
 #endif
 
 /* General */
-extern int audit_send(int fd, int type, const void *data, unsigned int size);
+extern int audit_send(int fd, int type, const void *data, unsigned int size)
+	hidden;
 
 // This is the main messaging function used internally
+// Don't hide it, it used to be a part of the public API!
 extern int audit_send_user_message(int fd, int type, hide_t hide_err, 
 	const char *message);
 
 // Newly deprecated
+// Don't hide them, they used to be a part of the public API!
 extern int  audit_request_rules_list(int fd);
 extern int  audit_add_rule(int fd, struct audit_rule *rule,
 				int flags, int action);
@@ -75,12 +78,6 @@
 				int flags);
 extern void audit_rule_free(struct audit_rule *rule);
 
-// message.c
-hidden_proto(audit_msg);
-
-// netlink.c
-hidden_proto(audit_send);
-
 // libaudit.c
 hidden_proto(audit_send_user_message);
 hidden_proto(audit_request_rules_list);
@@ -90,6 +87,25 @@
 hidden_proto(audit_rule_syscallbyname);
 hidden_proto(audit_rule_fieldpair);
 hidden_proto(audit_rule_free);
+hidden_proto(audit_add_watch_dir);
+hidden_proto(audit_detect_machine);
+hidden_proto(audit_request_status);
+hidden_proto(audit_rule_syscall_data);
+hidden_proto(audit_rule_syscallbyname_data);
+
+// lookup_table.c
+hidden_proto(audit_elf_to_machine);
+hidden_proto(audit_machine_to_elf);
+hidden_proto(audit_msg_type_to_name);
+hidden_proto(audit_name_to_errno);
+hidden_proto(audit_name_to_field);
+hidden_proto(audit_name_to_machine);
+hidden_proto(audit_name_to_msg_type);
+hidden_proto(audit_name_to_syscall);
+hidden_proto(audit_operator_to_symbol);
+
+// netlink.c
+hidden_proto(audit_get_reply);
 
 // FIXME delete after bumping soname number
 extern int audit_log_avc(int fd, int type, const char *fmt, va_list ap); //dbus,nscd
--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit

Reply via email to