Skip to content

Commit

Permalink
confined: make "-l" non optional
Browse files Browse the repository at this point in the history
The confinedom_user_login_macro is needed for all custom users.

Also, allow the new user type to be accessed via remote login.

Signed-off-by: Vit Mojzis <[email protected]>
  • Loading branch information
vmojzis committed Mar 1, 2024
1 parent d444e67 commit f411c14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion udica/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def get_args():
"-l",
"--user_login",
action="store_true",
default=False,
default=True,
dest="user_login",
help="Basic rules common to all users (tty, pty, ...)",
)
Expand Down
8 changes: 7 additions & 1 deletion udica/macros/confined_user_macros.cil
Original file line number Diff line number Diff line change
Expand Up @@ -2411,7 +2411,7 @@
(typetransition utype sudo_exec_t process sudo_type)
(allow sudo_type utype (fd (use)))
(allow sudo_type utype (fifo_file (ioctl read write getattr lock append)))
(allow sudo_type utype (process (sigchld)))
(allow sudo_type utype (process (getpgid sigchld)))
(allow sudo_type bin_t (dir (getattr open search)))
(allow sudo_type bin_t (dir (ioctl read getattr lock open search)))
(allow sudo_type bin_t (dir (getattr open search)))
Expand Down Expand Up @@ -4006,6 +4006,12 @@
)
)
)
; Telnet login
(optional confinedom_user_login_optional_3
(typeattributeset cil_gen_require remote_login_t)
(allow remote_login_t utype (process (signal transition)))
(allow utype self (bpf (prog_load)))
)
)

(macro confined_ssh_connect_macro ((type utype) (role urole) (type ssh_agent_type))
Expand Down

0 comments on commit f411c14

Please sign in to comment.