]> granicus.if.org Git - strace/commitdiff
2008-04-19 Dmitry V. Levin <ldv@altlinux.org>
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 3 Sep 2008 00:56:52 +0000 (00:56 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 3 Sep 2008 00:56:52 +0000 (00:56 +0000)
* process.c (sys_prctl): Decode PR_SET_PDEATHSIG, PR_GET_PDEATHSIG,
PR_SET_DUMPABLE, PR_GET_DUMPABLE, PR_SET_KEEPCAPS, PR_GET_KEEPCAPS.
Fix PR_GET_UNALIGN decoder.

ChangeLog
process.c

index e9cded1857cd0d31c65397d3ab53123fc4689bbd..4d9c25de3f6743cb3cb69f96208e8c5c62f7d47e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 2008-04-19  Dmitry V. Levin <ldv@altlinux.org>
 
-       * process.c (prctl_options): Add more constants.
+       * process.c (sys_prctl): Decode PR_SET_PDEATHSIG, PR_GET_PDEATHSIG,
+       PR_SET_DUMPABLE, PR_GET_DUMPABLE, PR_SET_KEEPCAPS, PR_GET_KEEPCAPS.
+       Fix PR_GET_UNALIGN decoder.
+       (prctl_options): Add more constants.
 
        * linux/syscallent.h: Use sys_prctl() decoder for "prctl" syscall.
        * linux/alpha/syscallent.h: Likewise.
index ff1960c9c71fe0c2cb07d159d3e54db345d1021c..bb6164f29246c1069c2f9fc425c23e241431d350 100644 (file)
--- a/process.c
+++ b/process.c
@@ -297,10 +297,24 @@ struct tcb *tcp;
                case PR_GETNSHARE:
                        break;
 #endif
-#ifdef PR_SET_DEATHSIG
+#ifdef PR_SET_PDEATHSIG
+               case PR_SET_PDEATHSIG:
+                       tprintf(", %lu", tcp->u_arg[1]);
+                       break;
+#endif
+#ifdef PR_GET_PDEATHSIG
                case PR_GET_PDEATHSIG:
                        break;
 #endif
+#ifdef PR_SET_DUMPABLE
+               case PR_SET_DUMPABLE:
+                       tprintf(", %lu", tcp->u_arg[1]);
+                       break;
+#endif
+#ifdef PR_GET_DUMPABLE
+               case PR_GET_DUMPABLE:
+                       break;
+#endif
 #ifdef PR_SET_UNALIGN
                case PR_SET_UNALIGN:
                        tprintf(", %s", unalignctl_string(tcp->u_arg[1]));
@@ -310,6 +324,15 @@ struct tcb *tcp;
                case PR_GET_UNALIGN:
                        tprintf(", %#lx", tcp->u_arg[1]);
                        break;
+#endif
+#ifdef PR_SET_KEEPCAPS
+               case PR_SET_KEEPCAPS:
+                       tprintf(", %lu", tcp->u_arg[1]);
+                       break;
+#endif
+#ifdef PR_GET_KEEPCAPS
+               case PR_GET_KEEPCAPS:
+                       break;
 #endif
                default:
                        for (i = 1; i < tcp->u_nargs; i++)
@@ -320,23 +343,26 @@ struct tcb *tcp;
                switch (tcp->u_arg[0]) {
 #ifdef PR_GET_PDEATHSIG
                case PR_GET_PDEATHSIG:
-                       for (i=1; i<tcp->u_nargs; i++)
-                               tprintf(", %#lx", tcp->u_arg[i]);
+                       if (umove(tcp, tcp->u_arg[1], &i) < 0)
+                               tprintf(", %#lx", tcp->u_arg[1]);
+                       else
+                               tprintf(", {%u}", i);
                        break;
 #endif
-#ifdef PR_SET_UNALIGN
-               case PR_SET_UNALIGN:
-                       break;
+#ifdef PR_GET_DUMPABLE
+               case PR_GET_DUMPABLE:
+                       return RVAL_UDECIMAL;
 #endif
 #ifdef PR_GET_UNALIGN
                case PR_GET_UNALIGN:
-               {
-                       int ctl;
-
-                       umove(tcp, tcp->u_arg[1], &ctl);
-                       tcp->auxstr = unalignctl_string(ctl);
+                       if (syserror(tcp) || umove(tcp, tcp->u_arg[1], &i) < 0)
+                               break;
+                       tcp->auxstr = unalignctl_string(i);
                        return RVAL_STR;
-               }
+#endif
+#ifdef PR_GET_KEEPCAPS
+               case PR_GET_KEEPCAPS:
+                       return RVAL_UDECIMAL;
 #endif
                default:
                        break;