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.
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]));
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++)
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;