mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-16 17:46:54 +00:00
policycoreutils: fix most gcc -Wwrite-strings warnings
Acked-by: Steve Lawrence <slawrence@tresys.com>
This commit is contained in:
parent
aad0962be2
commit
188a028f74
@ -166,7 +166,7 @@ static char *build_new_range(char *newlevel, const char *range)
|
||||
#include <security/pam_appl.h> /* for PAM functions */
|
||||
#include <security/pam_misc.h> /* for misc_conv PAM utility function */
|
||||
|
||||
char *service_name = "newrole";
|
||||
const char *service_name = "newrole";
|
||||
|
||||
/* authenticate_via_pam()
|
||||
*
|
||||
|
@ -65,9 +65,9 @@
|
||||
const char *homedir;
|
||||
static int master_fd = -1;
|
||||
|
||||
static char *server_watch_file = "/etc/selinux/restorecond.conf";
|
||||
static char *user_watch_file = "/etc/selinux/restorecond_user.conf";
|
||||
static char *watch_file;
|
||||
static const char *server_watch_file = "/etc/selinux/restorecond.conf";
|
||||
static const char *user_watch_file = "/etc/selinux/restorecond_user.conf";
|
||||
static const char *watch_file;
|
||||
static struct restore_opts r_opts;
|
||||
|
||||
#include <selinux/selinux.h>
|
||||
|
@ -49,7 +49,7 @@ unsigned int utmpwatcher_handle(int inotify_fd, int wd)
|
||||
{
|
||||
int changed = 0;
|
||||
struct utmp u;
|
||||
char *utmp_path = "/var/run/utmp";
|
||||
const char *utmp_path = "/var/run/utmp";
|
||||
struct stringsList *prev_utmp_ptr = utmp_ptr;
|
||||
if (wd != utmp_wd)
|
||||
return -1;
|
||||
|
@ -22,7 +22,7 @@
|
||||
char *progname = NULL;
|
||||
extern char *optarg;
|
||||
|
||||
static void usage(char *prog)
|
||||
static void usage(const char *prog)
|
||||
{
|
||||
printf("usage: %s -o <output file> -m <module> [-f <file contexts>]\n",
|
||||
prog);
|
||||
@ -37,8 +37,8 @@ static void usage(char *prog)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static int file_to_policy_file(char *filename, struct sepol_policy_file **pf,
|
||||
char *mode)
|
||||
static int file_to_policy_file(const char *filename, struct sepol_policy_file **pf,
|
||||
const char *mode)
|
||||
{
|
||||
FILE *f;
|
||||
|
||||
|
@ -20,7 +20,7 @@ static void usage(void)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static int file_to_policy_file(char *filename, struct sepol_policy_file **pf, char *mode)
|
||||
static int file_to_policy_file(const char *filename, struct sepol_policy_file **pf, const char *mode)
|
||||
{
|
||||
FILE *f;
|
||||
|
||||
|
@ -146,12 +146,12 @@ int main(int argc, char **argv)
|
||||
{
|
||||
struct stat sb;
|
||||
int opt, i = 0;
|
||||
char *input_filename = NULL;
|
||||
const char *input_filename = NULL;
|
||||
int use_input_file = 0;
|
||||
char *buf = NULL;
|
||||
size_t buf_len;
|
||||
int recurse; /* Recursive descent. */
|
||||
char *base;
|
||||
const char *base;
|
||||
int mass_relabel = 0, errors = 0;
|
||||
|
||||
memset(&r_opts, 0, sizeof(r_opts));
|
||||
|
Loading…
Reference in New Issue
Block a user