Declare file local functions static

This commit is contained in:
Christian Göttsche 2022-01-03 12:41:13 +01:00
parent eccf1c569c
commit f84b8530c5
7 changed files with 7 additions and 7 deletions

View File

@ -29,7 +29,7 @@ bool nss_is_initialized() {
return atomic_load(&nss_init_completed);
}
void nss_exit() {
static void nss_exit() {
if (nss_is_initialized() && subid_nss) {
dlclose(subid_nss->handle);
free(subid_nss);

View File

@ -11,7 +11,7 @@
const char *Prog;
void usage(void)
static void usage(void)
{
fprintf(stderr, "Usage: %s [-g] user start count\n", Prog);
fprintf(stderr, " Release a user's subuid (or with -g, subgid) range\n");

View File

@ -8,7 +8,7 @@
const char *Prog;
void usage(void)
static void usage(void)
{
fprintf(stderr, "Usage: [-g] %s subuid\n", Prog);
fprintf(stderr, " list uids who own the given subuid\n");

View File

@ -9,7 +9,7 @@
const char *Prog;
void usage(void)
static void usage(void)
{
fprintf(stderr, "Usage: %s [-g] user\n", Prog);
fprintf(stderr, " list subuid ranges for user\n");

View File

@ -11,7 +11,7 @@
const char *Prog;
void usage(void)
static void usage(void)
{
fprintf(stderr, "Usage: %s [-g] [-n] user count\n", Prog);
fprintf(stderr, " Find a subuid (or with -g, subgid) range for user\n");

View File

@ -73,7 +73,7 @@ static void usage(void)
exit(EXIT_FAILURE);
}
void write_setgroups(int proc_dir_fd, bool allow_setgroups)
static void write_setgroups(int proc_dir_fd, bool allow_setgroups)
{
int setgroups_fd;
char *policy, policy_buffer[4096];

View File

@ -62,7 +62,7 @@ static void verify_ranges(struct passwd *pw, int ranges,
}
}
void usage(void)
static void usage(void)
{
fprintf(stderr, _("usage: %s <pid> <uid> <loweruid> <count> [ <uid> <loweruid> <count> ] ... \n"), Prog);
exit(EXIT_FAILURE);