<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

    主站蜘蛛池模板: 青草草在线视频永久免费| 7x7x7x免费在线观看| 免费v片在线观看| 色窝窝亚洲av网| 免费人妻av无码专区| 一二三四在线观看免费中文在线观看 | 四虎国产精品免费永久在线| 亚洲一区二区高清| 中文字幕成人免费高清在线视频| 亚洲色一色噜一噜噜噜| 巨胸喷奶水www永久免费| 人人狠狠综合久久亚洲88| 免费h视频在线观看| 亚洲精品成人图区| 成年女人男人免费视频播放| 久久精品国产亚洲AV电影网| 亚洲AⅤ永久无码精品AA| 99免费在线视频| 精品亚洲成a人片在线观看| 久久国产免费福利永久| 亚洲综合无码无在线观看| 吃奶摸下高潮60分钟免费视频| 亚州**色毛片免费观看| 国产成人精品日本亚洲| 久久久久久久免费视频| 日本亚洲高清乱码中文在线观看| 久久久久亚洲av毛片大| 18禁止看的免费污网站| 亚洲最大的成人网| 永久亚洲成a人片777777| 久久国产乱子伦免费精品| 亚洲精品乱码久久久久久V| 最新亚洲成av人免费看| 亚洲免费中文字幕| 美女被免费视频网站| 亚洲国产成人久久精品动漫| 成人免费无码大片a毛片| 9久热这里只有精品免费| 亚洲中字慕日产2020| 亚洲性日韩精品国产一区二区| 91人成网站色www免费下载|