diff options
author | Petr Pisar <ppisar@redhat.com> | 2011-05-12 13:13:56 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2011-05-16 17:39:33 +0200 |
commit | 3ad0b3622cf92989584097787323f00bc7a36c48 (patch) | |
tree | 60f203a986e4f36d5ae7723258cec91ab277ad0c /quota_nld.c | |
parent | c3a392437a2ec4793f2b1112058de0c3b459b6fe (diff) | |
download | linuxquota-3ad0b3622cf92989584097787323f00bc7a36c48.tar.gz |
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 'quota_nld.c')
-rw-r--r-- | quota_nld.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/quota_nld.c b/quota_nld.c index 538702d..de9504e 100644 --- a/quota_nld.c +++ b/quota_nld.c @@ -62,8 +62,8 @@ static struct nla_policy quota_nl_warn_cmd_policy[QUOTA_NL_A_MAX+1] = { #define FL_NODAEMON 4 #define FL_PRINTBELOW 8 -int flags; -DBusConnection *dhandle; +static int flags; +static DBusConnection *dhandle; static const struct option options[] = { { "version", 0, NULL, 'V' }, @@ -75,7 +75,7 @@ static const struct option options[] = { { NULL, 0, NULL, 0 } }; -void show_help(void) +static void show_help(void) { errstr(_("Usage: %s [options]\nOptions are:\n\ -h --help shows this text\n\ |