diff options
author | James Morris <jmorris@namei.org> | 2009-02-05 19:01:45 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-02-05 19:01:45 -0500 |
commit | cb5629b10d64a8006622ce3a52bc887d91057d69 (patch) | |
tree | 7c06d8f30783115e3384721046258ce615b129c5 /drivers/char/vt.c | |
parent | 8920d5ad6ba74ae8ab020e90cc4d976980e68701 (diff) | |
parent | f01d1d546abb2f4028b5299092f529eefb01253a (diff) |
Merge branch 'master' into next
Conflicts:
fs/namei.c
Manually merged per:
diff --cc fs/namei.c
index 734f2b5,bbc15c2..0000000
--- a/fs/namei.c
+++ b/fs/namei.c
@@@ -860,9 -848,8 +849,10 @@@ static int __link_path_walk(const char
nd->flags |= LOOKUP_CONTINUE;
err = exec_permission_lite(inode);
if (err == -EAGAIN)
- err = vfs_permission(nd, MAY_EXEC);
+ err = inode_permission(nd->path.dentry->d_inode,
+ MAY_EXEC);
+ if (!err)
+ err = ima_path_check(&nd->path, MAY_EXEC);
if (err)
break;
@@@ -1525,14 -1506,9 +1509,14 @@@ int may_open(struct path *path, int acc
flag &= ~O_TRUNC;
}
- error = vfs_permission(nd, acc_mode);
+ error = inode_permission(inode, acc_mode);
if (error)
return error;
+
- error = ima_path_check(&nd->path,
++ error = ima_path_check(path,
+ acc_mode & (MAY_READ | MAY_WRITE | MAY_EXEC));
+ if (error)
+ return error;
/*
* An append-only file must be opened in append mode for writing.
*/
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 008176edbd64..7900bd63b36d 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -819,8 +819,8 @@ static inline int resize_screen(struct vc_data *vc, int width, int height, | |||
819 | * ctrl_lock of the tty IFF a tty is passed. | 819 | * ctrl_lock of the tty IFF a tty is passed. |
820 | */ | 820 | */ |
821 | 821 | ||
822 | static int vc_do_resize(struct tty_struct *tty, struct tty_struct *real_tty, | 822 | static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, |
823 | struct vc_data *vc, unsigned int cols, unsigned int lines) | 823 | unsigned int cols, unsigned int lines) |
824 | { | 824 | { |
825 | unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0; | 825 | unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0; |
826 | unsigned int old_cols, old_rows, old_row_size, old_screen_size; | 826 | unsigned int old_cols, old_rows, old_row_size, old_screen_size; |
@@ -932,7 +932,7 @@ static int vc_do_resize(struct tty_struct *tty, struct tty_struct *real_tty, | |||
932 | ws.ws_row = vc->vc_rows; | 932 | ws.ws_row = vc->vc_rows; |
933 | ws.ws_col = vc->vc_cols; | 933 | ws.ws_col = vc->vc_cols; |
934 | ws.ws_ypixel = vc->vc_scan_lines; | 934 | ws.ws_ypixel = vc->vc_scan_lines; |
935 | tty_do_resize(tty, real_tty, &ws); | 935 | tty_do_resize(tty, &ws); |
936 | } | 936 | } |
937 | 937 | ||
938 | if (CON_IS_VISIBLE(vc)) | 938 | if (CON_IS_VISIBLE(vc)) |
@@ -954,13 +954,12 @@ static int vc_do_resize(struct tty_struct *tty, struct tty_struct *real_tty, | |||
954 | 954 | ||
955 | int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows) | 955 | int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows) |
956 | { | 956 | { |
957 | return vc_do_resize(vc->vc_tty, vc->vc_tty, vc, cols, rows); | 957 | return vc_do_resize(vc->vc_tty, vc, cols, rows); |
958 | } | 958 | } |
959 | 959 | ||
960 | /** | 960 | /** |
961 | * vt_resize - resize a VT | 961 | * vt_resize - resize a VT |
962 | * @tty: tty to resize | 962 | * @tty: tty to resize |
963 | * @real_tty: tty if a pty/tty pair | ||
964 | * @ws: winsize attributes | 963 | * @ws: winsize attributes |
965 | * | 964 | * |
966 | * Resize a virtual terminal. This is called by the tty layer as we | 965 | * Resize a virtual terminal. This is called by the tty layer as we |
@@ -970,15 +969,13 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows) | |||
970 | * Takes the console sem and the called methods then take the tty | 969 | * Takes the console sem and the called methods then take the tty |
971 | * termios_mutex and the tty ctrl_lock in that order. | 970 | * termios_mutex and the tty ctrl_lock in that order. |
972 | */ | 971 | */ |
973 | 972 | static int vt_resize(struct tty_struct *tty, struct winsize *ws) | |
974 | int vt_resize(struct tty_struct *tty, struct tty_struct *real_tty, | ||
975 | struct winsize *ws) | ||
976 | { | 973 | { |
977 | struct vc_data *vc = tty->driver_data; | 974 | struct vc_data *vc = tty->driver_data; |
978 | int ret; | 975 | int ret; |
979 | 976 | ||
980 | acquire_console_sem(); | 977 | acquire_console_sem(); |
981 | ret = vc_do_resize(tty, real_tty, vc, ws->ws_col, ws->ws_row); | 978 | ret = vc_do_resize(tty, vc, ws->ws_col, ws->ws_row); |
982 | release_console_sem(); | 979 | release_console_sem(); |
983 | return ret; | 980 | return ret; |
984 | } | 981 | } |
@@ -2679,7 +2676,7 @@ static int con_write_room(struct tty_struct *tty) | |||
2679 | { | 2676 | { |
2680 | if (tty->stopped) | 2677 | if (tty->stopped) |
2681 | return 0; | 2678 | return 0; |
2682 | return 4096; /* No limit, really; we're not buffering */ | 2679 | return 32768; /* No limit, really; we're not buffering */ |
2683 | } | 2680 | } |
2684 | 2681 | ||
2685 | static int con_chars_in_buffer(struct tty_struct *tty) | 2682 | static int con_chars_in_buffer(struct tty_struct *tty) |