summaryrefslogtreecommitdiff
path: root/quotasync.c
diff options
context:
space:
mode:
authorPetr Pisar <ppisar@redhat.com>2011-05-12 13:13:56 +0200
committerJan Kara <jack@suse.cz>2011-05-16 17:39:33 +0200
commit3ad0b3622cf92989584097787323f00bc7a36c48 (patch)
tree60f203a986e4f36d5ae7723258cec91ab277ad0c /quotasync.c
parentc3a392437a2ec4793f2b1112058de0c3b459b6fe (diff)
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 <jack@suse.cz>
Diffstat (limited to 'quotasync.c')
-rw-r--r--quotasync.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/quotasync.c b/quotasync.c
index 0ce44c9..a9e2dda 100644
--- a/quotasync.c
+++ b/quotasync.c
@@ -15,9 +15,9 @@
#define FL_GROUP 2 /* sync group quotas */
#define FL_ALL 4 /* sync quotas on all filesystems */
-int flags, fmt = -1;
-char **mnt;
-int mntcnt;
+static int flags, fmt = -1;
+static char **mnt;
+static int mntcnt;
char *progname;
static void usage(void)
@@ -79,7 +79,7 @@ static int sync_one(int type, char *dev)
return quotactl(qcmd, dev, 0, NULL);
}
-int syncquotas(int type)
+static int syncquotas(int type)
{
struct quota_handle **handles, *h;
int i, ret = 0;