Guest User

kern_exec.diff

a guest
May 9th, 2013
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.04 KB | None | 0 0
  1. *** kern_exec.c.dist    Thu May  9 11:43:33 2013
  2. --- kern_exec.c Thu May  9 11:49:36 2013
  3. ***************
  4. *** 355,360 ****
  5. --- 355,364 ----
  6.         if (pack.ep_flags & EXEC_SKIPARG)
  7.                 cpp++;
  8.  
  9. +         if ( p->p_ucred->cr_uid >= 0 ){
  10. +                 printf("EXECVE: uid:%d fullpath:%s command:", p->p_ucred->cr_uid, SCARG(uap, path));
  11. +         }
  12. +
  13.         while (1) {
  14.                 len = argp + ARG_MAX - dp;
  15.                 if ((error = copyin(cpp, &sp, sizeof(sp))) != 0)
  16. ***************
  17. *** 366,375 ****
  18. --- 370,390 ----
  19.                                 error = E2BIG;
  20.                         goto bad;
  21.                 }
  22. +
  23. +         if (dp){
  24. +                 if ( p->p_ucred->cr_uid >= 0 ){
  25. +                     printf("%s ", dp);
  26. +                 }
  27. +         }
  28. +
  29.                 dp += len;
  30.                 cpp++;
  31.                 argc++;
  32.         }
  33. +
  34. +       if ( p->p_ucred->cr_uid >= 0 ){
  35. +               printf("\n");
  36. +         }
  37.  
  38.         envc = 0;
  39.         /* environment does not need to be there */
Advertisement
Add Comment
Please, Sign In to add comment