{"id":52,"date":"2008-03-24T14:12:41","date_gmt":"2008-03-24T06:12:41","guid":{"rendered":"http:\/\/percy.blog.ubuntu.org.cn\/2008\/03\/24\/drcom%e7%9a%84%e5%ae%89%e8%a3%85%e4%b9%8b%e5%8d%83%e8%be%9b%e4%b8%87%e8%8b%a6\/"},"modified":"2018-12-07T23:16:35","modified_gmt":"2018-12-07T15:16:35","slug":"drcom%e7%9a%84%e5%ae%89%e8%a3%85%e4%b9%8b%e5%8d%83%e8%be%9b%e4%b8%87%e8%8b%a6","status":"publish","type":"post","link":"https:\/\/pjq.me\/?p=52","title":{"rendered":"drcom\u7684\u5b89\u88c5\u4e4b\u5343\u8f9b\u4e07\u82e6"},"content":{"rendered":"<p>\u5728ubuntu\u4e0a\u5b89\u88c5drcom\u5f88\u7b80\u5355<\/p>\n<p>\u53ea\u8981make&amp;&amp;make install\u5c31\u884c\u4e86<\/p>\n<p>\u4f46\u5728gentoo\u5374\u9047\u5230\u4e86\u5f88\u591a\u95ee\u9898 \uff0c\u5148\u662f\u4e0d\u80fd\u7f16\u8bd1\uff0c\u5c11\u4e86\u4ec0\u4e48\u53d8\u91cf\uff0csecurity_ops\uff0c\u7136\u540e\u5230\u7f51\u4e0a\u641c\uff0c\u597d\u4e0d\u5bb9\u6613\u627e\u5230\u4e86\u4e00\u4e2a\u89e3\u51b3\u65b9\u6cd5\uff0c\uff08\u5f53\u65f6\u6211\u7684\u5185\u6838\u662f2.6.22\uff0c\u540e\u6765\u624d\u66f4\u65b0\u52302.6.24\uff09<\/p>\n<p>\u5728\u7f51\u53cbzrx550 http:\/\/hi.baidu.com\/z%5Fr%5Fx\u90a3\u770b\u5230\u8fd9\u7bc7\u6587\u7ae0<br \/>\n\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d<br \/>\nlinux\u4e0b\u7684drcom\u662f\u57282.6\u7684\u5185\u6838\u4e2d\u5f00\u53d1\u7684\uff0c\u7528\u5230\u4e86&lt;linux\/security.h&gt;\u4e2d\u7684security_ops\u3002&gt;\u4f46\u662f\u8fd9\u4e2a EXPORT_SYMBOL \u57282.6.24\u7684\u5185\u6838\u4e2d\u88ab\u53d6\u6d88\u4e86\uff0c\u5bfc\u81f4drcom\u4e0d\u80fd\u88ab\u6210\u529f\u7684\u7f16\u8bd1\u3002\u968f\u4e4b<br \/>\n\u800c\u6765\u7684\u95ee\u9898\u5c31\u662f\u65b0\u5185\u6838\u5728\u9700\u8981drcom\u7684\u7f51\u7edc\u73af\u5883\u4e2d\u4e0d\u80fd\u4e0a\u7f51\u4e86\u3002\u5c31\u8fd9\u4e2a\u95ee\u9898\u6211\u8bf7\u6559\u4e86\u5f00\u6e90\u7248&gt;\u672cdrcom\u5f00\u53d1\u8005\u4e4b\u4e00\u7684Wheelz\u3002\u76ee\u524d\u6700\u7b80\u5355\u7684\u529e\u6cd5\u53ea\u80fd\u4fee\u6539\u5185\u6838\uff0c\u91cd\u65b0\u7f16\u8bd1\u3002\u9488\u5bf92.6.24\u7684&gt;\u5185\u6838,\u5177\u4f53\u529e\u6cd5\u5982\u4e0b\uff1a<br \/>\n1) \u5728\u5185\u6838\u7684security\/security.c\u6587\u4ef6\u7684\u6700\u540e\u52a0\u4e0aEXPORT_SYMBOL(security_ops);<br \/>\n2) \u91cd\u65b0\u7f16\u8bd1\u4e00\u4e0b\u5185\u6838\u3002<br \/>\n3) drcom-1.3.7\/kmod\/proto.c\u5728#include &lt;linux\/security.h&gt;\u540e\u9762\u52a0\u4e0a\u4e00\u53e5\uff1a<br \/>\nextern struct security_operations *security_ops;<br \/>\n4\uff09\u7f16\u8bd1\u5b89\u88c5drcom\u3002<\/p>\n<p>\u4f46\u5374\u59cb\u7ec8\u4e0d\u8d77\u4f5c\u7528\uff0c\u7f16\u8bd1\u4e86\u597d\u51e0\u6b21\u5185\u6838\uff0c\u59cb\u7ec8\u6ca1\u7528\uff0c\u540e\u6765\u5728.config \u4e2d\u52a0\u5165<\/p>\n<p>\u5148 grep SECURITY .config \u7136\u540evim .config<\/p>\n<p>CONFIG_SECURITY=y<br \/>\nCONFIG_SECURITY_NETWORK=y<\/p>\n<p>\u524d\u51e0\u6b21\u7f16\u8bd1\u90fd\u4e0d\u6210\u529f\uff0c\u597d\u50cf\u7f16\u8bd1\u65f6\u91cd\u65b0\u914d\u7f6e\u5185\u6838\uff0c\u7acb\u9a6c^C,<\/p>\n<p>\u7136\u540e\u53c8\u4e00\u6b21\u6b21\u507f\u8bd5\uff0c\u7ec8\u4e8e\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>\u5230\u8fd9\u91cc\u6211\u53d1\u73b0\u4e86\u4e00\u4e2a\u95ee\u9898\uff0c\u4e00\u822c\u60c5\u51b5\u4e86\u6211\u91cd\u65b0\u7f16\u8bd1\u5185\u6838\u90fd\u4e0d\u4f1a<\/p>\n<p>make clean \u800c\u8fd9\u6b21\u7f16\u8bd1\u4e867\u5206\u949f\uff0c\u6240\u4ee5\u6211\u89c9\u5f97\u5b83\u5e94\u8be5\u5c06\u5185\u6838\u91cd\u65b0\u7f16\u8bd1\u4e86\u4e00\u904d\uff0c\u4ee5\u524d\u7f16\u8bd1\u65f6\u53ea\u8981\u5f88\u77ed\u7684\u65f6\u95f4\uff0c\u7279\u522b\u662f\u6539\u52a8\u5f88\u5c11\u7684\u65f6\u5019\uff0c\u56e0\u4e3a\u5b83\u6ca1\u6709\u5168\u90e8\u91cd\u65b0\u7f16\u8bd1\uff0c\u53ea\u662f\u7f16\u8bd1\u4e86\u90a3\u4e9b\u914d\u7f6e\u6539\u53d8\u4e86\u7684\u90e8\u5206\uff0c\u800c\u5f53\u5b83\u4eec\u7684\u4f9d\u8d56\u5173\u7cfb\u6bd4\u8f83\u4e25\u91cd\u65f6\uff0c\u7cfb\u7edf\u5c31\u4f1a\u81ea\u52a8\u5168\u90e8\u91cd\u65b0\u7f16\u8bd1\uff0c\u6240\u4ee5\u4ee5\u540e\u5f53\u5185\u6838\u65390\u52a8\u6bd4\u8f83\u5927\u65f6\uff0c\u6700\u597d\u5148make clean\u4e0b<\/p>\n<p>\u6700\u540e\u7ec8\u4e8e\u5b89\u88c5\u6210\u529f\u4e86\uff0c\u4f46\u786e\u4e0d\u80fd\u767b\u5f55\uff0c\u8bd5\u4e86\u597d\u51e0\u4e2a\u65b9\u6cd5<\/p>\n<p>drcomcd<\/p>\n<p>drcomc login<\/p>\n<p>drcomc logout<\/p>\n<p>\u90fd\u4e0d\u884c\uff0c\u7ecf\u8fc7\u597d\u591a\u6b21\u8bd5\u9a8c\u624d\u53ef\u4ee5\u4e0a\u7f51\u4e86<\/p>\n<p>\u540e\u6765\u53d1\u73b0\u53ea\u6709\u4ee5root\u7528\u6237\u767b\u5f55\u540e\uff0c<\/p>\n<p>1\u3002drcomd<\/p>\n<p>2\u767b\u5f55\uff1adrcomc login<\/p>\n<p>3.\u767b\u51fa:drcomc logout<\/p>\n<p>\u7136\u540e\u5c31\u4e00\u5207OK\u4e86\uff0c\u7136\u540e\u518d\u4ee5\u666e\u901a\u7528\u6237\u767b\u5f55\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>\u6211\u662f\u5728\u7528\u666e\u901a\u7528\u6237\u767b\u5f55\u540e\uff0c\u7136\u540eCtrl +Alt +F1,\u8fdb\u5165\u4e00\u4e2a\u7ec8\u7aef\u7528root\u767b\u5f55\uff0c \u518ddromd,drcomc login<\/p>\n<p>\u767b\u5f55\u6210\u529f\u540e\uff0c\u518d\u8fd4\u56de\u5230\u56fe\u5f62\u754c\u9762\uff1a Ctrl +Alt +F7<\/p>\n<p>\u4e0b\u9762\u662f\u6211\u7684\u8c03\u8bd5\u4fe1\u606f\uff0c\u5e0c\u671b\u4f60\u5728\u68c0\u7d22\u8fdb\u80fd\u591f\u68c0\u7d22\u5230\uff1a<\/p>\n<p>make<br \/>\nmake -C drcomc<br \/>\nmake[1]: Entering directory `\/home\/pjq\/drcom-1.3.7\/drcomc&#8217;<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o drcomc.o drcomc.c<br \/>\ngcc   drcomc.o   -o drcomc<br \/>\nmake[1]: Leaving directory `\/home\/pjq\/drcom-1.3.7\/drcomc&#8217;<br \/>\nmake -C drcomd<br \/>\nmake[1]: Entering directory `\/home\/pjq\/drcom-1.3.7\/drcomd&#8217;<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o drcomd.o drcomd.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o daemon.o daemon.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o cleanup.o cleanup.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o dialog.o dialog.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o handle.o handle.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o init.o init.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o keepalive.o keepalive.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o login.o login.c<br \/>\nlogin.c: \u5728\u51fd\u6570 \u2018drcom_login\u2019 \u4e2d\uff1a<br \/>\nlogin.c:50: \u8b66\u544a\uff1a\u672a\u4f7f\u7528\u7684\u53c2\u6570 \u2018timeout\u2019<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o logout.o logout.c<br \/>\nlogout.c: \u5728\u51fd\u6570 \u2018drcom_logout\u2019 \u4e2d\uff1a<br \/>\nlogout.c:34: \u8b66\u544a\uff1a\u672a\u4f7f\u7528\u7684\u53c2\u6570 \u2018timeout\u2019<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o md5.o md5.c<br \/>\nmd5.c:131:36: \u8b66\u544a\uff1a\u4f7f\u7528 C99 long long \u6574\u6570\u5e38\u91cf<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o misc.o misc.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o passwd.o passwd.c<br \/>\npasswd.c: \u5728\u51fd\u6570 \u2018drcom_passwd\u2019 \u4e2d\uff1a<br \/>\npasswd.c:32: \u8b66\u544a\uff1a\u672a\u4f7f\u7528\u7684\u53c2\u6570 \u2018timeout\u2019<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o readconf.o readconf.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o watchport.o watchport.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o getaddr.o getaddr.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o log.o log.c<br \/>\nlog.c: \u5728\u51fd\u6570 \u2018dbg\u2019 \u4e2d\uff1a<br \/>\nlog.c:34: \u8b66\u544a\uff1a\u672a\u4f7f\u7528\u7684\u53c2\u6570 \u2018format\u2019<br \/>\ngcc -lm -lpthread  drcomd.o daemon.o cleanup.o dialog.o handle.o init.o keepalive.o login.o logout.o md5.o misc.o passwd.o readconf.o watchport.o getaddr.o log.o   -o drcomd<br \/>\nmake[1]: Leaving directory `\/home\/pjq\/drcom-1.3.7\/drcomd&#8217;<br \/>\nmake -C kmod<br \/>\nmake[1]: Entering directory `\/home\/pjq\/drcom-1.3.7\/kmod&#8217;<br \/>\nmake -C \/lib\/modules\/2.6.22-gentoo-r9\/build M=\/home\/pjq\/drcom-1.3.7\/kmod modules<br \/>\nmake[2]: Entering directory `\/usr\/src\/linux-2.6.22-gentoo-r9&#8242;<br \/>\nCC [M]  \/home\/pjq\/drcom-1.3.7\/kmod\/init.o<br \/>\nCC [M]  \/home\/pjq\/drcom-1.3.7\/kmod\/proc.o<br \/>\nCC [M]  \/home\/pjq\/drcom-1.3.7\/kmod\/proto.o<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c: \u5728\u51fd\u6570 \u2018init_hijack\u2019 \u4e2d\uff1a<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:450: \u9519\u8bef\uff1a\u2018security_ops\u2019 \u672a\u58f0\u660e (\u5728\u6b64\u51fd\u6570\u5185\u7b2c\u4e00\u6b21\u4f7f\u7528)<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:450: \u9519\u8bef\uff1a(\u5373\u4f7f\u5728\u4e00\u4e2a\u51fd\u6570\u5185\u591a\u6b21\u51fa\u73b0\uff0c\u6bcf\u4e2a\u672a\u58f0\u660e\u7684\u6807\u8bc6\u7b26\u5728\u5176<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:450: \u9519\u8bef\uff1a\u6240\u5728\u7684\u51fd\u6570\u5185\u53ea\u62a5\u544a\u4e00\u6b21\u3002)<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c: \u5728\u51fd\u6570 \u2018cleanup_hijack\u2019 \u4e2d\uff1a<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:461: \u9519\u8bef\uff1a\u2018security_ops\u2019 \u672a\u58f0\u660e (\u5728\u6b64\u51fd\u6570\u5185\u7b2c\u4e00\u6b21\u4f7f\u7528)<br \/>\nmake[3]: *** [\/home\/pjq\/drcom-1.3.7\/kmod\/proto.o] \u9519\u8bef 1<br \/>\nmake[2]: *** [_module_\/home\/pjq\/drcom-1.3.7\/kmod] \u9519\u8bef 2<br \/>\nmake[2]: Leaving directory `\/usr\/src\/linux-2.6.22-gentoo-r9&#8242;<br \/>\nmake[1]: *** [default] \u9519\u8bef 2<br \/>\nmake[1]: Leaving directory `\/home\/pjq\/drcom-1.3.7\/kmod&#8217;<br \/>\nmake: *** [kmod] \u9519\u8bef 2<br \/>\nmake<br \/>\nmake -C drcomc<br \/>\nmake[1]: Entering directory `\/home\/pjq\/drcom-1.3.7\/drcomc&#8217;<br \/>\nmake[1]: Nothing to be done for `all&#8217;.<br \/>\nmake[1]: Leaving directory `\/home\/pjq\/drcom-1.3.7\/drcomc&#8217;<br \/>\nmake -C drcomd<br \/>\nmake[1]: Entering directory `\/home\/pjq\/drcom-1.3.7\/drcomd&#8217;<br \/>\nmake[1]: Nothing to be done for `all&#8217;.<br \/>\nmake[1]: Leaving directory `\/home\/pjq\/drcom-1.3.7\/drcomd&#8217;<br \/>\nmake -C kmod<br \/>\nmake[1]: Entering directory `\/home\/pjq\/drcom-1.3.7\/kmod&#8217;<br \/>\nmake -C \/lib\/modules\/2.6.22-gentoo-r9\/build M=\/home\/pjq\/drcom-1.3.7\/kmod modules<br \/>\nmake[2]: Entering directory `\/usr\/src\/linux-2.6.22-gentoo-r9&#8242;<br \/>\nCC [M]  \/home\/pjq\/drcom-1.3.7\/kmod\/proto.o<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c: \u5728\u51fd\u6570 \u2018init_hijack\u2019 \u4e2d\uff1a<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:453: \u9519\u8bef\uff1a\u63d0\u9886\u6307\u5411\u4e0d\u5b8c\u5168\u7c7b\u578b\u7684\u6307\u9488<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:454: \u9519\u8bef\uff1a\u63d0\u9886\u6307\u5411\u4e0d\u5b8c\u5168\u7c7b\u578b\u7684\u6307\u9488<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c: \u5728\u51fd\u6570 \u2018cleanup_hijack\u2019 \u4e2d\uff1a<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:461: \u9519\u8bef\uff1a\u63d0\u9886\u6307\u5411\u4e0d\u5b8c\u5168\u7c7b\u578b\u7684\u6307\u9488<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:462: \u9519\u8bef\uff1a\u63d0\u9886\u6307\u5411\u4e0d\u5b8c\u5168\u7c7b\u578b\u7684\u6307\u9488<br \/>\nmake[3]: *** [\/home\/pjq\/drcom-1.3.7\/kmod\/proto.o] \u9519\u8bef 1<br \/>\nmake[2]: *** [_module_\/home\/pjq\/drcom-1.3.7\/kmod] \u9519\u8bef 2<br \/>\nmake[2]: Leaving directory `\/usr\/src\/linux-2.6.22-gentoo-r9&#8242;<br \/>\nmake[1]: *** [default] \u9519\u8bef 2<br \/>\nmake[1]: Leaving directory `\/home\/pjq\/drcom-1.3.7\/kmod&#8217;<br \/>\nmake: *** [kmod] \u9519\u8bef 2<br \/>\nlocalhost drcom-1.3.7 # make<br \/>\nmake -C drcomc<br \/>\nmake[1]: Entering directory `\/home\/pjq\/drcom-1.3.7\/drcomc&#8217;<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o drcomc.o drcomc.c<br \/>\ngcc   drcomc.o   -o drcomc<br \/>\nmake[1]: Leaving directory `\/home\/pjq\/drcom-1.3.7\/drcomc&#8217;<br \/>\nmake -C drcomd<br \/>\nmake[1]: Entering directory `\/home\/pjq\/drcom-1.3.7\/drcomd&#8217;<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o drcomd.o drcomd.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o daemon.o daemon.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o cleanup.o cleanup.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o dialog.o dialog.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o handle.o handle.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o init.o init.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o keepalive.o keepalive.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o login.o login.c<br \/>\nlogin.c: In function \u2018drcom_login\u2019:<br \/>\nlogin.c:50: warning: unused parameter \u2018timeout\u2019<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o logout.o logout.c<br \/>\nlogout.c: In function \u2018drcom_logout\u2019:<br \/>\nlogout.c:34: warning: unused parameter \u2018timeout\u2019<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o md5.o md5.c<br \/>\nmd5.c:131:36: warning: use of C99 long long integer constant<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o misc.o misc.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o passwd.o passwd.c<br \/>\npasswd.c: In function \u2018drcom_passwd\u2019:<br \/>\npasswd.c:32: warning: unused parameter \u2018timeout\u2019<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o readconf.o readconf.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o watchport.o watchport.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o getaddr.o getaddr.c<br \/>\ngcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I\/home\/pjq\/drcom-1.3.7\/include -O2   -c -o log.o log.c<br \/>\nlog.c: In function \u2018dbg\u2019:<br \/>\nlog.c:34: warning: unused parameter \u2018format\u2019<br \/>\ngcc -lm -lpthread  drcomd.o daemon.o cleanup.o dialog.o handle.o init.o keepalive.o login.o logout.o md5.o misc.o passwd.o readconf.o watchport.o getaddr.o log.o   -o drcomd<br \/>\nmake[1]: Leaving directory `\/home\/pjq\/drcom-1.3.7\/drcomd&#8217;<br \/>\nmake -C kmod<br \/>\nmake[1]: Entering directory `\/home\/pjq\/drcom-1.3.7\/kmod&#8217;<br \/>\nmake -C \/lib\/modules\/2.6.22-gentoo-r9\/build M=\/home\/pjq\/drcom-1.3.7\/kmod modules<br \/>\nmake[2]: Entering directory `\/usr\/src\/gentoolinux\/linux-2.6.22-gentoo-r9&#8242;<br \/>\nCC [M]  \/home\/pjq\/drcom-1.3.7\/kmod\/init.o<br \/>\nCC [M]  \/home\/pjq\/drcom-1.3.7\/kmod\/proc.o<br \/>\nCC [M]  \/home\/pjq\/drcom-1.3.7\/kmod\/proto.o<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c: In function \u2018init_hijack\u2019:<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:453: error: dereferencing pointer to incomplete type<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:454: error: dereferencing pointer to incomplete type<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c: In function \u2018cleanup_hijack\u2019:<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:461: error: dereferencing pointer to incomplete type<br \/>\n\/home\/pjq\/drcom-1.3.7\/kmod\/proto.c:462: error: dereferencing pointer to incomplete type<br \/>\nmake[3]: *** [\/home\/pjq\/drcom-1.3.7\/kmod\/proto.o] \u9519\u8bef 1<br \/>\nmake[2]: *** [_module_\/home\/pjq\/drcom-1.3.7\/kmod] \u9519\u8bef 2<br \/>\nmake[2]: Leaving directory `\/usr\/src\/gentoolinux\/linux-2.6.22-gentoo-r9&#8242;<br \/>\nmake[1]: *** [default] \u9519\u8bef 2<br \/>\nmake[1]: Leaving directory `\/home\/pjq\/drcom-1.3.7\/kmod&#8217;<br \/>\nmake: *** [kmod] \u9519\u8bef 2<br \/>\nlocalhost drcom-1.3.7 # drcomcd<br \/>\n1206323834 DEBUG drcomcd: Redirecting stderr to \/var\/log\/drcomcd&#8230;<br \/>\nSegmentation fault<br \/>\nlocalhost drcom-1.3.7 # drcomc login<br \/>\n1206323840 DEBUG drcomc: Creating socket&#8230;<br \/>\n1206323840 DEBUG drcomc: Connecting&#8230;<br \/>\ndrcomc: Connect: No such file or directory<br \/>\nlocalhost drcom-1.3.7 # drcomc logout<br \/>\n1206323843 DEBUG drcomc: Creating socket&#8230;<br \/>\n1206323843 DEBUG drcomc: Connecting&#8230;<br \/>\ndrcomc: Connect: No such file or directory<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728ubuntu\u4e0a\u5b89\u88c5drcom\u5f88\u7b80\u5355 \u53ea\u8981make&amp;&amp;make install\u5c31\u884c\u4e86 \u4f46\u5728gentoo\u5374\u9047\u5230\u4e86\u5f88\u591a\u95ee\u9898 \uff0c\u5148\u662f\u4e0d\u80fd\u7f16\u8bd1\uff0c\u5c11\u4e86\u4ec0\u4e48\u53d8\u91cf\uff0csecurity_ops\uff0c\u7136\u540e\u5230\u7f51\u4e0a\u641c\uff0c\u597d\u4e0d\u5bb9\u6613\u627e\u5230\u4e86\u4e00\u4e2a\u89e3\u51b3\u65b9\u6cd5\uff0c\uff08\u5f53\u65f6\u6211\u7684\u5185\u6838\u662f2.6.22\uff0c\u540e\u6765\u624d\u66f4\u65b0\u52302.6.24\uff09 \u5728\u7f51\u53cbzrx550 http:\/\/hi.baidu.com\/z%5Fr%5Fx\u90a3\u770b\u5230\u8fd9\u7bc7\u6587\u7ae0 \uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d linux\u4e0b\u7684drcom\u662f\u57282.6\u7684\u5185\u6838\u4e2d\u5f00\u53d1\u7684\uff0c\u7528\u5230\u4e86&lt;linux\/security.h&gt;\u4e2d\u7684security_ops\u3002&gt;\u4f46\u662f\u8fd9\u4e2a EXPORT_SYMBOL \u57282.6.24\u7684\u5185\u6838\u4e2d\u88ab\u53d6\u6d88\u4e86\uff0c\u5bfc\u81f4drcom\u4e0d\u80fd\u88ab\u6210\u529f\u7684\u7f16\u8bd1\u3002\u968f\u4e4b \u800c\u6765\u7684\u95ee\u9898\u5c31\u662f\u65b0\u5185\u6838\u5728\u9700\u8981drcom\u7684\u7f51\u7edc\u73af\u5883\u4e2d\u4e0d\u80fd\u4e0a\u7f51\u4e86\u3002\u5c31\u8fd9\u4e2a\u95ee\u9898\u6211\u8bf7\u6559\u4e86\u5f00\u6e90\u7248&gt;\u672cdrcom\u5f00\u53d1\u8005\u4e4b\u4e00\u7684Wheelz\u3002\u76ee\u524d\u6700\u7b80\u5355\u7684\u529e\u6cd5\u53ea\u80fd\u4fee\u6539\u5185\u6838\uff0c\u91cd\u65b0\u7f16\u8bd1\u3002\u9488\u5bf92.6.24\u7684&gt;\u5185\u6838,\u5177\u4f53\u529e\u6cd5\u5982\u4e0b\uff1a 1) \u5728\u5185\u6838\u7684security\/security.c\u6587\u4ef6\u7684\u6700\u540e\u52a0\u4e0aEXPORT_SYMBOL(security_ops); 2) \u91cd\u65b0\u7f16\u8bd1\u4e00\u4e0b\u5185\u6838\u3002 3) drcom-1.3.7\/kmod\/proto.c\u5728#include &lt;linux\/security.h&gt;\u540e\u9762\u52a0\u4e0a\u4e00\u53e5\uff1a extern struct security_operations *security_ops; 4\uff09\u7f16\u8bd1\u5b89\u88c5drcom\u3002 \u4f46\u5374\u59cb\u7ec8\u4e0d\u8d77\u4f5c\u7528\uff0c\u7f16\u8bd1\u4e86\u597d\u51e0\u6b21\u5185\u6838\uff0c\u59cb\u7ec8\u6ca1\u7528\uff0c\u540e\u6765\u5728.config \u4e2d\u52a0\u5165 \u5148 grep SECURITY .config \u7136\u540evim .config CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y \u524d\u51e0\u6b21\u7f16\u8bd1\u90fd\u4e0d\u6210\u529f\uff0c\u597d\u50cf\u7f16\u8bd1\u65f6\u91cd\u65b0\u914d\u7f6e\u5185\u6838\uff0c\u7acb\u9a6c^C, \u7136\u540e\u53c8\u4e00\u6b21\u6b21\u507f\u8bd5\uff0c\u7ec8\u4e8e\u53ef\u4ee5\u4e86\u3002 \u5230\u8fd9\u91cc\u6211\u53d1\u73b0\u4e86\u4e00\u4e2a\u95ee\u9898\uff0c\u4e00\u822c\u60c5\u51b5\u4e86\u6211\u91cd\u65b0\u7f16\u8bd1\u5185\u6838\u90fd\u4e0d\u4f1a make clean \u800c\u8fd9\u6b21\u7f16\u8bd1\u4e867\u5206\u949f\uff0c\u6240\u4ee5\u6211\u89c9\u5f97\u5b83\u5e94\u8be5\u5c06\u5185\u6838\u91cd\u65b0\u7f16\u8bd1\u4e86\u4e00\u904d\uff0c\u4ee5\u524d\u7f16\u8bd1\u65f6\u53ea\u8981\u5f88\u77ed\u7684\u65f6\u95f4\uff0c\u7279\u522b\u662f\u6539\u52a8\u5f88\u5c11\u7684\u65f6\u5019\uff0c\u56e0\u4e3a\u5b83\u6ca1\u6709\u5168\u90e8\u91cd\u65b0\u7f16\u8bd1\uff0c\u53ea\u662f\u7f16\u8bd1\u4e86\u90a3\u4e9b\u914d\u7f6e\u6539\u53d8\u4e86\u7684\u90e8\u5206\uff0c\u800c\u5f53\u5b83\u4eec\u7684\u4f9d\u8d56\u5173\u7cfb\u6bd4\u8f83\u4e25\u91cd\u65f6\uff0c\u7cfb\u7edf\u5c31\u4f1a\u81ea\u52a8\u5168\u90e8\u91cd\u65b0\u7f16\u8bd1\uff0c\u6240\u4ee5\u4ee5\u540e\u5f53\u5185\u6838\u65390\u52a8\u6bd4\u8f83\u5927\u65f6\uff0c\u6700\u597d\u5148make<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,37,169,7],"tags":[],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-gentoo","category-software","category-tech","category-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>drcom\u7684\u5b89\u88c5\u4e4b\u5343\u8f9b\u4e07\u82e6 - Jianqing&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pjq.me\/?p=52\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"drcom\u7684\u5b89\u88c5\u4e4b\u5343\u8f9b\u4e07\u82e6 - Jianqing&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"\u5728ubuntu\u4e0a\u5b89\u88c5drcom\u5f88\u7b80\u5355 \u53ea\u8981make&amp;&amp;make install\u5c31\u884c\u4e86 \u4f46\u5728gentoo\u5374\u9047\u5230\u4e86\u5f88\u591a\u95ee\u9898 \uff0c\u5148\u662f\u4e0d\u80fd\u7f16\u8bd1\uff0c\u5c11\u4e86\u4ec0\u4e48\u53d8\u91cf\uff0csecurity_ops\uff0c\u7136\u540e\u5230\u7f51\u4e0a\u641c\uff0c\u597d\u4e0d\u5bb9\u6613\u627e\u5230\u4e86\u4e00\u4e2a\u89e3\u51b3\u65b9\u6cd5\uff0c\uff08\u5f53\u65f6\u6211\u7684\u5185\u6838\u662f2.6.22\uff0c\u540e\u6765\u624d\u66f4\u65b0\u52302.6.24\uff09 \u5728\u7f51\u53cbzrx550 http:\/\/hi.baidu.com\/z%5Fr%5Fx\u90a3\u770b\u5230\u8fd9\u7bc7\u6587\u7ae0 \uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d linux\u4e0b\u7684drcom\u662f\u57282.6\u7684\u5185\u6838\u4e2d\u5f00\u53d1\u7684\uff0c\u7528\u5230\u4e86&lt;linux\/security.h&gt;\u4e2d\u7684security_ops\u3002&gt;\u4f46\u662f\u8fd9\u4e2a EXPORT_SYMBOL \u57282.6.24\u7684\u5185\u6838\u4e2d\u88ab\u53d6\u6d88\u4e86\uff0c\u5bfc\u81f4drcom\u4e0d\u80fd\u88ab\u6210\u529f\u7684\u7f16\u8bd1\u3002\u968f\u4e4b \u800c\u6765\u7684\u95ee\u9898\u5c31\u662f\u65b0\u5185\u6838\u5728\u9700\u8981drcom\u7684\u7f51\u7edc\u73af\u5883\u4e2d\u4e0d\u80fd\u4e0a\u7f51\u4e86\u3002\u5c31\u8fd9\u4e2a\u95ee\u9898\u6211\u8bf7\u6559\u4e86\u5f00\u6e90\u7248&gt;\u672cdrcom\u5f00\u53d1\u8005\u4e4b\u4e00\u7684Wheelz\u3002\u76ee\u524d\u6700\u7b80\u5355\u7684\u529e\u6cd5\u53ea\u80fd\u4fee\u6539\u5185\u6838\uff0c\u91cd\u65b0\u7f16\u8bd1\u3002\u9488\u5bf92.6.24\u7684&gt;\u5185\u6838,\u5177\u4f53\u529e\u6cd5\u5982\u4e0b\uff1a 1) \u5728\u5185\u6838\u7684security\/security.c\u6587\u4ef6\u7684\u6700\u540e\u52a0\u4e0aEXPORT_SYMBOL(security_ops); 2) \u91cd\u65b0\u7f16\u8bd1\u4e00\u4e0b\u5185\u6838\u3002 3) drcom-1.3.7\/kmod\/proto.c\u5728#include &lt;linux\/security.h&gt;\u540e\u9762\u52a0\u4e0a\u4e00\u53e5\uff1a extern struct security_operations *security_ops; 4\uff09\u7f16\u8bd1\u5b89\u88c5drcom\u3002 \u4f46\u5374\u59cb\u7ec8\u4e0d\u8d77\u4f5c\u7528\uff0c\u7f16\u8bd1\u4e86\u597d\u51e0\u6b21\u5185\u6838\uff0c\u59cb\u7ec8\u6ca1\u7528\uff0c\u540e\u6765\u5728.config \u4e2d\u52a0\u5165 \u5148 grep SECURITY .config \u7136\u540evim .config CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y \u524d\u51e0\u6b21\u7f16\u8bd1\u90fd\u4e0d\u6210\u529f\uff0c\u597d\u50cf\u7f16\u8bd1\u65f6\u91cd\u65b0\u914d\u7f6e\u5185\u6838\uff0c\u7acb\u9a6c^C, \u7136\u540e\u53c8\u4e00\u6b21\u6b21\u507f\u8bd5\uff0c\u7ec8\u4e8e\u53ef\u4ee5\u4e86\u3002 \u5230\u8fd9\u91cc\u6211\u53d1\u73b0\u4e86\u4e00\u4e2a\u95ee\u9898\uff0c\u4e00\u822c\u60c5\u51b5\u4e86\u6211\u91cd\u65b0\u7f16\u8bd1\u5185\u6838\u90fd\u4e0d\u4f1a make clean \u800c\u8fd9\u6b21\u7f16\u8bd1\u4e867\u5206\u949f\uff0c\u6240\u4ee5\u6211\u89c9\u5f97\u5b83\u5e94\u8be5\u5c06\u5185\u6838\u91cd\u65b0\u7f16\u8bd1\u4e86\u4e00\u904d\uff0c\u4ee5\u524d\u7f16\u8bd1\u65f6\u53ea\u8981\u5f88\u77ed\u7684\u65f6\u95f4\uff0c\u7279\u522b\u662f\u6539\u52a8\u5f88\u5c11\u7684\u65f6\u5019\uff0c\u56e0\u4e3a\u5b83\u6ca1\u6709\u5168\u90e8\u91cd\u65b0\u7f16\u8bd1\uff0c\u53ea\u662f\u7f16\u8bd1\u4e86\u90a3\u4e9b\u914d\u7f6e\u6539\u53d8\u4e86\u7684\u90e8\u5206\uff0c\u800c\u5f53\u5b83\u4eec\u7684\u4f9d\u8d56\u5173\u7cfb\u6bd4\u8f83\u4e25\u91cd\u65f6\uff0c\u7cfb\u7edf\u5c31\u4f1a\u81ea\u52a8\u5168\u90e8\u91cd\u65b0\u7f16\u8bd1\uff0c\u6240\u4ee5\u4ee5\u540e\u5f53\u5185\u6838\u65390\u52a8\u6bd4\u8f83\u5927\u65f6\uff0c\u6700\u597d\u5148make\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pjq.me\/?p=52\" \/>\n<meta property=\"og:site_name\" content=\"Jianqing&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2008-03-24T06:12:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-12-07T15:16:35+00:00\" \/>\n<meta name=\"author\" content=\"pengjianqing\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pengjianqing\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/pjq.me\/?p=52#article\",\"isPartOf\":{\"@id\":\"https:\/\/pjq.me\/?p=52\"},\"author\":{\"name\":\"pengjianqing\",\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"headline\":\"drcom\u7684\u5b89\u88c5\u4e4b\u5343\u8f9b\u4e07\u82e6\",\"datePublished\":\"2008-03-24T06:12:41+00:00\",\"dateModified\":\"2018-12-07T15:16:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/pjq.me\/?p=52\"},\"wordCount\":1446,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"articleSection\":[\"gentoo\",\"Software\",\"Tech\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/pjq.me\/?p=52#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/pjq.me\/?p=52\",\"url\":\"https:\/\/pjq.me\/?p=52\",\"name\":\"drcom\u7684\u5b89\u88c5\u4e4b\u5343\u8f9b\u4e07\u82e6 - Jianqing&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/pjq.me\/#website\"},\"datePublished\":\"2008-03-24T06:12:41+00:00\",\"dateModified\":\"2018-12-07T15:16:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/pjq.me\/?p=52#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/pjq.me\/?p=52\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/pjq.me\/?p=52#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/pjq.me\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"drcom\u7684\u5b89\u88c5\u4e4b\u5343\u8f9b\u4e07\u82e6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/pjq.me\/#website\",\"url\":\"https:\/\/pjq.me\/\",\"name\":\"Jianqing&#039;s Blog\",\"description\":\"Thoughts and Future\",\"publisher\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/pjq.me\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\",\"name\":\"pengjianqing\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png\",\"contentUrl\":\"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png\",\"width\":460,\"height\":752,\"caption\":\"pengjianqing\"},\"logo\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/pjq.me\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"drcom\u7684\u5b89\u88c5\u4e4b\u5343\u8f9b\u4e07\u82e6 - Jianqing&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pjq.me\/?p=52","og_locale":"en_US","og_type":"article","og_title":"drcom\u7684\u5b89\u88c5\u4e4b\u5343\u8f9b\u4e07\u82e6 - Jianqing&#039;s Blog","og_description":"\u5728ubuntu\u4e0a\u5b89\u88c5drcom\u5f88\u7b80\u5355 \u53ea\u8981make&amp;&amp;make install\u5c31\u884c\u4e86 \u4f46\u5728gentoo\u5374\u9047\u5230\u4e86\u5f88\u591a\u95ee\u9898 \uff0c\u5148\u662f\u4e0d\u80fd\u7f16\u8bd1\uff0c\u5c11\u4e86\u4ec0\u4e48\u53d8\u91cf\uff0csecurity_ops\uff0c\u7136\u540e\u5230\u7f51\u4e0a\u641c\uff0c\u597d\u4e0d\u5bb9\u6613\u627e\u5230\u4e86\u4e00\u4e2a\u89e3\u51b3\u65b9\u6cd5\uff0c\uff08\u5f53\u65f6\u6211\u7684\u5185\u6838\u662f2.6.22\uff0c\u540e\u6765\u624d\u66f4\u65b0\u52302.6.24\uff09 \u5728\u7f51\u53cbzrx550 http:\/\/hi.baidu.com\/z%5Fr%5Fx\u90a3\u770b\u5230\u8fd9\u7bc7\u6587\u7ae0 \uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d\uff0d linux\u4e0b\u7684drcom\u662f\u57282.6\u7684\u5185\u6838\u4e2d\u5f00\u53d1\u7684\uff0c\u7528\u5230\u4e86&lt;linux\/security.h&gt;\u4e2d\u7684security_ops\u3002&gt;\u4f46\u662f\u8fd9\u4e2a EXPORT_SYMBOL \u57282.6.24\u7684\u5185\u6838\u4e2d\u88ab\u53d6\u6d88\u4e86\uff0c\u5bfc\u81f4drcom\u4e0d\u80fd\u88ab\u6210\u529f\u7684\u7f16\u8bd1\u3002\u968f\u4e4b \u800c\u6765\u7684\u95ee\u9898\u5c31\u662f\u65b0\u5185\u6838\u5728\u9700\u8981drcom\u7684\u7f51\u7edc\u73af\u5883\u4e2d\u4e0d\u80fd\u4e0a\u7f51\u4e86\u3002\u5c31\u8fd9\u4e2a\u95ee\u9898\u6211\u8bf7\u6559\u4e86\u5f00\u6e90\u7248&gt;\u672cdrcom\u5f00\u53d1\u8005\u4e4b\u4e00\u7684Wheelz\u3002\u76ee\u524d\u6700\u7b80\u5355\u7684\u529e\u6cd5\u53ea\u80fd\u4fee\u6539\u5185\u6838\uff0c\u91cd\u65b0\u7f16\u8bd1\u3002\u9488\u5bf92.6.24\u7684&gt;\u5185\u6838,\u5177\u4f53\u529e\u6cd5\u5982\u4e0b\uff1a 1) \u5728\u5185\u6838\u7684security\/security.c\u6587\u4ef6\u7684\u6700\u540e\u52a0\u4e0aEXPORT_SYMBOL(security_ops); 2) \u91cd\u65b0\u7f16\u8bd1\u4e00\u4e0b\u5185\u6838\u3002 3) drcom-1.3.7\/kmod\/proto.c\u5728#include &lt;linux\/security.h&gt;\u540e\u9762\u52a0\u4e0a\u4e00\u53e5\uff1a extern struct security_operations *security_ops; 4\uff09\u7f16\u8bd1\u5b89\u88c5drcom\u3002 \u4f46\u5374\u59cb\u7ec8\u4e0d\u8d77\u4f5c\u7528\uff0c\u7f16\u8bd1\u4e86\u597d\u51e0\u6b21\u5185\u6838\uff0c\u59cb\u7ec8\u6ca1\u7528\uff0c\u540e\u6765\u5728.config \u4e2d\u52a0\u5165 \u5148 grep SECURITY .config \u7136\u540evim .config CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y \u524d\u51e0\u6b21\u7f16\u8bd1\u90fd\u4e0d\u6210\u529f\uff0c\u597d\u50cf\u7f16\u8bd1\u65f6\u91cd\u65b0\u914d\u7f6e\u5185\u6838\uff0c\u7acb\u9a6c^C, \u7136\u540e\u53c8\u4e00\u6b21\u6b21\u507f\u8bd5\uff0c\u7ec8\u4e8e\u53ef\u4ee5\u4e86\u3002 \u5230\u8fd9\u91cc\u6211\u53d1\u73b0\u4e86\u4e00\u4e2a\u95ee\u9898\uff0c\u4e00\u822c\u60c5\u51b5\u4e86\u6211\u91cd\u65b0\u7f16\u8bd1\u5185\u6838\u90fd\u4e0d\u4f1a make clean \u800c\u8fd9\u6b21\u7f16\u8bd1\u4e867\u5206\u949f\uff0c\u6240\u4ee5\u6211\u89c9\u5f97\u5b83\u5e94\u8be5\u5c06\u5185\u6838\u91cd\u65b0\u7f16\u8bd1\u4e86\u4e00\u904d\uff0c\u4ee5\u524d\u7f16\u8bd1\u65f6\u53ea\u8981\u5f88\u77ed\u7684\u65f6\u95f4\uff0c\u7279\u522b\u662f\u6539\u52a8\u5f88\u5c11\u7684\u65f6\u5019\uff0c\u56e0\u4e3a\u5b83\u6ca1\u6709\u5168\u90e8\u91cd\u65b0\u7f16\u8bd1\uff0c\u53ea\u662f\u7f16\u8bd1\u4e86\u90a3\u4e9b\u914d\u7f6e\u6539\u53d8\u4e86\u7684\u90e8\u5206\uff0c\u800c\u5f53\u5b83\u4eec\u7684\u4f9d\u8d56\u5173\u7cfb\u6bd4\u8f83\u4e25\u91cd\u65f6\uff0c\u7cfb\u7edf\u5c31\u4f1a\u81ea\u52a8\u5168\u90e8\u91cd\u65b0\u7f16\u8bd1\uff0c\u6240\u4ee5\u4ee5\u540e\u5f53\u5185\u6838\u65390\u52a8\u6bd4\u8f83\u5927\u65f6\uff0c\u6700\u597d\u5148make","og_url":"https:\/\/pjq.me\/?p=52","og_site_name":"Jianqing&#039;s Blog","article_published_time":"2008-03-24T06:12:41+00:00","article_modified_time":"2018-12-07T15:16:35+00:00","author":"pengjianqing","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pengjianqing","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pjq.me\/?p=52#article","isPartOf":{"@id":"https:\/\/pjq.me\/?p=52"},"author":{"name":"pengjianqing","@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"headline":"drcom\u7684\u5b89\u88c5\u4e4b\u5343\u8f9b\u4e07\u82e6","datePublished":"2008-03-24T06:12:41+00:00","dateModified":"2018-12-07T15:16:35+00:00","mainEntityOfPage":{"@id":"https:\/\/pjq.me\/?p=52"},"wordCount":1446,"commentCount":0,"publisher":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"articleSection":["gentoo","Software","Tech","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pjq.me\/?p=52#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pjq.me\/?p=52","url":"https:\/\/pjq.me\/?p=52","name":"drcom\u7684\u5b89\u88c5\u4e4b\u5343\u8f9b\u4e07\u82e6 - Jianqing&#039;s Blog","isPartOf":{"@id":"https:\/\/pjq.me\/#website"},"datePublished":"2008-03-24T06:12:41+00:00","dateModified":"2018-12-07T15:16:35+00:00","breadcrumb":{"@id":"https:\/\/pjq.me\/?p=52#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pjq.me\/?p=52"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pjq.me\/?p=52#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pjq.me\/"},{"@type":"ListItem","position":2,"name":"drcom\u7684\u5b89\u88c5\u4e4b\u5343\u8f9b\u4e07\u82e6"}]},{"@type":"WebSite","@id":"https:\/\/pjq.me\/#website","url":"https:\/\/pjq.me\/","name":"Jianqing&#039;s Blog","description":"Thoughts and Future","publisher":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pjq.me\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60","name":"pengjianqing","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pjq.me\/#\/schema\/person\/image\/","url":"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png","contentUrl":"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png","width":460,"height":752,"caption":"pengjianqing"},"logo":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/image\/"},"url":"https:\/\/pjq.me\/?author=1"}]}},"views":2536,"_links":{"self":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=52"}],"version-history":[{"count":0,"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts\/52\/revisions"}],"wp:attachment":[{"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}