patch-2.4.0-test6 linux/kernel/kmod.c
Next file: linux/kernel/ksyms.c
Previous file: linux/kernel/fork.c
Back to the patch index
Back to the overall index
- Lines: 16
- Date:
Sat Aug 5 22:58:59 2000
- Orig file:
v2.4.0-test5/linux/kernel/kmod.c
- Orig date:
Thu Jul 27 17:38:02 2000
diff -u --recursive --new-file v2.4.0-test5/linux/kernel/kmod.c linux/kernel/kmod.c
@@ -108,7 +108,14 @@
}
/* Drop the "current user" thing */
- free_uid(current);
+ {
+ struct user_struct *user = current->user;
+ current->user = INIT_USER;
+ atomic_inc(&INIT_USER->__count);
+ atomic_inc(&INIT_USER->processes);
+ atomic_dec(&user->processes);
+ free_uid(user);
+ }
/* Give kmod all effective privileges.. */
current->uid = current->euid = current->fsuid = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)