mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 09:12:07 +00:00
Merge branch 'master' of git://git.code.sf.net/p/tomoyo/tomoyo.git
This commit is contained in:
commit
a9b77c57e3
@ -2665,7 +2665,7 @@ ssize_t tomoyo_write_control(struct tomoyo_io_buffer *head,
|
||||
|
||||
if (head->w.avail >= head->writebuf_size - 1) {
|
||||
const int len = head->writebuf_size * 2;
|
||||
char *cp = kzalloc(len, GFP_NOFS);
|
||||
char *cp = kzalloc(len, GFP_NOFS | __GFP_NOWARN);
|
||||
|
||||
if (!cp) {
|
||||
error = -ENOMEM;
|
||||
|
@ -722,10 +722,17 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm)
|
||||
ee->bprm = bprm;
|
||||
ee->r.obj = &ee->obj;
|
||||
ee->obj.path1 = bprm->file->f_path;
|
||||
/* Get symlink's pathname of program. */
|
||||
/*
|
||||
* Get symlink's pathname of program, but fallback to realpath if
|
||||
* symlink's pathname does not exist or symlink's pathname refers
|
||||
* to proc filesystem (e.g. /dev/fd/<num> or /proc/self/fd/<num> ).
|
||||
*/
|
||||
exename.name = tomoyo_realpath_nofollow(original_name);
|
||||
if (exename.name && !strncmp(exename.name, "proc:/", 6)) {
|
||||
kfree(exename.name);
|
||||
exename.name = NULL;
|
||||
}
|
||||
if (!exename.name) {
|
||||
/* Fallback to realpath if symlink's pathname does not exist. */
|
||||
exename.name = tomoyo_realpath_from_path(&bprm->file->f_path);
|
||||
if (!exename.name)
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user