+2
−2
+2
−2
+2
−11
+10
−59
Loading
Gitlab 现已全面支持 git over ssh 与 git over https。通过 HTTPS 访问请配置带有 read_repository / write_repository 权限的 Personal access token。通过 SSH 端口访问请使用 22 端口或 13389 端口。如果使用CAS注册了账户但不知道密码,可以自行至设置中更改;如有其他问题,请发邮件至 service@cra.moe 寻求协助。
It is hard to follow the control flow in exec.c as the code has evolved over
time and something that used to work one way now works another. This set of
changes attempts to address the worst of that, to remove unnecessary work
and to make the code a little easier to follow.
The churn is a bit higher than the last version of this patchset, with
renaming and cleaning up of comments. I have split security_bprm_set_creds
into security_bprm_creds_for_exec and security_bprm_repopulate_creds. My
goal was to make it clear that one hook completes its work while the other
recaculates it's work each time a new interpreter is selected.
I have added a new change at the beginning to make it clear that neither
security_bprm_creds_for_exec nor security_bprm_repopulate_creds needs to be
implemented as prepare_exec_creds properly does the work of setting up
credentials unless something special is going on.
I have made the execfd support generic and moved out of binfmt_misc so that
I can remove the recursion.
I have moved reassigning bprm->file into the loop that replaces the
recursion. In doing so I discovered that binfmt_misc was naughty and
was returning -ENOEXEC in such a way that the search_binary_handler loop
could not continue. So I added a change to remove that naughtiness.
Eric W. Biederman (8):
exec: Teach prepare_exec_creds how exec treats uids & gids
exec: Factor security_bprm_creds_for_exec out of security_bprm_set_creds
exec: Convert security_bprm_set_creds into security_bprm_repopulate_creds
exec: Allow load_misc_binary to call prepare_binfmt unconditionally
exec: Move the call of prepare_binprm into search_binary_handler
exec/binfmt_script: Don't modify bprm->buf and then return -ENOEXEC
exec: Generic execfd support
exec: Remove recursion from search_binary_handler
arch/alpha/kernel/binfmt_loader.c | 11 +----
fs/binfmt_elf.c | 4 +-
fs/binfmt_elf_fdpic.c | 4 +-
fs/binfmt_em86.c | 13 +----
fs/binfmt_misc.c | 69 ++++-----------------------
fs/binfmt_script.c | 82 ++++++++++++++------------------
fs/exec.c | 97 ++++++++++++++++++++++++++------------
include/linux/binfmts.h | 36 ++++++--------
include/linux/lsm_hook_defs.h | 3 +-
include/linux/lsm_hooks.h | 52 +++++++++++---------
include/linux/security.h | 14 ++++--
kernel/cred.c | 3 ++
security/apparmor/domain.c | 7 +--
security/apparmor/include/domain.h | 2 +-
security/apparmor/lsm.c | 2 +-
security/commoncap.c | 9 ++--
security/security.c | 9 +++-
security/selinux/hooks.c | 8 ++--
security/smack/smack_lsm.c | 9 ++--
security/tomoyo/tomoyo.c | 12 ++---
20 files changed, 202 insertions(+), 244 deletions(-)
Link: https://lkml.kernel.org/r/877dx822er.fsf_-_@x220.int.ebiederm.org
Acked-by:
Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by:
"Eric W. Biederman" <ebiederm@xmission.com>
CRA Git | Maintained and supported by SUSTech CRA and CCSE