[SCM] SAMBA-CTDB repository - branch v3-4-ctdb updated - 3.4.7-ctdb-9-33-g2ec067f

Michael Adam obnox at samba.org
Tue Sep 21 18:03:24 MDT 2010


The branch, v3-4-ctdb has been updated
       via  2ec067f43fd8844adef8590e605c341449e7be00 (commit)
      from  946de2d0a6a1107bd80758f78b7cc68fd8d20134 (commit)

http://gitweb.samba.org/?p=obnox/samba-ctdb.git;a=shortlog;h=v3-4-ctdb


- Log -----------------------------------------------------------------
commit 2ec067f43fd8844adef8590e605c341449e7be00
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Sep 20 13:49:19 2010 +0930

    Really enable core dumps in Linux
    
    commit e1f1ce68e1f685400a8c68bcec14018e3d1fc29d
    Author: Rusty Russell <rusty at rustcorp.com.au>
    Date:   Mon Sep 20 13:33:30 2010 +0930
    
        source3: dump core on Linux, even after seteuid/etc.
    
        The "dumpable" flag is reset on every call to set*uid, so we need to
        reset it to 1 in the signal handler itself.
    
        This code dates back to commit ac01fda2b97b 6 years ago :(
    
        Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Signed-off-by: Michael Adam <obnox at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/fault.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/fault.c b/source3/lib/fault.c
index 6430c8e..18b6941 100644
--- a/source3/lib/fault.c
+++ b/source3/lib/fault.c
@@ -319,14 +319,6 @@ void dump_core_setup(const char *progname)
 #endif
 #endif
 
-#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
-	/* On Linux we lose the ability to dump core when we change our user
-	 * ID. We know how to dump core safely, so let's make sure we have our
-	 * dumpable flag set.
-	 */
-	prctl(PR_SET_DUMPABLE, 1);
-#endif
-
 	/* FIXME: if we have a core-plus-pid facility, configurably set
 	 * this up here.
 	 */
@@ -382,6 +374,14 @@ void dump_core_setup(const char *progname)
 	umask(~(0700));
 	dbgflush();
 
+#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
+	/* On Linux we lose the ability to dump core when we change our user
+	 * ID. We know how to dump core safely, so let's make sure we have our
+	 * dumpable flag set.
+	 */
+	prctl(PR_SET_DUMPABLE, 1);
+#endif
+
 	/* Ensure we don't have a signal handler for abort. */
 #ifdef SIGABRT
 	CatchSignal(SIGABRT,SIGNAL_CAST SIG_DFL);


-- 
SAMBA-CTDB repository


More information about the samba-cvs mailing list