<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 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    About cannot core dump after setuid on linux server

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

    主站蜘蛛池模板: 一级女性全黄生活片免费看| 国产亚洲综合视频| 国产真人无码作爱免费视频| 免费v片在线观看无遮挡| 亚洲成a人片在线不卡一二三区| 午夜宅男在线永久免费观看网| 亚洲一区电影在线观看| 无人影院手机版在线观看免费| 亚洲日本一线产区和二线产区对比| 美女黄网站人色视频免费国产| 亚洲GV天堂无码男同在线观看| 国产伦一区二区三区免费 | 久久狠狠高潮亚洲精品| 16女性下面扒开无遮挡免费| 亚洲国产成+人+综合| A级毛片内射免费视频| 国产精品亚洲专区一区| 亚洲?V无码乱码国产精品| a级黄色毛片免费播放视频| 久久噜噜噜久久亚洲va久| 亚洲一区免费在线观看| 日韩亚洲国产高清免费视频| 国产婷婷高清在线观看免费 | 一本大道一卡二大卡三卡免费| 亚洲中文字幕久久精品无码喷水| 久久黄色免费网站| 亚洲av永久综合在线观看尤物| 国产免费人人看大香伊| 国产精品免费AV片在线观看| 亚洲人xxx日本人18| 国产精品亚洲产品一区二区三区| 无码日韩精品一区二区免费暖暖 | 青娱乐在线视频免费观看| 亚洲国产另类久久久精品| 无码日韩精品一区二区免费| 一级中文字幕免费乱码专区| 亚洲国产综合专区在线电影| 日韩一区二区三区免费体验| 久久免费精品一区二区| 亚洲成在人线aⅴ免费毛片| 亚洲AV无码第一区二区三区|