On Monday 23 February 2009 02:36:30 am KaiGai Kohei wrote:
> The attached patch fixes the matter.
> 
> It seems to me this matter was enbuged at r25210.
> 
> | r25210 | vda | 2009-02-02 09:15:00 +0900 (Mon, 02 Feb 2009) | 3 lines
> |
> | login: cleanup work by Walter Harms. No logic changes.
> 
> % svn log -c 25210 loginutils/login.c
>     :
> +#if ENABLE_SELINUX
> +static void initselinux(char *username, char *full_tty,
> +                                               security_context_t *user_sid)
>                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +{
> +       security_context_t old_tty_sid, new_tty_sid;
> +
> +       if (!is_selinux_enabled())
> +               return;
> +
> +       if (get_default_context(username, NULL, user_sid)) {
>                                                 ^^^^^^^^ security_context_t 
> *, correct
> +               bb_error_msg_and_die("cannot get SID for %s", username);
> +       }
> +       if (getfilecon(full_tty, &old_tty_sid) < 0) {
> +               bb_perror_msg_and_die("getfilecon(%s) failed", full_tty);
> +       }
> +       if (security_compute_relabel(user_sid, old_tty_sid,
>                                      ^^^^^^^^ security_context_t *, incorrect

Fixed in svn. Thanks for pointing it out.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to