27 May, 2005

1 commit


26 May, 2005

1 commit

  • While they were all just simple blobs it made sense to just free them
    as we walked through and logged them. Now that there are pointers to
    other objects which need refcounting, we might as well revert to
    _only_ logging them in audit_log_exit(), and put the code to free them
    properly in only one place -- in audit_free_aux().

    Signed-off-by: David Woodhouse
    ----------------------------------------------------------

    David Woodhouse
     

24 May, 2005

2 commits


22 May, 2005

1 commit

  • Move audit_serial() into audit.c and use it to generate serial numbers
    on messages even when there is no audit context from syscall auditing.
    This allows us to disambiguate audit records when more than one is
    generated in the same millisecond.

    Based on a patch by Steve Grubb after he observed the problem.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

21 May, 2005

2 commits


19 May, 2005

1 commit


17 May, 2005

1 commit


14 May, 2005

2 commits

  • I'm going through the kernel code and have a patch that corrects
    several spelling errors in comments.

    From: Steve Grubb
    Signed-off-by: David Woodhouse

    Steve Grubb
     
  • This patch adds more messages types to the audit subsystem so that audit
    analysis is quicker, intuitive, and more useful.

    Signed-off-by: Steve Grubb
    ---
    I forgot one type in the big patch. I need to add one for user space
    originating SE Linux avc messages. This is used by dbus and nscd.

    -Steve
    ---
    Updated to 2.6.12-rc4-mm1.
    -dwmw2

    Signed-off-by: David Woodhouse

    Steve Grubb
     

11 May, 2005

3 commits

  • Add audit_log_type to allow callers to specify type and pid when logging.
    Convert audit_log to wrapper around audit_log_type. Could have
    converted all audit_log callers directly, but common case is default
    of type AUDIT_KERNEL and pid 0. Update audit_log_start to take type
    and pid values when creating a new audit_buffer. Move sequences that
    did audit_log_start, audit_log_format, audit_set_type, audit_log_end,
    to simply call audit_log_type directly. This obsoletes audit_set_type
    and audit_set_pid, so remove them.

    Signed-off-by: Chris Wright
    Signed-off-by: David Woodhouse

    Chris Wright
     
  • Remove code conditionally dependent on CONFIG_AUDITSYSCALL from audit.c.
    Move these dependencies to audit.h with the rest.

    Signed-off-by: Chris Wright
    Signed-off-by: David Woodhouse

    Chris Wright
     
  • Audit now actually requires netlink. So make it depend on CONFIG_NET,
    and remove the inline dependencies on CONFIG_NET.

    Signed-off-by: Chris Wright
    Signed-off-by: David Woodhouse

    Chris Wright
     

06 May, 2005

1 commit

  • shutdown credential information. It creates a new message type
    AUDIT_TERM_INFO, which is used by the audit daemon to query who issued the
    shutdown.

    It requires the placement of a hook function that gathers the information. The
    hook is after the DAC & MAC checks and before the function returns. Racing
    threads could overwrite the uid & pid - but they would have to be root and
    have policy that allows signalling the audit daemon. That should be a
    manageable risk.

    The userspace component will be released later in audit 0.7.2. When it
    receives the TERM signal, it queries the kernel for shutdown information.
    When it receives it, it writes the message and exits. The message looks
    like this:

    type=DAEMON msg=auditd(1114551182.000) auditd normal halt, sending pid=2650
    uid=525, auditd pid=1685

    Signed-off-by: Steve Grubb
    Signed-off-by: David Woodhouse

    Steve Grubb
     

30 Apr, 2005

1 commit

  • Attached is a new patch that solves the issue of getting valid credentials
    into the LOGIN message. The current code was assuming that the audit context
    had already been copied. This is not always the case for LOGIN messages.

    To solve the problem, the patch passes the task struct to the function that
    emits the message where it can get valid credentials.

    Signed-off-by: Steve Grubb
    Signed-off-by: David Woodhouse

    Steve Grubb
     

29 Apr, 2005

5 commits

  • Most audit control messages are sent over netlink.In order to properly
    log the identity of the sender of audit control messages, we would like
    to add the loginuid to the netlink_creds structure, as per the attached
    patch.

    Signed-off-by: Serge Hallyn
    Signed-off-by: David Woodhouse

    Serge Hallyn
     
  •  
  • Attached is a patch that corrects a signed/unsigned warning. I also noticed
    that we needlessly init serial to 0. That only needs to occur if the kernel
    was compiled without the audit system.

    -Steve Grubb

    Signed-off-by: David Woodhouse

    Steve Grubb
     
  • 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: David Woodhouse

     
  • 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: David Woodhouse

     

19 Apr, 2005

1 commit

  • This fixes a deadlock on the dcache lock detected during testing at IBM
    by moving the logging of the current executable information from the
    SELinux avc_audit function to audit_log_exit (via an audit_log_task_info
    helper) for processing upon syscall exit.

    For consistency, the patch also removes the logging of other
    task-related information from avc_audit, deferring handling to
    audit_log_exit instead.

    This allows simplification of the avc_audit code, allows the exe
    information to be obtained more reliably, always includes the comm
    information (useful for scripts), and avoids including bogus task
    information for checks performed from irq or softirq.

    Signed-off-by: Stephen Smalley
    Signed-off-by: James Morris
    Signed-off-by: Linus Torvalds

    Stephen Smalley
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds