Advertisement
arter97

Untitled

Jan 9th, 2024
997
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.73 KB | None | 0 0
  1. diff --git a/drivers/kernelsu/selinux/rules.c b/drivers/kernelsu/selinux/rules.c
  2. index 3ccab7bb26df..4b1e3c11748b 100644
  3. --- a/drivers/kernelsu/selinux/rules.c
  4. +++ b/drivers/kernelsu/selinux/rules.c
  5. @@ -9,7 +9,7 @@
  6.  #include "linux/lsm_audit.h"
  7.  #include "xfrm.h"
  8.  
  9. -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
  10. +#if 1 //LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
  11.  #define SELINUX_POLICY_INSTEAD_SELINUX_SS
  12.  #endif
  13.  
  14. diff --git a/drivers/kernelsu/selinux/sepolicy.c b/drivers/kernelsu/selinux/sepolicy.c
  15. index 943a7fcab396..48c917cd7529 100644
  16. --- a/drivers/kernelsu/selinux/sepolicy.c
  17. +++ b/drivers/kernelsu/selinux/sepolicy.c
  18. @@ -80,7 +80,7 @@ static bool add_typeattribute(struct policydb *db, const char *type,
  19.  
  20.  // htable is a struct instead of pointer above 5.8.0:
  21.  // https://elixir.bootlin.com/linux/v5.8-rc1/source/security/selinux/ss/symtab.h
  22. -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
  23. +#if 1 //LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
  24.  #define hashtab_for_each(htab, cur) hash_for_each (htab.htable, htab.size, cur)
  25.  #else
  26.  #define hashtab_for_each(htab, cur)                                            \
  27. @@ -89,7 +89,7 @@ static bool add_typeattribute(struct policydb *db, const char *type,
  28.  
  29.  // symtab_search is introduced on 5.9.0:
  30.  // https://elixir.bootlin.com/linux/v5.9-rc1/source/security/selinux/ss/symtab.h
  31. -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)
  32. +#if 0 //LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)
  33.  #define symtab_search(s, name) hashtab_search((s)->table, name)
  34.  #define symtab_insert(s, name, datum) hashtab_insert((s)->table, name, datum)
  35.  #endif
  36. @@ -468,7 +468,7 @@ static bool add_type_rule(struct policydb *db, const char *s, const char *t,
  37.  // 5.9.0 : static inline int hashtab_insert(struct hashtab *h, void *key, void
  38.  // *datum, struct hashtab_key_params key_params) 5.8.0: int
  39.  // hashtab_insert(struct hashtab *h, void *k, void *d);
  40. -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
  41. +#if 1 //LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
  42.  static u32 filenametr_hash(const void *k)
  43.  {
  44.     const struct filename_trans_key *ft = k;
  45. @@ -535,7 +535,7 @@ static bool add_filename_trans(struct policydb *db, const char *s,
  46.         return false;
  47.     }
  48.  
  49. -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
  50. +#if 1 //LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
  51.     struct filename_trans_key key;
  52.     key.ttype = tgt->value;
  53.     key.tclass = cls->value;
  54. @@ -543,7 +543,7 @@ static bool add_filename_trans(struct policydb *db, const char *s,
  55.  
  56.     struct filename_trans_datum *last = NULL;
  57.  
  58. -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
  59. +#if 1 //LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
  60.     struct filename_trans_datum *trans =
  61.         policydb_filenametr_search(db, &key);
  62.  #else
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement