<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

    主站蜘蛛池模板: 免费无码又爽又刺激网站| 久久精品无码精品免费专区| 日韩毛片免费一二三| 亚洲精品和日本精品| 日本卡1卡2卡三卡免费| 7777久久亚洲中文字幕| 亚洲性日韩精品一区二区三区 | 亚洲无限乱码一二三四区| 男女啪啪永久免费观看网站| 久青草视频在线观看免费| 久久久久精品国产亚洲AV无码| 成全视频在线观看免费| 亚洲一卡2卡3卡4卡乱码 在线| 亚洲人成影院在线无码观看| 亚洲精品免费在线视频| 人人爽人人爽人人片av免费| 亚洲资源在线观看| 亚洲精品高清在线| a毛片基地免费全部视频| 国产美女视频免费观看的网站| 亚洲一卡2卡3卡4卡国产网站| 区三区激情福利综合中文字幕在线一区亚洲视频1 | 内射少妇36P亚洲区| 免费一级毛片正在播放| 亚洲高清视频免费| 国产成人高清精品免费观看| 亚洲一级毛片中文字幕| 亚洲人成亚洲人成在线观看| 成年大片免费视频| 少妇人妻偷人精品免费视频| 麻豆va在线精品免费播放| 亚洲国产成人久久| 久久久久亚洲AV片无码| 亚洲国产精品日韩| 最新免费jlzzjlzz在线播放| 国产成人精品一区二区三区免费| 国产亚洲一卡2卡3卡4卡新区| 亚洲AV人无码综合在线观看| 亚洲精品无码AV中文字幕电影网站| 国产大片91精品免费观看不卡| 一区二区三区免费视频播放器|