From 2f6f95f148026fb106646dd3f0f3cd8ef264faca Mon Sep 17 00:00:00 2001 From: mozillazg Date: Wed, 23 Aug 2023 01:25:26 +0000 Subject: [PATCH] 26: fix the path is empth --- 26-lsm-path_chmod/cilium-ebpf/bpf_bpfeb.o | Bin 4784 -> 4832 bytes 26-lsm-path_chmod/cilium-ebpf/bpf_bpfel.o | Bin 4784 -> 4832 bytes 26-lsm-path_chmod/main.bpf.c | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/26-lsm-path_chmod/cilium-ebpf/bpf_bpfeb.o b/26-lsm-path_chmod/cilium-ebpf/bpf_bpfeb.o index d1abb7140b01c692a0cf1b3744bacc7cfa6e3eb3..cec19d1d0919ae4a6c50d83e091adf67617d0aef 100644 GIT binary patch literal 4832 zcmb_fO^h5@5q{lcuN}P3nj{1h3^XP`>tJT>#291aFl%SmL~`(INkj~XcJEB@PUD`Q z+3p_4izQfzAi)ixpd1h)ASAdT`GPDYkXIl?E)kZJ13wa4DYxVhi%TLDY5Bf-^=5k- z3>QkOS6|hus`pp#P0u&y&d>Y4XGY|icYrH~Q4he>%c8Zk-D@Uq1cG<39TjP&9<%c1 z16J*oEU8jauQ;@6Iw-R!CP zZ`S++^)L3@@oX}*n(wZg$E`{ICT^(54^*C8IB(kBUcVDORG7DZEc>$G_D#HQ40*=~ zsQcDP;py&if-Rc&+6~#@4<+I>jVA478D5s8hfgOtP zq7Pyjw*meG_N3-1Nkb$`9@!>*;_y#)Mz za0~4Al>6i`{JbA+$Fj%VE3NT<3i%;$i#k@q{5lnLA8m;JIhqd&M5B4&<6Va;H3a-C z#R2fIHNpMBzg3Jic)wSSTJrv=nB%#5%GJ}wei%Nl>ONA4yEq&3G-G&rO7Jy2mjE$; z(-=%s^tS;<@z#bGw7pjE9jJOYr0e6-qS;=n&!G=myT8kJF~7f8*YOG9{W=!MCOv3{ zjKw)H9dkcq?fxU%{yu8Zu%1BvY0dcv@YCBq(m5?H8qA+tz?@%(Jml<$L7{)S@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UUQ-vRMQF3T>!d4c|oI^ z>eTidm66aLMoFWIEE+-&dni`TX6PPJqnIM4JI@i>z8fe#G=k*T zb;`DxCmYriA@>`>eoJRFy4W%*H7A7Yw%xn8?X@4;^;p0C@ZQ0G+eTnI6T1I;IGR!^ z%#KV3sY1G{&^g!|w>C8Egq2#0#z03+1?qs~D<^K$y$Wbuxf|-1+^TB2LDdWPt7Icb zvr%Z<(6QtBDp|XMg~(fDifWAzn~@`Laa@d7CYT;hK(WD4$+i7 z;)a3i+gQWy75ZcVt+FET3AZt#?$Zui^%gt4d)*Z)szvhX_004V~C)1QCuXk4Kb%!Di(0 z9vF`5+}rsH(;vTQur8cCje_qV&8xZtPiit^Ev;cneq;lpA>rp{vBmJKw`g48#k=!D@;8W zJTPhmiGpy=En^{sZS&*Vl#`oXI73({-&7E=_36oqzs=23ZJY? zGxbc8gmAPJt_E8_D&Hqu3EC$!-z%)ke5L^E+R6kX?B$>_plR>R+0C3ima~uM?BhB6 z{hU3Kvrp&jb259razc4fV#FRV&@L%zh#!+-< z&W>R-o^zTNizFnwziA6isD+=73olT6qNplNe~ak^c@QZ-N94bi_=Pkeygk{Di8uUH z;AV^eS>i2}Qy7nb)fdE*pDn&qzOyG$PN5(7SiXJ!EovK>;w3zW)RLbiKEJN{`Kux# R@54&YO8k*ljVZ{-{{z88Kt=!n diff --git a/26-lsm-path_chmod/main.bpf.c b/26-lsm-path_chmod/main.bpf.c index f53b49c..8841c80 100644 --- a/26-lsm-path_chmod/main.bpf.c +++ b/26-lsm-path_chmod/main.bpf.c @@ -6,7 +6,7 @@ SEC("lsm/path_chmod") -int lsm_path_chmod(struct path *path) { +int BPF_PROG(lsm_path_chmod, struct path *path) { char path_str[32]; struct qstr dname;