mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
audit: remove task argument to audit_set_loginuid
The function always deals with current. Don't expose an option pretending one can use it for something. You can't. Signed-off-by: Eric Paris <eparis@redhat.com>
This commit is contained in:
parent
54d3218b31
commit
0a300be6d5
@ -1228,7 +1228,7 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
|
||||
goto out_free_page;
|
||||
|
||||
}
|
||||
length = audit_set_loginuid(current, loginuid);
|
||||
length = audit_set_loginuid(loginuid);
|
||||
if (likely(length == 0))
|
||||
length = count;
|
||||
|
||||
|
@ -489,7 +489,7 @@ static inline void audit_ptrace(struct task_struct *t)
|
||||
extern unsigned int audit_serial(void);
|
||||
extern int auditsc_get_stamp(struct audit_context *ctx,
|
||||
struct timespec *t, unsigned int *serial);
|
||||
extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid);
|
||||
extern int audit_set_loginuid(uid_t loginuid);
|
||||
#define audit_get_loginuid(t) ((t)->loginuid)
|
||||
#define audit_get_sessionid(t) ((t)->sessionid)
|
||||
extern void audit_log_task_context(struct audit_buffer *ab);
|
||||
|
@ -2163,16 +2163,16 @@ int auditsc_get_stamp(struct audit_context *ctx,
|
||||
static atomic_t session_id = ATOMIC_INIT(0);
|
||||
|
||||
/**
|
||||
* audit_set_loginuid - set a task's audit_context loginuid
|
||||
* @task: task whose audit context is being modified
|
||||
* audit_set_loginuid - set current task's audit_context loginuid
|
||||
* @loginuid: loginuid value
|
||||
*
|
||||
* Returns 0.
|
||||
*
|
||||
* Called (set) from fs/proc/base.c::proc_loginuid_write().
|
||||
*/
|
||||
int audit_set_loginuid(struct task_struct *task, uid_t loginuid)
|
||||
int audit_set_loginuid(uid_t loginuid)
|
||||
{
|
||||
struct task_struct *task = current;
|
||||
unsigned int sessionid = atomic_inc_return(&session_id);
|
||||
struct audit_context *context = task->audit_context;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user