1. 29 Apr, 2005 4 commits
    • 's avatar
      [AUDIT] Don't allow ptrace to fool auditing, log arch of audited syscalls. · 2fd6f58b
      We were calling ptrace_notify() after auditing the syscall and arguments,
      but the debugger could have _changed_ them before the syscall was actually
      invoked. Reorder the calls to fix that.
      While we're touching ever call to audit_syscall_entry(), we also make it
      take an extra argument: the architecture of the syscall which was made,
      because some architectures allow more than one type of syscall.
      Also add an explicit success/failure flag to audit_syscall_exit(), for
      the benefit of architectures which return that in a condition register
      rather than only returning a single register.
      Change type of syscall return value to 'long' not 'int'.
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
    • Prasanna Meda's avatar
      namei: add audit_inode to all branches in path_lookup · ea3834d9
      Prasanna Meda authored
      Main change is in path_lookup: added a goto to do audit_inode
      instead of return statement, when emul_lookup_dentry for root
      is successful.The existing code does audit_inode only when
      lookup is done in normal root or cwd.
      Other changes: Some lookup routines are returning zero on success,
      and some are returning zero on failure. I documented the related
      function signatures in this code path, so that one can glance over
      abstract functions without understanding the entire code.
      Signed-off-by: default avatarPrasanna Meda <pmeda@akamai.com>
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
    • Andrew Morton's avatar
      audit_log_untrustedstring() warning fix · 81b7854d
      Andrew Morton authored
      kernel/audit.c: In function `audit_log_untrustedstring':
      kernel/audit.c:736: warning: comparison is always false due to limited range of data type
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
    • 's avatar
      AUDIT: Avoid log pollution by untrusted strings. · 83c7d091
      We log strings from userspace, such as arguments to open(). These could
      be formatted to contain \n followed by fake audit log entries. Provide
      a function for logging such strings, which gives a hex dump when the
      string contains anything but basic printable ASCII characters. Use it
      for logging filenames.
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
  2. 28 Apr, 2005 36 commits