Skip to contentSkip to conversation

rpc.idmap: Hide global symbols from libidmap plugins

PATCH In review Steve Dickson 1 participant 2 messages Mar 15, 2012 – Mar 16, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rpc.idmap: Hide global symbols from libidmap plugins

From: Noah Friedman <[email protected]>

This patch limits the visibility of the symbols in the nfs-utils conffile.c so that they are only visible to programs linked directly to it. This forces the objects dynamically loaded via libnfsidmap to use the functions defined in that shared library instead.

---
 support/nfs/conffile.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
support/nfs/conffile.c +2 -0
index 2f1e235..5015e94 100644
@@ -49,6 +49,8 @@
 #include "conffile.h"
 #include "xlog.h"
 
+#pragma GCC visibility push(hidden)
+
 static void conf_load_defaults(void);
 static int conf_set(int , char *, char *, char *, 
 	char *, int , int );
Signature · 1 line
1.7.7.6
#1 lore raw
Quoted 8 lines · Steve Dickson

From: Noah Friedman <[email protected]>

This patch limits the visibility of the symbols in the nfs-utils conffile.c so that they are only visible to programs linked directly to it. This forces the objects dynamically loaded via libnfsidmap to use the functions defined in that shared library instead.

Committed...

steved.

Quoted 17 lines
---
 support/nfs/conffile.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
support/nfs/conffile.c +2 -0
index 2f1e235..5015e94 100644
@@ -49,6 +49,8 @@
 #include "conffile.h"
 #include "xlog.h"
 
+#pragma GCC visibility push(hidden)
+
 static void conf_load_defaults(void);
 static int conf_set(int , char *, char *, char *, 
 	char *, int , int );