<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 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    About cannot core dump after setuid on linux server

    Posted on 2012-05-30 15:32 Milo的海域 閱讀(414) 評(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

    主站蜘蛛池模板: 国产精品99爱免费视频| 爱情岛论坛亚洲品质自拍视频网站| 中文字幕无码免费久久9一区9| 国产大片91精品免费看3| 国产综合成人亚洲区| 四虎免费久久影院| 黄色网址在线免费观看| 国产一区在线观看免费| 亚洲精品国产日韩无码AV永久免费网 | 中文字幕亚洲不卡在线亚瑟| 一区二区免费电影| 亚洲中文字幕在线观看| 三级毛片在线免费观看| 亚洲天天在线日亚洲洲精| 免费在线观看h片| 亚洲一区二区三区成人网站 | 久久精品无码专区免费东京热| 久久久久亚洲精品日久生情 | 国产免费卡一卡三卡乱码| 国产成人久久精品亚洲小说| 亚洲午夜爱爱香蕉片| 你是我的城池营垒免费看| 久久久久亚洲Av无码专| 毛片a级毛片免费观看品善网| 国产成人综合亚洲| 亚洲国产另类久久久精品黑人| 99久久人妻精品免费二区| 亚洲国产日韩在线人成下载| 国产免费卡一卡三卡乱码| 丝袜捆绑调教视频免费区| 亚洲国产品综合人成综合网站| 国产午夜免费秋霞影院| 最好免费观看高清在线 | 久久亚洲2019中文字幕| 99re在线这里只有精品免费| 最新国产精品亚洲| 久久亚洲AV永久无码精品| 国产在线jyzzjyzz免费麻豆| 一级做a爰片久久毛片免费陪| 老司机亚洲精品影院无码| 国产麻豆剧传媒精品国产免费 |