<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 88, comments - 3, trackbacks - 0, articles - 0
      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    About cannot core dump after setuid on linux server

    Posted on 2012-05-30 15:32 Milo的海域 閱讀(426) 評(píng)論(0)  編輯  收藏 所屬分類: MySQLLinuxSkills
    In many cases, binaries can no longer dump core after calling setuid(). 
    Under Linux it is possible to re-enable this with a system call.

    e.g.

    +#ifdef __linux__
    +#include <sys/prctl.h>
    +#endif
    +
     #ifdef HAVE_purify
     
    #define IF_PURIFY(A,B) (A)
     
    #else
    @@ 
    -1362,6 +1366,10 @@
         sql_perror(
    "setuid");
         unireg_abort(
    1);
       }
    +#ifdef __linux__
    +  /* inform kernel that process is dumpable */
    +  prctl(PR_SET_DUMPABLE,1,0,0,0);
    +#endif /* __linux__ */
     
    #endif
    Manual of prctl
           PR_SET_DUMPABLE
                  (Since Linux 
    2.4) Set the state of the flag determining whether core dumps are produced for this process  upon  delivery  of  a
                  signal  whose  default  behaviour  is  to  produce a core dump.  (Normally this flag is set for a process by default
    , but it is
                  cleared when a set-user-ID or set-group-ID program is executed and also by various system calls that  manipulate  process  UIDs
                  and  GIDs).  In kernels up to and including 
    2.6.12, arg2 must be either 0 (process is not dumpable) or 1 (process is dumpable).
                  Since kernel 
    2.6.13, the value 2 is also permitted; this causes any binary which normally would not  be  dumped  to  be  dumped
                  readable by root only.  (See also the description of /proc/sys/fs/suid_dumpable in proc(5).)


    Ref: http://bugs.mysql.com/bug.php?id=21723
    Some files about linux core dump:
    /proc/sys/fs/suid_dumpable
    /etc/profile
    /etc/security/limits.conf
    /proc/sys/kernel/core_pattern

    主站蜘蛛池模板: 久久影院亚洲一区| 久久久久成人片免费观看蜜芽| 亚洲色欲啪啪久久WWW综合网| 国产zzjjzzjj视频全免费| 无码视频免费一区二三区| 夜夜亚洲天天久久| 免费一级毛片无毒不卡| 91嫩草国产在线观看免费| 亚洲美女自拍视频| 日韩视频在线精品视频免费观看| 成人毛片18女人毛片免费视频未| 亚洲精品无码你懂的网站| 亚洲色精品vr一区二区三区| 亚洲精品456在线播放| 无码色偷偷亚洲国内自拍| 爽爽日本在线视频免费| 国产成人亚洲综合无| 中文字幕亚洲日本岛国片| 午夜不卡久久精品无码免费| 国产免费人成视频在线观看| 亚洲欧洲日产韩国在线| 国产福利免费视频 | 亚洲成在人线aⅴ免费毛片| 亚洲一区二区三区丝袜| 中文字幕久精品免费视频| 69pao强力打造免费高清| 免费大黄网站在线看| jyzzjyzz国产免费观看| 亚洲v高清理论电影| 日韩版码免费福利视频| 久久亚洲精品国产精品黑人| 中文字幕免费在线看线人| 91丁香亚洲综合社区| 午夜无码A级毛片免费视频| 亚洲一区无码中文字幕乱码| 久久久久久国产精品免费无码| 免费可以在线看A∨网站| 天天摸夜夜摸成人免费视频| 无套内射无矿码免费看黄| 久久久亚洲精品视频| 日本特黄特色aa大片免费|