Displaying 1 result from an estimated 1 matches for "setup_selinux_pty".
2004 Sep 07
0
Please review openssh patch for selinux
...else
+ error("Failed to set type %s for %s. Continuing in permissive mode", role, name);
+ } 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(%.100...