History

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.

Eric Paris committed 14 years ago

Commit 0a300be1 parent 54d32183 files · +5 −5Browse files

Showing the changes to kernel (1 of 3 files). Show all

Unified · Split

kernel/auditsc.c+3−3
@@ -2163,16 +2163,16 @@ int auditsc_get_stamp(struct audit_context *ctx, · 2162 unmodified lines
21632163 static atomic_t session_id = ATOMIC_INIT(0);
21642164
21652165 /**
2166− * audit_set_loginuid - set a task's audit_context loginuid
2167− * @task: task whose audit context is being modified
2166+ * audit_set_loginuid - set current task's audit_context loginuid
21682167 * @loginuid: loginuid value
21692168 *
21702169 * Returns 0.
21712170 *
21722171 * Called (set) from fs/proc/base.c::proc_loginuid_write().
21732172 */
2174−int audit_set_loginuid(struct task_struct *task, uid_t loginuid)
2173+int audit_set_loginuid(uid_t loginuid)
21752174 {
2175+ struct task_struct *task = current;
21762176 unsigned int sessionid = atomic_inc_return(&session_id);
21772177 struct audit_context *context = task->audit_context;
21782178