mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-03 04:02:05 +00:00
policycoreutils: mark local functions static
setfiles.c:50:6: warning: no previous prototype for ‘set_rootpath’ [-Wmissing-prototypes] 50 | void set_rootpath(const char *arg) | ^~~~~~~~~~~~ setfiles.c:67:5: warning: no previous prototype for ‘canoncon’ [-Wmissing-prototypes] 67 | int canoncon(char **contextp) | ^~~~~~~~ newrole.c:185:5: warning: no previous prototype for ‘authenticate_via_pam’ [-Wmissing-prototypes] 185 | int authenticate_via_pam(const char *ttyn, pam_handle_t * pam_handle) | ^~~~~~~~~~~~~~~~~~~~ run_init.c:241:5: warning: no previous prototype for ‘authenticate_user’ [-Wmissing-prototypes] 241 | int authenticate_user(void) | ^~~~~~~~~~~~~~~~~ run_init.c:306:5: warning: no previous prototype for ‘get_init_context’ [-Wmissing-prototypes] 306 | int get_init_context(char **context) | ^~~~~~~~~~~~~~~~ sestatus.c:38:5: warning: no previous prototype for ‘cmp_cmdline’ [-Wmissing-prototypes] 38 | int cmp_cmdline(const char *command, int pid) | ^~~~~~~~~~~ sestatus.c:62:5: warning: no previous prototype for ‘pidof’ [-Wmissing-prototypes] 62 | int pidof(const char *command) | ^~~~~ sestatus.c:95:6: warning: no previous prototype for ‘load_checks’ [-Wmissing-prototypes] 95 | void load_checks(char *pc[], int *npc, char *fc[], int *nfc) | ^~~~~~~~~~~ sestatus.c:171:6: warning: no previous prototype for ‘printf_tab’ [-Wmissing-prototypes] 171 | void printf_tab(const char *outp) | ^~~~~~~~~~ Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
parent
8a8275a5ac
commit
081ac391ad
@ -182,7 +182,7 @@ const char *service_name = "newrole";
|
||||
* program. This is the only function in this program that makes PAM
|
||||
* calls.
|
||||
*/
|
||||
int authenticate_via_pam(const char *ttyn, pam_handle_t * pam_handle)
|
||||
static int authenticate_via_pam(const char *ttyn, pam_handle_t * pam_handle)
|
||||
{
|
||||
|
||||
int result = 0; /* set to 0 (not authenticated) by default */
|
||||
@ -348,7 +348,7 @@ static int read_pam_config(void)
|
||||
* This function uses the shadow passwd file to thenticate the user running
|
||||
* this program.
|
||||
*/
|
||||
int authenticate_via_shadow_passwd(const char *uname)
|
||||
static int authenticate_via_shadow_passwd(const char *uname)
|
||||
{
|
||||
struct spwd *p_shadow_line;
|
||||
char *unencrypted_password_s;
|
||||
|
@ -86,8 +86,6 @@
|
||||
/* The file containing the context to run
|
||||
* the scripts under. */
|
||||
|
||||
int authenticate_via_pam(const struct passwd *);
|
||||
|
||||
/* authenticate_via_pam()
|
||||
*
|
||||
* in: p_passwd_line - struct containing data from our user's line in
|
||||
@ -104,7 +102,7 @@ int authenticate_via_pam(const struct passwd *);
|
||||
*
|
||||
*/
|
||||
|
||||
int authenticate_via_pam(const struct passwd *p_passwd_line)
|
||||
static int authenticate_via_pam(const struct passwd *p_passwd_line)
|
||||
{
|
||||
|
||||
int result = 0; /* our result, set to 0 (not authenticated) by default */
|
||||
@ -169,8 +167,6 @@ int authenticate_via_pam(const struct passwd *p_passwd_line)
|
||||
|
||||
#define PASSWORD_PROMPT _("Password:") /* prompt for getpass() */
|
||||
|
||||
int authenticate_via_shadow_passwd(const struct passwd *);
|
||||
|
||||
/* authenticate_via_shadow_passwd()
|
||||
*
|
||||
* in: p_passwd_line - struct containing data from our user's line in
|
||||
@ -187,7 +183,7 @@ int authenticate_via_shadow_passwd(const struct passwd *);
|
||||
*
|
||||
*/
|
||||
|
||||
int authenticate_via_shadow_passwd(const struct passwd *p_passwd_line)
|
||||
static int authenticate_via_shadow_passwd(const struct passwd *p_passwd_line)
|
||||
{
|
||||
|
||||
struct spwd *p_shadow_line; /* struct derived from shadow passwd file line */
|
||||
@ -238,7 +234,7 @@ int authenticate_via_shadow_passwd(const struct passwd *p_passwd_line)
|
||||
* return: 0 When success
|
||||
* -1 When failure
|
||||
*/
|
||||
int authenticate_user(void)
|
||||
static int authenticate_user(void)
|
||||
{
|
||||
|
||||
#define INITLEN 255
|
||||
@ -303,7 +299,7 @@ int authenticate_user(void)
|
||||
* out: The CONTEXT associated with the context.
|
||||
* return: 0 on success, -1 on failure.
|
||||
*/
|
||||
int get_init_context(char **context)
|
||||
static int get_init_context(char **context)
|
||||
{
|
||||
|
||||
FILE *fp;
|
||||
|
@ -35,7 +35,7 @@ static unsigned int COL = 32;
|
||||
|
||||
extern char *selinux_mnt;
|
||||
|
||||
int cmp_cmdline(const char *command, int pid)
|
||||
static int cmp_cmdline(const char *command, int pid)
|
||||
{
|
||||
|
||||
char buf[BUFSIZE];
|
||||
@ -59,7 +59,7 @@ int cmp_cmdline(const char *command, int pid)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pidof(const char *command)
|
||||
static int pidof(const char *command)
|
||||
{
|
||||
/* inspired by killall5.c from psmisc */
|
||||
char stackpath[PATH_MAX + 1], *p;
|
||||
@ -92,7 +92,7 @@ int pidof(const char *command)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void load_checks(char *pc[], int *npc, char *fc[], int *nfc)
|
||||
static void load_checks(char *pc[], int *npc, char *fc[], int *nfc)
|
||||
{
|
||||
|
||||
FILE *fp = fopen(CONF, "r");
|
||||
@ -168,7 +168,7 @@ void load_checks(char *pc[], int *npc, char *fc[], int *nfc)
|
||||
return;
|
||||
}
|
||||
|
||||
void printf_tab(const char *outp)
|
||||
static void printf_tab(const char *outp)
|
||||
{
|
||||
printf("%-*s", COL, outp);
|
||||
|
||||
|
@ -47,7 +47,7 @@ static __attribute__((__noreturn__)) void usage(const char *const name)
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
void set_rootpath(const char *arg)
|
||||
static void set_rootpath(const char *arg)
|
||||
{
|
||||
if (strlen(arg) == 1 && strncmp(arg, "/", 1) == 0) {
|
||||
fprintf(stderr, "%s: invalid alt_rootpath: %s\n",
|
||||
@ -64,7 +64,7 @@ void set_rootpath(const char *arg)
|
||||
}
|
||||
}
|
||||
|
||||
int canoncon(char **contextp)
|
||||
static int canoncon(char **contextp)
|
||||
{
|
||||
char *context = *contextp, *tmpcon;
|
||||
int rc = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user