mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-28 04:42:14 +01:00
113 lines
4.4 KiB
Diff
113 lines
4.4 KiB
Diff
diff --git a/grsecurity/gracl.c b/grsecurity/gracl.c
|
|
index 7ad630a..3c66319 100644
|
|
--- a/grsecurity/gracl.c
|
|
+++ b/grsecurity/gracl.c
|
|
@@ -196,7 +196,7 @@ static int prepend(char **buffer, int *buflen, const char *str, int namelen)
|
|
|
|
static int prepend_name(char **buffer, int *buflen, struct qstr *name)
|
|
{
|
|
- return prepend(buffer, buflen, name->name, name->len);
|
|
+ return prepend(buffer, buflen, (const char *)name->name, name->len);
|
|
}
|
|
|
|
static int prepend_path(const struct path *path, struct path *root,
|
|
@@ -560,7 +560,7 @@ struct name_entry *
|
|
__lookup_name_entry(const struct gr_policy_state *state, const char *name)
|
|
{
|
|
unsigned int len = strlen(name);
|
|
- unsigned int key = full_name_hash(name, len);
|
|
+ unsigned int key = full_name_hash((const unsigned char *)name, len);
|
|
unsigned int index = key % state->name_set.n_size;
|
|
struct name_entry *match;
|
|
|
|
@@ -582,7 +582,7 @@ static struct name_entry *
|
|
lookup_name_entry_create(const char *name)
|
|
{
|
|
unsigned int len = strlen(name);
|
|
- unsigned int key = full_name_hash(name, len);
|
|
+ unsigned int key = full_name_hash((const unsigned char *)name, len);
|
|
unsigned int index = key % running_polstate.name_set.n_size;
|
|
struct name_entry *match;
|
|
|
|
diff --git a/grsecurity/gracl_policy.c b/grsecurity/gracl_policy.c
|
|
index 0773423..bfcd64a 100644
|
|
--- a/grsecurity/gracl_policy.c
|
|
+++ b/grsecurity/gracl_policy.c
|
|
@@ -351,7 +351,7 @@ insert_name_entry(char *name, const u64 inode, const dev_t device, __u8 deleted)
|
|
struct name_entry **curr, *nentry;
|
|
struct inodev_entry *ientry;
|
|
unsigned int len = strlen(name);
|
|
- unsigned int key = full_name_hash(name, len);
|
|
+ unsigned int key = full_name_hash((const unsigned char *)name, len);
|
|
unsigned int index = key % polstate->name_set.n_size;
|
|
|
|
curr = &polstate->name_set.n_hash[index];
|
|
@@ -1376,7 +1376,7 @@ lookup_special_role_auth(__u16 mode, const char *rolename, unsigned char **salt,
|
|
FOR_EACH_ROLE_END(r)
|
|
|
|
for (i = 0; i < polstate->num_sprole_pws; i++) {
|
|
- if (!strcmp(rolename, polstate->acl_special_roles[i]->rolename)) {
|
|
+ if (!strcmp(rolename, (const char *)polstate->acl_special_roles[i]->rolename)) {
|
|
*salt = polstate->acl_special_roles[i]->salt;
|
|
*sum = polstate->acl_special_roles[i]->sum;
|
|
return 1;
|
|
@@ -1664,11 +1664,11 @@ write_grsec_handler(struct file *file, const char __user * buf, size_t count, lo
|
|
}
|
|
|
|
if (lookup_special_role_auth
|
|
- (gr_usermode->mode, gr_usermode->sp_role, &sprole_salt, &sprole_sum)
|
|
+ (gr_usermode->mode, (const char *)gr_usermode->sp_role, &sprole_salt, &sprole_sum)
|
|
&& ((!sprole_salt && !sprole_sum)
|
|
|| !(chkpw(gr_usermode, sprole_salt, sprole_sum)))) {
|
|
char *p = "";
|
|
- assign_special_role(gr_usermode->sp_role);
|
|
+ assign_special_role((const char *)gr_usermode->sp_role);
|
|
read_lock(&tasklist_lock);
|
|
if (current->real_parent)
|
|
p = current->real_parent->role->rolename;
|
|
diff --git a/grsecurity/grsum.c b/grsecurity/grsum.c
|
|
index 4fb2ce6..aef6b92 100644
|
|
--- a/grsecurity/grsum.c
|
|
+++ b/grsecurity/grsum.c
|
|
@@ -32,12 +32,12 @@ chkpw(struct gr_arg *entry, unsigned char *salt, unsigned char *sum)
|
|
|
|
sg_init_table(sg, 2);
|
|
sg_set_buf(&sg[0], salt, GR_SALT_LEN);
|
|
- sg_set_buf(&sg[1], entry->pw, strlen(entry->pw));
|
|
+ sg_set_buf(&sg[1], entry->pw, strlen((const char *)entry->pw));
|
|
|
|
desc.tfm = tfm;
|
|
desc.flags = 0;
|
|
|
|
- cryptres = crypto_hash_digest(&desc, sg, GR_SALT_LEN + strlen(entry->pw),
|
|
+ cryptres = crypto_hash_digest(&desc, sg, GR_SALT_LEN + strlen((const char *)entry->pw),
|
|
temp_sum);
|
|
|
|
memset(entry->pw, 0, GR_PW_LEN);
|
|
diff --git a/include/linux/sched.h b/include/linux/sched.h
|
|
index 25820d8..0491a0f 100644
|
|
--- a/include/linux/sched.h
|
|
+++ b/include/linux/sched.h
|
|
@@ -2386,7 +2386,7 @@ extern void sched_clock_init(void);
|
|
static inline void populate_stack(void)
|
|
{
|
|
struct task_struct *curtask = current;
|
|
- int c;
|
|
+ int __always_unused c;
|
|
int *ptr = curtask->stack;
|
|
int *end = curtask->stack + THREAD_SIZE;
|
|
|
|
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
|
|
index a34ab2d..70fffac 100644
|
|
--- a/include/linux/sysfs.h
|
|
+++ b/include/linux/sysfs.h
|
|
@@ -517,7 +517,7 @@ static inline void sysfs_notify_dirent(struct kernfs_node *kn)
|
|
static inline struct kernfs_node *sysfs_get_dirent(struct kernfs_node *parent,
|
|
const unsigned char *name)
|
|
{
|
|
- return kernfs_find_and_get(parent, name);
|
|
+ return kernfs_find_and_get(parent, (const char *)name);
|
|
}
|
|
|
|
static inline struct kernfs_node *sysfs_get(struct kernfs_node *kn)
|