Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
TOMOYO: Don't abuse sys_getpid(), sys_getppid()

+5 -4
+5 -1
security/tomoyo/common.c
··· 1416 1416 const pid_t gpid = task_pid_nr(current); 1417 1417 static const int tomoyo_buffer_len = 4096; 1418 1418 char *buffer = kmalloc(tomoyo_buffer_len, GFP_NOFS); 1419 + pid_t ppid; 1419 1420 if (!buffer) 1420 1421 return NULL; 1421 1422 do_gettimeofday(&tv); 1423 + rcu_read_lock(); 1424 + ppid = task_tgid_vnr(current->real_parent); 1425 + rcu_read_unlock(); 1422 1426 snprintf(buffer, tomoyo_buffer_len - 1, 1423 1427 "#timestamp=%lu profile=%u mode=%s (global-pid=%u)" 1424 1428 " task={ pid=%u ppid=%u uid=%u gid=%u euid=%u" 1425 1429 " egid=%u suid=%u sgid=%u fsuid=%u fsgid=%u }", 1426 1430 tv.tv_sec, r->profile, tomoyo_mode[r->mode], gpid, 1427 - (pid_t) sys_getpid(), (pid_t) sys_getppid(), 1431 + task_tgid_vnr(current), ppid, 1428 1432 current_uid(), current_gid(), current_euid(), 1429 1433 current_egid(), current_suid(), current_sgid(), 1430 1434 current_fsuid(), current_fsgid());
-3
security/tomoyo/common.h
··· 689 689 690 690 /********** Function prototypes. **********/ 691 691 692 - extern asmlinkage long sys_getpid(void); 693 - extern asmlinkage long sys_getppid(void); 694 - 695 692 /* Check whether the given string starts with the given keyword. */ 696 693 bool tomoyo_str_starts(char **src, const char *find); 697 694 /* Get tomoyo_realpath() of current process. */