<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

    主站蜘蛛池模板: 亚洲国语精品自产拍在线观看| 大胆亚洲人体视频| 亚洲黄色在线观看网站| 免费观看91视频| 久久精品国产亚洲一区二区| 免费网站观看WWW在线观看| 丁香五月亚洲综合深深爱| 国产一级一毛免费黄片| 亚洲男同帅GAY片在线观看| 三级黄色片免费看| 亚洲AV福利天堂一区二区三| 蜜桃视频在线观看免费视频网站WWW| 亚洲第一视频网站| 日韩精品久久久久久免费| 亚洲男人天堂影院| 成年私人影院免费视频网站| 特黄aa级毛片免费视频播放| 亚洲婷婷国产精品电影人久久| 国产在线观a免费观看| 香蕉蕉亚亚洲aav综合| 18禁免费无码无遮挡不卡网站| 国产色在线|亚洲| 四虎永久精品免费观看| 国产99视频精品免费视频76| 亚洲一区二区在线免费观看| 黄页网站免费在线观看| 老司机精品视频免费| 久久久亚洲欧洲日产国码农村| 免费无码精品黄AV电影| 高潮毛片无遮挡高清免费视频| 国产亚洲福利精品一区| 国产一卡2卡3卡4卡2021免费观看 国产一卡2卡3卡4卡无卡免费视频 | 国产久爱免费精品视频| 亚洲国产精品嫩草影院在线观看| 成人免费福利视频| 色婷婷亚洲一区二区三区| 亚洲欧洲精品无码AV| 大学生一级毛片免费看| 九九免费观看全部免费视频| 亚洲国产理论片在线播放| 亚洲av无码成人精品区在线播放|