search for: new_tty_context

Displaying 1 result from an estimated 1 matches for "new_tty_context".

2004 Sep 07
0
Please review openssh patch for selinux
...} else { + freecon(user_context); + user_context = strdup(context_str(newcon)); + context_free(newcon); + } + } + } + } + } + return user_context; +} + +void setup_selinux_pty(const char *name, const char *tty) { + if (is_selinux_enabled() > 0) { + security_context_t new_tty_context=NULL, user_context=NULL, old_tty_context=NULL; + + user_context=selinux_get_user_context(name); + + if (getfilecon(tty, &old_tty_context) < 0) { + error("getfilecon(%.100s) failed: %.100s", tty, strerror(errno)); + } else { + if (security_compute_relabel(user_context,old_tt...