From 3ad0b3622cf92989584097787323f00bc7a36c48 Mon Sep 17 00:00:00 2001 From: Petr Pisar Date: Thu, 12 May 2011 13:13:56 +0200 Subject: Make global symbols static as possible There are some calls (e.g. getpwnam(3)) that can lead to dlopening other libraries that could jump to symbol with name clashing to one of global quota symbols. (e.g. Name server switch plug-in nss_db calls dirname(3) that's already defined in edquota.c and tht can cause segmentation fault.) Although it's not possible to solve all these problems, making as much as possible global objects and functions static is the best thing we can do to avoid name space polution. Signed-off-by: Jan Kara --- convertquota.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'convertquota.c') diff --git a/convertquota.c b/convertquota.c index 1e40804..483abf1 100644 --- a/convertquota.c +++ b/convertquota.c @@ -29,12 +29,12 @@ #define ACT_FORMAT 1 /* Convert format from old to new */ #define ACT_ENDIAN 2 /* Convert endianity */ -char *mntpoint; +static char *mntpoint; char *progname; -int ucv, gcv; -struct quota_handle *qn; /* Handle of new file */ -int action; /* Action to be performed */ -int infmt, outfmt; +static int ucv, gcv; +static struct quota_handle *qn; /* Handle of new file */ +static int action; /* Action to be performed */ +static int infmt, outfmt; static void usage(void) { -- cgit v1.2.1