s4-fault: changed to use %d for PID, instead of %PID%
authorAndrew Tridgell <tridge@samba.org>
Wed, 13 Jul 2011 07:26:31 +0000 (17:26 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 13 Jul 2011 10:51:05 +0000 (12:51 +0200)
this matches the s3 behaviour

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

lib/util/fault.c
selftest/selftest.pl
selftest/target/Samba4.pm
wintest/test-s4-howto.py

index 708dc670d1610f42ffdc18afb202462c9213f7f2..ed7684aaf37c66166bd3e3dc136038b2c1a76ab5 100644 (file)
@@ -121,7 +121,7 @@ static void smb_panic_default(const char *why)
                char cmdstring[200];
                strlcpy(cmdstring, panic_action, sizeof(cmdstring));
                snprintf(pidstr, sizeof(pidstr), "%d", (int) getpid());
-               all_string_sub(cmdstring, "%PID%", pidstr, sizeof(cmdstring));
+               all_string_sub(cmdstring, "%d", pidstr, sizeof(cmdstring));
                DEBUG(0, ("smb_panic(): calling panic action [%s]\n", cmdstring));
                result = system(cmdstring);
 
index 808be222bb173a19e89dd0ab130eeda156ecf132..218f83ba14df9dea401bfbd57c92d4ed195852d6 100755 (executable)
@@ -643,7 +643,7 @@ sub write_clientconf($$$)
        cache dir = $clientdir/cachedir
        ncalrpc dir = $clientdir/ncalrpcdir
        name resolve order = file bcast
-       panic action = $RealBin/gdb_backtrace \%PID\%
+       panic action = $RealBin/gdb_backtrace \%d
        max xmit = 32K
        notify:inotify = false
        ldb:nosync = true
index 2bb74ca7853cef37b7c60c883a657bf5cba12cb2..2610232c582ed4eaaa623db37d22136588d4708a 100644 (file)
@@ -606,7 +606,7 @@ sub provision_raw_step1($$)
        name resolve order = file bcast
        interfaces = $ctx->{interfaces}
        tls dh params file = $ctx->{tlsdir}/dhparms.pem
-       panic action = $RealBin/gdb_backtrace \%PID%
+       panic action = $RealBin/gdb_backtrace \%d
        wins support = yes
        server role = $ctx->{server_role}
        server services = +echo
index e09f8ba7a9eb70043c4ecd6515a4b034470a5b88..6f8bc7446c423b83b109a2a7723573e352b466fc 100755 (executable)
@@ -50,7 +50,7 @@ def start_s4(t):
     t.chdir("${PREFIX}")
     t.run_cmd('killall -9 -q samba smbd nmbd winbindd', checkfail=False)
     t.run_cmd(['sbin/samba',
-             '--option', 'panic action=gnome-terminal -e "gdb --pid %PID%"'])
+             '--option', 'panic action=gnome-terminal -e "gdb --pid %d"'])
     t.port_wait("${INTERFACE_IP}", 139)
 
 def test_smbclient(t):