[PATCH 4/8] fs/namespace.c: check permission early in sys_[u]mount

2012-09-27 Thread Yan Hong
We have several branches in sys_mount, each of them will check CAP_SYS_ADMIN capability seperately. Do this check at the beginning of sys_mount. Also check permission as early as possible in sys_umount. Signed-off-by: Yan Hong --- fs/namespace.c | 26 +++--- 1 file

[PATCH 4/8] fs/namespace.c: check permission early in sys_[u]mount

2012-09-27 Thread Yan Hong
We have several branches in sys_mount, each of them will check CAP_SYS_ADMIN capability seperately. Do this check at the beginning of sys_mount. Also check permission as early as possible in sys_umount. Signed-off-by: Yan Hong clouds@gmail.com --- fs/namespace.c | 26