popsuty `patch`
    Paweł Sikora 
    pluto w pld-linux.org
       
    Pią, 14 Sty 2005, 21:54:30 CET
    
    
  
mam taka oto latke (test.patch)...
--- sched.h     2004-12-24 16:33:59 -0500
+++ sched.h     2005-01-12 21:06:27 -0500
@@ -664,6 +689,23 @@ struct task_struct {
        struct mempolicy *mempolicy;
        short il_next;          /* could be shared with used_math */
 #endif
+
+#ifdef CONFIG_GRKERNSEC
+       /* grsecurity */
+       struct acl_subject_label *acl;
+       struct acl_role_label *role;
+       struct file *exec_file;
+       u32 curr_ip;
+       u32 gr_saddr;
+       u32 gr_daddr;
+       u16 gr_sport;
+       u16 gr_dport;
+       u16 acl_role_id;
+       u8 acl_sp_role:1;
+       u8 used_accept:1;
+       u8 is_writable:1;
+       u8 brute:1;
+#endif
 };
 static inline pid_t process_group(struct task_struct *tsk)
naklada ja sobie...
# patch -p0 < test.patch
patching file sched.h
Hunk #1 succeeded at 484 with fuzz 2 (offset -205 lines).
o jaki ladny fuzz. zrobmy zatem diffa...
# diff -u sched.h{.orig,}
--- sched.h.orig        2005-01-14 21:37:50.000000000 +0100
+++ sched.h     2005-01-14 21:50:47.548627208 +0100
@@ -459,6 +459,23 @@
        unsigned long ttwu_wake_affine;
        unsigned long ttwu_wake_balance;
 #endif
+
+#ifdef CONFIG_GRKERNSEC
+       /* grsecurity */
+       struct acl_subject_label *acl;
+       struct acl_role_label *role;
+       struct file *exec_file;
+       u32 curr_ip;
+       u32 gr_saddr;
+       u32 gr_daddr;
+       u16 gr_sport;
+       u16 gr_dport;
+       u16 acl_role_id;
+       u8 acl_sp_role:1;
+       u8 used_accept:1;
+       u8 is_writable:1;
+       u8 brute:1;
+#endif
 };
 #ifdef ARCH_HAS_SCHED_DOMAIN
ooo, latka wyladowala w kosmosie.
zupelnie INNY kontekst, a patch sobie ladnie chyba
ze szklanej kuli wyczytal ze ona akurat tu spasuje.
ps).
mam paczke patch-2.5.9-3.
-- 
/* Copyright (C) 2003, SCO, Inc. This is valuable Intellectual Property. */
                           #define say(x) lie(x)
-------------- następna część ---------
ZaĹÄ
cznik, ktĂłry nie byĹ tekstem zostaĹ usuniÄty...
Name: sched.h
Type: text/x-chdr
Size: 35377 bytes
Desc: nie znany
Url : /mailman/pipermail/pld-devel-pl/attachments/20050114/8883e3fa/sched.bin
-------------- następna część ---------
ZaĹÄ
cznik, ktĂłry nie byĹ tekstem zostaĹ usuniÄty...
Name: test.patch
Type: text/x-diff
Size: 598 bytes
Desc: nie znany
Url : /mailman/pipermail/pld-devel-pl/attachments/20050114/8883e3fa/test.bin
    
    
Więcej informacji o liście dyskusyjnej pld-devel-pl