Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 591
b: refs/heads/master
c: 456be6c
h: refs/heads/master
i:
  589: c8fa1de
  587: 82e99e8
  583: f98cf4d
  575: 04f7d65
v: v3
  • Loading branch information
Steve Grubb authored and unknown committed Apr 29, 2005
1 parent d6e4d69 commit 5e11813
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37509e749dc2072e667db806ef24b9e897f61b8a
refs/heads/master: 456be6cd90dbbb9b0ea01d56932d56d110d51cf7
2 changes: 1 addition & 1 deletion trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
goto out_free_page;

}
length = audit_set_loginuid(task->audit_context, loginuid);
length = audit_set_loginuid(task, loginuid);
if (likely(length == 0))
length = count;

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ extern int audit_receive_filter(int type, int pid, int uid, int seq,
void *data, uid_t loginuid);
extern void audit_get_stamp(struct audit_context *ctx,
struct timespec *t, unsigned int *serial);
extern int audit_set_loginuid(struct audit_context *ctx, uid_t loginuid);
extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid);
extern uid_t audit_get_loginuid(struct audit_context *ctx);
extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode);
#else
Expand Down
9 changes: 5 additions & 4 deletions trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,20 +1010,21 @@ void audit_get_stamp(struct audit_context *ctx,

extern int audit_set_type(struct audit_buffer *ab, int type);

int audit_set_loginuid(struct audit_context *ctx, uid_t loginuid)
int audit_set_loginuid(struct task_struct *task, uid_t loginuid)
{
if (ctx) {
if (task->audit_context) {
struct audit_buffer *ab;

ab = audit_log_start(NULL);
if (ab) {
audit_log_format(ab, "login pid=%d uid=%u "
"old loginuid=%u new loginuid=%u",
ctx->pid, ctx->uid, ctx->loginuid, loginuid);
task->pid, task->uid,
task->audit_context->loginuid, loginuid);
audit_set_type(ab, AUDIT_LOGIN);
audit_log_end(ab);
}
ctx->loginuid = loginuid;
task->audit_context->loginuid = loginuid;
}
return 0;
}
Expand Down

0 comments on commit 5e11813

Please sign in to comment.