Declare variable for string literal const

newgidmap.c:87:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   87 |         policy = "deny\n";
      |                ^
This commit is contained in:
Christian Göttsche 2022-01-03 12:19:00 +01:00
parent 119cee142e
commit a74114fe34

View File

@ -76,7 +76,8 @@ static void usage(void)
static void write_setgroups(int proc_dir_fd, bool allow_setgroups)
{
int setgroups_fd;
char *policy, policy_buffer[4096];
const char *policy;
char policy_buffer[4096];
/*
* Default is "deny", and any "allow" will out-rank a "deny". We don't