diff --git a/policycoreutils.spec b/policycoreutils.spec index 086eeac..b5a8a4d 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -31,7 +31,7 @@ Source18: selinux-autorelabel.target Source19: selinux-autorelabel-generator.sh # download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh # run: -# HEAD https://github.com/fedora-selinux/selinux/commit/3dd7e297f42b8c05964591b008915e2514c6cb2d +# HEAD https://github.com/fedora-selinux/selinux/commit/c5e8255a66a4ee88ec4a01dfa431acb323531b7 # $ for i in policycoreutils selinux-python selinux-gui selinux-sandbox selinux-dbus semodule-utils restorecond; do # ./make-fedora-selinux-patch.sh $i # done @@ -185,6 +185,7 @@ sed -i '1s~#! */usr/bin/python\([^3].*\|\)$~#!%{__python3}\1~' \ %{buildroot}%{_bindir}/sepolgen{,-ifgen} \ %{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.py \ %{buildroot}%{_datadir}/system-config-selinux/selinux_server.py \ + %{buildroot}%{_datadir}/system-config-selinux/polgengui.py \ %nil %find_lang %{name} @@ -402,7 +403,6 @@ system-config-selinux is a utility for managing the SELinux environment %{_datadir}/system-config-selinux/html_util.py* %{_datadir}/system-config-selinux/polgengui.py* %{_datadir}/system-config-selinux/system-config-selinux.py* -%{_datadir}/system-config-selinux/*.glade %{_datadir}/system-config-selinux/*.ui %{python2_sitelib}/sepolicy/gui.py* %{python2_sitelib}/sepolicy/sepolicy.glade diff --git a/selinux-gui-fedora.patch b/selinux-gui-fedora.patch index 7ba7ab5..edb52be 100644 --- a/selinux-gui-fedora.patch +++ b/selinux-gui-fedora.patch @@ -1,5 +1,5 @@ diff --git selinux-gui-2.7/Makefile selinux-gui-2.7/Makefile -index 4fc2c1a..cfe4740 100644 +index 4fc2c1a..ff0fd00 100644 --- selinux-gui-2.7/Makefile +++ selinux-gui-2.7/Makefile @@ -11,14 +11,13 @@ domainsPage.py \ @@ -8,7 +8,8 @@ index 4fc2c1a..cfe4740 100644 loginsPage.py \ -mappingsPage.py \ modulesPage.py \ - polgen.glade \ +-polgen.glade \ ++polgen.ui \ portsPage.py \ semanagePage.py \ statusPage.py \ @@ -488,8 +489,2431 @@ index 3767896..34c5d9e 100644 self.add(dialog.get_filename()) dialog.destroy() +diff --git selinux-gui-2.7/polgen.ui selinux-gui-2.7/polgen.ui +new file mode 100644 +index 0000000..aa4c70a +--- /dev/null ++++ selinux-gui-2.7/polgen.ui +@@ -0,0 +1,2417 @@ ++ ++ ++ ++ ++ ++ False ++ 5 ++ normal ++ Red Hat 2007 ++ www.redhat.com ++ GPL ++ Daniel Walsh <dwalsh@redhat.com> ++ translator-credits ++ ++ ++ False ++ ++ ++ False ++ ++ ++ False ++ True ++ end ++ 0 ++ ++ ++ ++ ++ ++ ++ False ++ 12 ++ Add Booleans Dialog ++ mouse ++ 400 ++ dialog ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ False ++ end ++ ++ ++ gtk-cancel ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ gtk-add ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ False ++ True ++ end ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 2 ++ 2 ++ 12 ++ 6 ++ ++ ++ True ++ False ++ 0 ++ Boolean Name ++ ++ ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ 0 ++ Description ++ ++ ++ 1 ++ 2 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ True ++ ++ False ++ False ++ True ++ True ++ ++ ++ 1 ++ 2 ++ ++ ++ ++ ++ ++ True ++ True ++ ++ False ++ False ++ True ++ True ++ ++ ++ 1 ++ 2 ++ 1 ++ 2 ++ ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ cancelbutton1 ++ okbutton1 ++ ++ ++ ++ False ++ 5 ++ mouse ++ dialog ++ True ++ True ++ ++ ++ True ++ False ++ 24 ++ ++ ++ True ++ False ++ end ++ ++ ++ gtk-cancel ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ gtk-add ++ True ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ False ++ True ++ end ++ 0 ++ ++ ++ ++ ++ ++ button5 ++ button6 ++ ++ ++ ++ True ++ False ++ SELinux Policy Generation Tool ++ ++ ++ True ++ False ++ 18 ++ ++ ++ True ++ False ++ left ++ False ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Select the policy type for the application or user role you want to confine:</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 12 ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ False ++ 0 ++ <b>Applications</b> ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ Standard Init Daemon ++ True ++ True ++ False ++ Standard Init Daemon are daemons started on boot via init scripts. Usually requires a script in /etc/rc.d/init.d ++ True ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ DBUS System Daemon ++ True ++ True ++ False ++ Standard Init Daemon are daemons started on boot via init scripts. Usually requires a script in /etc/rc.d/init.d ++ True ++ True ++ init_radiobutton ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ Internet Services Daemon (inetd) ++ True ++ True ++ False ++ Internet Services Daemon are daemons started by xinetd ++ True ++ True ++ init_radiobutton ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ Web Application/Script (CGI) ++ True ++ True ++ False ++ Web Applications/Script (CGI) CGI scripts started by the web server (apache) ++ True ++ True ++ init_radiobutton ++ ++ ++ False ++ False ++ 3 ++ ++ ++ ++ ++ User Application ++ True ++ True ++ False ++ User Application are any application that you would like to confine that is started by a user ++ True ++ True ++ init_radiobutton ++ ++ ++ False ++ False ++ 4 ++ ++ ++ ++ ++ Sandbox ++ True ++ True ++ False ++ User Application are any application that you would like to confine that is started by a user ++ True ++ True ++ init_radiobutton ++ ++ ++ False ++ False ++ 5 ++ ++ ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ False ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ False ++ 0 ++ <b>Login Users</b> ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ Existing User Roles ++ True ++ True ++ False ++ Modify an existing login user record. ++ True ++ True ++ init_radiobutton ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ Minimal Terminal User Role ++ True ++ True ++ False ++ This user will login to a machine only via a terminal or remote login. By default this user will have no setuid, no networking, no su, no sudo. ++ True ++ True ++ init_radiobutton ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ Minimal X Windows User Role ++ True ++ True ++ False ++ This user can login to a machine via X or terminal. By default this user will have no setuid, no networking, no sudo, no su ++ True ++ True ++ init_radiobutton ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ User Role ++ True ++ True ++ False ++ User with full networking, no setuid applications without transition, no sudo, no su. ++ True ++ True ++ init_radiobutton ++ ++ ++ False ++ False ++ 3 ++ ++ ++ ++ ++ Admin User Role ++ True ++ True ++ False ++ User with full networking, no setuid applications without transition, no su, can sudo to Root Administration Roles ++ True ++ True ++ init_radiobutton ++ ++ ++ False ++ False ++ 4 ++ ++ ++ ++ ++ True ++ False ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ False ++ True ++ 1 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ False ++ 0 ++ <b>Root Users</b> ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ Root Admin User Role ++ True ++ True ++ False ++ Select Root Administrator User Role, if this user will be used to administer the machine while running as root. This user will not be able to login to the system directly. ++ True ++ True ++ init_radiobutton ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 2 ++ ++ ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Main Tab ++ ++ ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Enter name of application or user role:</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 3 ++ 3 ++ 12 ++ 6 ++ ++ ++ True ++ False ++ 0 ++ Name ++ ++ ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ True ++ Enter complete path for executable to be confined. ++ ++ False ++ False ++ True ++ True ++ ++ ++ 1 ++ 2 ++ 1 ++ 2 ++ ++ ++ ++ ++ ++ ... ++ True ++ True ++ False ++ True ++ ++ ++ ++ 2 ++ 3 ++ 1 ++ 2 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ True ++ Enter unique name for the confined application or user role. ++ ++ False ++ False ++ True ++ True ++ ++ ++ 1 ++ 3 ++ ++ ++ ++ ++ ++ True ++ False ++ 0 ++ Executable ++ ++ ++ 1 ++ 2 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ 0 ++ Init script ++ ++ ++ 2 ++ 3 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ True ++ Enter complete path to init script used to start the confined application. ++ ++ False ++ False ++ True ++ True ++ ++ ++ 1 ++ 2 ++ 2 ++ 3 ++ ++ ++ ++ ++ ++ ... ++ True ++ True ++ False ++ True ++ ++ ++ ++ 2 ++ 3 ++ 2 ++ 3 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Name Tab ++ ++ ++ 1 ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Select existing role to modify:</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ True ++ automatic ++ automatic ++ in ++ ++ ++ True ++ True ++ Select the user roles that will transiton to the %s domain. ++ False ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ role tab ++ ++ ++ 2 ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Select roles that %s will transition to:</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ True ++ ++ ++ True ++ True ++ Select applications domains that %s will transition to. ++ False ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ transition ++role tab ++ ++ ++ 3 ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Select the user_roles that will transition to %s:</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ True ++ ++ ++ True ++ True ++ Select the user roles that will transiton to this applications domains. ++ False ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ User Tab ++ ++ ++ 4 ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Select domains that %s will administer:</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ True ++ ++ ++ True ++ True ++ Select the domains that you would like this user administer. ++ False ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Admin Tab ++ ++ ++ 5 ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Select additional roles for %s:</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ True ++ ++ ++ True ++ True ++ Select the domains that you would like this user administer. ++ False ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Roles Tab ++ ++ ++ 6 ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Enter network ports that %s binds on:</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ False ++ 0 ++ <b>TCP Ports</b> ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ False ++ 12 ++ ++ ++ All ++ True ++ True ++ False ++ Allows %s to bind to any udp port ++ True ++ True ++ ++ ++ False ++ False ++ 10 ++ 0 ++ ++ ++ ++ ++ 600-1024 ++ True ++ True ++ False ++ Allow %s to call bindresvport with 0. Binding to port 600-1024 ++ True ++ True ++ ++ ++ False ++ False ++ 10 ++ 1 ++ ++ ++ ++ ++ Unreserved Ports (>1024) ++ True ++ True ++ False ++ Enter a comma separated list of udp ports or ranges of ports that %s binds to. Example: 612, 650-660 ++ True ++ True ++ ++ ++ False ++ False ++ 10 ++ 2 ++ ++ ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 12 ++ ++ ++ True ++ False ++ 0 ++ Select Ports ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ True ++ Allows %s to bind to any udp ports > 1024 ++ ++ False ++ False ++ True ++ True ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ False ++ 0 ++ <b>UDP Ports</b> ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ False ++ 12 ++ ++ ++ All ++ True ++ True ++ False ++ Allows %s to bind to any udp port ++ True ++ True ++ ++ ++ False ++ False ++ 10 ++ 0 ++ ++ ++ ++ ++ 600-1024 ++ True ++ True ++ False ++ Allow %s to call bindresvport with 0. Binding to port 600-1024 ++ True ++ True ++ ++ ++ False ++ False ++ 10 ++ 1 ++ ++ ++ ++ ++ Unreserved Ports (>1024) ++ True ++ True ++ False ++ Enter a comma separated list of udp ports or ranges of ports that %s binds to. Example: 612, 650-660 ++ True ++ True ++ ++ ++ False ++ False ++ 10 ++ 2 ++ ++ ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 12 ++ ++ ++ True ++ False ++ 0 ++ Select Ports ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ True ++ Allows %s to bind to any udp ports > 1024 ++ ++ False ++ False ++ True ++ True ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 2 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Network ++Bind tab ++ ++ ++ 7 ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Select network ports that %s connects to:</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ False ++ 0 ++ <b>TCP Ports</b> ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 12 ++ ++ ++ All ++ True ++ True ++ False ++ Allows %s to connect to any tcp port ++ True ++ True ++ ++ ++ False ++ False ++ 10 ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 0 ++ Select Ports ++ ++ ++ False ++ False ++ 5 ++ 1 ++ ++ ++ ++ ++ True ++ True ++ Enter a comma separated list of tcp ports or ranges of ports that %s connects to. Example: 612, 650-660 ++ ++ False ++ False ++ True ++ True ++ ++ ++ True ++ True ++ 2 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ False ++ 0 ++ <b>UDP Ports</b> ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 12 ++ ++ ++ All ++ True ++ True ++ False ++ Allows %s to connect to any udp port ++ True ++ True ++ ++ ++ False ++ False ++ 10 ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 0 ++ Select Ports ++ ++ ++ False ++ False ++ 5 ++ 1 ++ ++ ++ ++ ++ True ++ True ++ Enter a comma separated list of udp ports or ranges of ports that %s connects to. Example: 612, 650-660 ++ ++ False ++ False ++ True ++ True ++ ++ ++ True ++ True ++ 2 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 2 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Network ++Connect Tab ++ ++ ++ 8 ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Select common application traits for %s:</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ Writes syslog messages ++ True ++ True ++ False ++ True ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ Create/Manipulate temporary files in /tmp ++ True ++ True ++ False ++ True ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ Uses Pam for authentication ++ True ++ True ++ False ++ True ++ True ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ Uses nsswitch or getpw* calls ++ True ++ True ++ False ++ True ++ True ++ ++ ++ False ++ False ++ 3 ++ ++ ++ ++ ++ Uses dbus ++ True ++ True ++ False ++ True ++ True ++ ++ ++ False ++ False ++ 4 ++ ++ ++ ++ ++ Sends audit messages ++ True ++ True ++ False ++ True ++ True ++ ++ ++ False ++ False ++ 5 ++ ++ ++ ++ ++ Interacts with the terminal ++ True ++ True ++ False ++ True ++ True ++ ++ ++ False ++ False ++ 6 ++ ++ ++ ++ ++ Sends email ++ True ++ True ++ False ++ True ++ True ++ ++ ++ False ++ False ++ 7 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Common ++Tab ++ ++ ++ 9 ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Add files/directories that %s manages</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 12 ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ True ++ False ++ ++ ++ ++ True ++ False ++ 0 ++ 0 ++ ++ ++ True ++ False ++ 2 ++ ++ ++ True ++ False ++ gtk-add ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ Add File ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ ++ ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ True ++ False ++ ++ ++ ++ True ++ False ++ 0 ++ 0 ++ ++ ++ True ++ False ++ 2 ++ ++ ++ True ++ False ++ gtk-add ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ Add Directory ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ ++ ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ gtk-delete ++ True ++ True ++ False ++ True ++ ++ ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ False ++ False ++ 4 ++ 0 ++ ++ ++ ++ ++ True ++ True ++ automatic ++ automatic ++ in ++ ++ ++ True ++ True ++ Files/Directories which the %s "manages". Pid Files, Log Files, /var/lib Files ... ++ False ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Add Tab ++ ++ ++ 10 ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Add booleans from the %s policy:</b> ++ True ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 12 ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ True ++ False ++ ++ ++ ++ True ++ False ++ 0 ++ 0 ++ ++ ++ True ++ False ++ 2 ++ ++ ++ True ++ False ++ gtk-add ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ Add Boolean ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ ++ ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ gtk-delete ++ True ++ True ++ False ++ True ++ ++ ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ False ++ True ++ 4 ++ 0 ++ ++ ++ ++ ++ True ++ True ++ automatic ++ automatic ++ in ++ ++ ++ True ++ True ++ Add/Remove booleans used by the %s domain ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ ++ ++ 11 ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ 0 ++ <b>Which directory you will generate the %s policy?</b> ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 12 ++ ++ ++ True ++ False ++ Policy Directory ++ ++ ++ False ++ False ++ 5 ++ 0 ++ ++ ++ ++ ++ True ++ True ++ ++ False ++ False ++ True ++ True ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ... ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ False ++ False ++ 12 ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ ++ ++ 12 ++ False ++ ++ ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ end ++ ++ ++ gtk-cancel ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ gtk-go-back ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ gtk-go-forward ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ False ++ False ++ 5 ++ 1 ++ ++ ++ ++ ++ ++ diff --git selinux-gui-2.7/polgengui.py selinux-gui-2.7/polgengui.py -index 7460cce..bc01a62 100644 +index 7460cce..cd73ea6 100644 --- selinux-gui-2.7/polgengui.py +++ selinux-gui-2.7/polgengui.py @@ -22,11 +22,11 @@ @@ -531,22 +2955,216 @@ index 7460cce..bc01a62 100644 ## ## Pull in the Glade file ## +-if os.access("polgen.glade", os.F_OK): +- xml = gtk.glade.XML("polgen.glade", domain=PROGNAME) +xml = Gtk.Builder() +xml.set_translation_domain(PROGNAME) - if os.access("polgen.glade", os.F_OK): -- xml = gtk.glade.XML("polgen.glade", domain=PROGNAME) -+ xml.add_from_file("polgen.glade") ++if os.access("polgen.ui", os.F_OK): ++ xml.add_from_file("polgen.ui") else: - xml = gtk.glade.XML("/usr/share/system-config-selinux/polgen.glade", domain=PROGNAME) -+ xml.add_from_file("/usr/share/system-config-selinux/polgen.glade") ++ xml.add_from_file("/usr/share/system-config-selinux/polgen.ui") FILE = 1 DIR = 2 -@@ -277,27 +279,27 @@ class childWindow: +@@ -123,82 +125,82 @@ class childWindow: + + def __init__(self): + self.xml = xml +- self.notebook = xml.get_widget("notebook") ++ self.notebook = xml.get_object("notebook") + self.label_dict = {} + self.tooltip_dict = {} +- label = xml.get_widget("select_label") ++ label = xml.get_object("select_label") + self.label_dict[label] = label.get_text() + +- label = xml.get_widget("select_user_roles_label") ++ label = xml.get_object("select_user_roles_label") + self.label_dict[label] = label.get_text() + +- label = xml.get_widget("select_dir_label") ++ label = xml.get_object("select_dir_label") + self.label_dict[label] = label.get_text() + +- label = xml.get_widget("select_domain_admin_label") ++ label = xml.get_object("select_domain_admin_label") + self.label_dict[label] = label.get_text() + +- label = xml.get_widget("select_in_label") ++ label = xml.get_object("select_in_label") + self.label_dict[label] = label.get_text() + +- label = xml.get_widget("select_out_label") ++ label = xml.get_object("select_out_label") + self.label_dict[label] = label.get_text() + +- label = xml.get_widget("select_common_label") ++ label = xml.get_object("select_common_label") + self.label_dict[label] = label.get_text() + +- label = xml.get_widget("select_manages_label") ++ label = xml.get_object("select_manages_label") + self.label_dict[label] = label.get_text() + +- label = xml.get_widget("select_booleans_label") ++ label = xml.get_object("select_booleans_label") + self.label_dict[label] = label.get_text() + +- label = xml.get_widget("existing_user_treeview") ++ label = xml.get_object("existing_user_treeview") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("transition_treeview") ++ label = xml.get_object("transition_treeview") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("in_tcp_all_checkbutton") ++ label = xml.get_object("in_tcp_all_checkbutton") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("in_tcp_reserved_checkbutton") ++ label = xml.get_object("in_tcp_reserved_checkbutton") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("in_tcp_unreserved_checkbutton") ++ label = xml.get_object("in_tcp_unreserved_checkbutton") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("in_tcp_entry") ++ label = xml.get_object("in_tcp_entry") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("in_udp_all_checkbutton") ++ label = xml.get_object("in_udp_all_checkbutton") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("in_udp_reserved_checkbutton") ++ label = xml.get_object("in_udp_reserved_checkbutton") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("in_udp_unreserved_checkbutton") ++ label = xml.get_object("in_udp_unreserved_checkbutton") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("in_udp_entry") ++ label = xml.get_object("in_udp_entry") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("out_tcp_entry") ++ label = xml.get_object("out_tcp_entry") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("out_udp_entry") ++ label = xml.get_object("out_udp_entry") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("out_tcp_all_checkbutton") ++ label = xml.get_object("out_tcp_all_checkbutton") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("out_udp_all_checkbutton") ++ label = xml.get_object("out_udp_all_checkbutton") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("boolean_treeview") ++ label = xml.get_object("boolean_treeview") + self.tooltip_dict[label] = label.get_tooltip_text() + +- label = xml.get_widget("write_treeview") ++ label = xml.get_object("write_treeview") + self.tooltip_dict[label] = label.get_tooltip_text() + + try: +@@ -214,23 +216,26 @@ class childWindow: + self.error(str(e)) + + self.name = "" +- xml.signal_connect("on_delete_clicked", self.delete) +- xml.signal_connect("on_delete_boolean_clicked", self.delete_boolean) +- xml.signal_connect("on_exec_select_clicked", self.exec_select) +- xml.signal_connect("on_init_script_select_clicked", self.init_script_select) +- xml.signal_connect("on_add_clicked", self.add) +- xml.signal_connect("on_add_boolean_clicked", self.add_boolean) +- xml.signal_connect("on_add_dir_clicked", self.add_dir) +- xml.signal_connect("on_about_clicked", self.on_about_clicked) +- xml.get_widget("cancel_button").connect("clicked", self.quit) +- self.forward_button = xml.get_widget("forward_button") ++ handlers = { ++ "on_delete_clicked": self.delete, ++ "on_delete_boolean_clicked": self.delete_boolean, ++ "on_exec_select_clicked": self.exec_select, ++ "on_init_script_select_clicked": self.init_script_select, ++ "on_add_clicked": self.add, ++ "on_add_boolean_clicked": self.add_boolean, ++ "on_add_dir_clicked": self.add_dir, ++ "on_about_clicked": self.on_about_clicked ++ } ++ xml.connect_signals(handlers) ++ xml.get_object("cancel_button").connect("clicked", self.quit) ++ self.forward_button = xml.get_object("forward_button") + self.forward_button.connect("clicked", self.forward) +- self.back_button = xml.get_widget("back_button") ++ self.back_button = xml.get_object("back_button") + self.back_button.connect("clicked", self.back) + +- self.boolean_dialog = xml.get_widget("boolean_dialog") +- self.boolean_name_entry = xml.get_widget("boolean_name_entry") +- self.boolean_description_entry = xml.get_widget("boolean_description_entry") ++ self.boolean_dialog = xml.get_object("boolean_dialog") ++ self.boolean_name_entry = xml.get_object("boolean_name_entry") ++ self.boolean_description_entry = xml.get_object("boolean_description_entry") + + self.pages = {} + for i in sepolicy.generate.USERS: +@@ -249,77 +254,77 @@ class childWindow: + + self.network_buttons = {} + +- self.in_tcp_all_checkbutton = xml.get_widget("in_tcp_all_checkbutton") +- self.in_tcp_reserved_checkbutton = xml.get_widget("in_tcp_reserved_checkbutton") +- self.in_tcp_unreserved_checkbutton = xml.get_widget("in_tcp_unreserved_checkbutton") +- self.in_tcp_entry = self.xml.get_widget("in_tcp_entry") ++ self.in_tcp_all_checkbutton = xml.get_object("in_tcp_all_checkbutton") ++ self.in_tcp_reserved_checkbutton = xml.get_object("in_tcp_reserved_checkbutton") ++ self.in_tcp_unreserved_checkbutton = xml.get_object("in_tcp_unreserved_checkbutton") ++ self.in_tcp_entry = self.xml.get_object("in_tcp_entry") + self.network_buttons[self.in_tcp_all_checkbutton] = [self.in_tcp_reserved_checkbutton, self.in_tcp_unreserved_checkbutton, self.in_tcp_entry] + +- self.out_tcp_all_checkbutton = xml.get_widget("out_tcp_all_checkbutton") +- self.out_tcp_reserved_checkbutton = xml.get_widget("out_tcp_reserved_checkbutton") +- self.out_tcp_unreserved_checkbutton = xml.get_widget("out_tcp_unreserved_checkbutton") +- self.out_tcp_entry = self.xml.get_widget("out_tcp_entry") ++ self.out_tcp_all_checkbutton = xml.get_object("out_tcp_all_checkbutton") ++ self.out_tcp_reserved_checkbutton = xml.get_object("out_tcp_reserved_checkbutton") ++ self.out_tcp_unreserved_checkbutton = xml.get_object("out_tcp_unreserved_checkbutton") ++ self.out_tcp_entry = self.xml.get_object("out_tcp_entry") + + self.network_buttons[self.out_tcp_all_checkbutton] = [self.out_tcp_entry] + +- self.in_udp_all_checkbutton = xml.get_widget("in_udp_all_checkbutton") +- self.in_udp_reserved_checkbutton = xml.get_widget("in_udp_reserved_checkbutton") +- self.in_udp_unreserved_checkbutton = xml.get_widget("in_udp_unreserved_checkbutton") +- self.in_udp_entry = self.xml.get_widget("in_udp_entry") ++ self.in_udp_all_checkbutton = xml.get_object("in_udp_all_checkbutton") ++ self.in_udp_reserved_checkbutton = xml.get_object("in_udp_reserved_checkbutton") ++ self.in_udp_unreserved_checkbutton = xml.get_object("in_udp_unreserved_checkbutton") ++ self.in_udp_entry = self.xml.get_object("in_udp_entry") + + self.network_buttons[self.in_udp_all_checkbutton] = [self.in_udp_reserved_checkbutton, self.in_udp_unreserved_checkbutton, self.in_udp_entry] + +- self.out_udp_all_checkbutton = xml.get_widget("out_udp_all_checkbutton") +- self.out_udp_entry = self.xml.get_widget("out_udp_entry") ++ self.out_udp_all_checkbutton = xml.get_object("out_udp_all_checkbutton") ++ self.out_udp_entry = self.xml.get_object("out_udp_entry") + self.network_buttons[self.out_udp_all_checkbutton] = [self.out_udp_entry] + + for b in self.network_buttons.keys(): b.connect("clicked", self.network_all_clicked) - self.boolean_treeview = self.xml.get_widget("boolean_treeview") +- self.boolean_treeview = self.xml.get_widget("boolean_treeview") - self.boolean_store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING) ++ self.boolean_treeview = self.xml.get_object("boolean_treeview") + self.boolean_store = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_STRING) self.boolean_treeview.set_model(self.boolean_store) - self.boolean_store.set_sort_column_id(0, gtk.SORT_ASCENDING) @@ -558,8 +3176,9 @@ index 7460cce..bc01a62 100644 + col = Gtk.TreeViewColumn(_("Description"), Gtk.CellRendererText(), text=1) self.boolean_treeview.append_column(col) - self.role_treeview = self.xml.get_widget("role_treeview") +- self.role_treeview = self.xml.get_widget("role_treeview") - self.role_store = gtk.ListStore(gobject.TYPE_STRING) ++ self.role_treeview = self.xml.get_object("role_treeview") + self.role_store = Gtk.ListStore(GObject.TYPE_STRING) self.role_treeview.set_model(self.role_store) - self.role_treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE) @@ -570,8 +3189,9 @@ index 7460cce..bc01a62 100644 + col = Gtk.TreeViewColumn(_("Role"), Gtk.CellRendererText(), text=0) self.role_treeview.append_column(col) - self.existing_user_treeview = self.xml.get_widget("existing_user_treeview") +- self.existing_user_treeview = self.xml.get_widget("existing_user_treeview") - self.existing_user_store = gtk.ListStore(gobject.TYPE_STRING) ++ self.existing_user_treeview = self.xml.get_object("existing_user_treeview") + self.existing_user_store = Gtk.ListStore(GObject.TYPE_STRING) self.existing_user_treeview.set_model(self.existing_user_store) - self.existing_user_store.set_sort_column_id(0, gtk.SORT_ASCENDING) @@ -581,11 +3201,15 @@ index 7460cce..bc01a62 100644 self.existing_user_treeview.append_column(col) for i in self.all_roles: -@@ -307,19 +309,19 @@ class childWindow: - self.in_tcp_reserved_checkbutton = xml.get_widget("in_tcp_reserved_checkbutton") + iter = self.role_store.append() + self.role_store.set_value(iter, 0, i[:-2]) + +- self.in_tcp_reserved_checkbutton = xml.get_widget("in_tcp_reserved_checkbutton") ++ self.in_tcp_reserved_checkbutton = xml.get_object("in_tcp_reserved_checkbutton") - self.transition_treeview = self.xml.get_widget("transition_treeview") +- self.transition_treeview = self.xml.get_widget("transition_treeview") - self.transition_store = gtk.ListStore(gobject.TYPE_STRING) ++ self.transition_treeview = self.xml.get_object("transition_treeview") + self.transition_store = Gtk.ListStore(GObject.TYPE_STRING) self.transition_treeview.set_model(self.transition_store) - self.transition_treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE) @@ -596,8 +3220,9 @@ index 7460cce..bc01a62 100644 + col = Gtk.TreeViewColumn(_("Application"), Gtk.CellRendererText(), text=0) self.transition_treeview.append_column(col) - self.user_transition_treeview = self.xml.get_widget("user_transition_treeview") +- self.user_transition_treeview = self.xml.get_widget("user_transition_treeview") - self.user_transition_store = gtk.ListStore(gobject.TYPE_STRING) ++ self.user_transition_treeview = self.xml.get_object("user_transition_treeview") + self.user_transition_store = Gtk.ListStore(GObject.TYPE_STRING) self.user_transition_treeview.set_model(self.user_transition_store) - self.user_transition_treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE) @@ -609,11 +3234,13 @@ index 7460cce..bc01a62 100644 self.user_transition_treeview.append_column(col) for i in self.all_users: -@@ -329,11 +331,11 @@ class childWindow: +@@ -328,12 +333,12 @@ class childWindow: + iter = self.existing_user_store.append() self.existing_user_store.set_value(iter, 0, i[:-2]) - self.admin_treeview = self.xml.get_widget("admin_treeview") +- self.admin_treeview = self.xml.get_widget("admin_treeview") - self.admin_store = gtk.ListStore(gobject.TYPE_STRING) ++ self.admin_treeview = self.xml.get_object("admin_treeview") + self.admin_store = Gtk.ListStore(GObject.TYPE_STRING) self.admin_treeview.set_model(self.admin_store) - self.admin_treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE) @@ -625,12 +3252,12 @@ index 7460cce..bc01a62 100644 self.admin_treeview.append_column(col) try: -@@ -383,17 +385,17 @@ class childWindow: +@@ -383,17 +388,17 @@ class childWindow: if self.pages[type][self.current_page] == self.FINISH_PAGE: self.generate_policy() - self.xml.get_widget("cancel_button").set_label(gtk.STOCK_CLOSE) -+ self.xml.get_widget("cancel_button").set_label(Gtk.STOCK_CLOSE) ++ self.xml.get_object("cancel_button").set_label(Gtk.STOCK_CLOSE) else: self.current_page = self.current_page + 1 self.notebook.set_current_page(self.pages[type][self.current_page]) @@ -646,7 +3273,7 @@ index 7460cce..bc01a62 100644 self.current_page = self.current_page - 1 self.notebook.set_current_page(self.pages[type][self.current_page]) -@@ -406,30 +408,30 @@ class childWindow: +@@ -406,30 +411,30 @@ class childWindow: b.set_sensitive(not active) def verify(self, message, title=""): @@ -686,7 +3313,7 @@ index 7460cce..bc01a62 100644 dlg.show_all() dlg.run() dlg.destroy() -@@ -550,7 +552,7 @@ class childWindow: +@@ -550,7 +555,7 @@ class childWindow: self.boolean_description_entry.set_text("") rc = self.boolean_dialog.run() self.boolean_dialog.hide() @@ -695,7 +3322,7 @@ index 7460cce..bc01a62 100644 return iter = self.boolean_store.append() self.boolean_store.set_value(iter, 0, self.boolean_name_entry.get_text()) -@@ -559,7 +561,7 @@ class childWindow: +@@ -559,7 +564,7 @@ class childWindow: def __add(self, type): rc = self.file_dialog.run() self.file_dialog.hide() @@ -704,7 +3331,7 @@ index 7460cce..bc01a62 100644 return for i in self.file_dialog.get_filenames(): iter = self.store.append() -@@ -569,29 +571,29 @@ class childWindow: +@@ -569,29 +574,29 @@ class childWindow: def exec_select(self, args): self.file_dialog.set_select_multiple(0) self.file_dialog.set_title(_("Select executable file to be confined.")) @@ -739,7 +3366,7 @@ index 7460cce..bc01a62 100644 self.file_dialog.set_select_multiple(1) self.__add(FILE) -@@ -599,7 +601,7 @@ class childWindow: +@@ -599,71 +604,71 @@ class childWindow: self.file_dialog.set_title(_("Select directory(s) that the confined application owns and writes into")) self.file_dialog.set_current_folder("/") self.file_dialog.set_select_multiple(1) @@ -748,7 +3375,9 @@ index 7460cce..bc01a62 100644 self.__add(DIR) def on_about_clicked(self, args): -@@ -608,7 +610,7 @@ class childWindow: +- dlg = xml.get_widget("about_dialog") ++ dlg = xml.get_object("about_dialog") + dlg.run() dlg.hide() def quit(self, args): @@ -757,11 +3386,79 @@ index 7460cce..bc01a62 100644 def setupScreen(self): # Bring in widgets from glade file. -@@ -650,20 +652,20 @@ class childWindow: - self.view = self.xml.get_widget("write_treeview") - self.file_dialog = self.xml.get_widget("filechooserdialog") - +- self.mainWindow = self.xml.get_widget("main_window") +- self.druid = self.xml.get_widget("druid") ++ self.mainWindow = self.xml.get_object("main_window") ++ self.druid = self.xml.get_object("druid") + self.type = 0 +- self.name_entry = self.xml.get_widget("name_entry") ++ self.name_entry = self.xml.get_object("name_entry") + self.name_entry.connect("insert_text", self.on_name_entry_changed) + self.name_entry.connect("focus_out_event", self.on_focus_out_event) +- self.exec_entry = self.xml.get_widget("exec_entry") +- self.exec_button = self.xml.get_widget("exec_button") +- self.init_script_entry = self.xml.get_widget("init_script_entry") +- self.init_script_button = self.xml.get_widget("init_script_button") +- self.output_entry = self.xml.get_widget("output_entry") ++ self.exec_entry = self.xml.get_object("exec_entry") ++ self.exec_button = self.xml.get_object("exec_button") ++ self.init_script_entry = self.xml.get_object("init_script_entry") ++ self.init_script_button = self.xml.get_object("init_script_button") ++ self.output_entry = self.xml.get_object("output_entry") + self.output_entry.set_text(os.getcwd()) +- self.xml.get_widget("output_button").connect("clicked", self.output_button_clicked) +- +- self.xwindows_user_radiobutton = self.xml.get_widget("xwindows_user_radiobutton") +- self.terminal_user_radiobutton = self.xml.get_widget("terminal_user_radiobutton") +- self.root_user_radiobutton = self.xml.get_widget("root_user_radiobutton") +- self.login_user_radiobutton = self.xml.get_widget("login_user_radiobutton") +- self.admin_user_radiobutton = self.xml.get_widget("admin_user_radiobutton") +- self.existing_user_radiobutton = self.xml.get_widget("existing_user_radiobutton") +- +- self.user_radiobutton = self.xml.get_widget("user_radiobutton") +- self.init_radiobutton = self.xml.get_widget("init_radiobutton") +- self.inetd_radiobutton = self.xml.get_widget("inetd_radiobutton") +- self.dbus_radiobutton = self.xml.get_widget("dbus_radiobutton") +- self.cgi_radiobutton = self.xml.get_widget("cgi_radiobutton") +- self.sandbox_radiobutton = self.xml.get_widget("sandbox_radiobutton") +- self.tmp_checkbutton = self.xml.get_widget("tmp_checkbutton") +- self.uid_checkbutton = self.xml.get_widget("uid_checkbutton") +- self.pam_checkbutton = self.xml.get_widget("pam_checkbutton") +- self.dbus_checkbutton = self.xml.get_widget("dbus_checkbutton") +- self.audit_checkbutton = self.xml.get_widget("audit_checkbutton") +- self.terminal_checkbutton = self.xml.get_widget("terminal_checkbutton") +- self.mail_checkbutton = self.xml.get_widget("mail_checkbutton") +- self.syslog_checkbutton = self.xml.get_widget("syslog_checkbutton") +- self.view = self.xml.get_widget("write_treeview") +- self.file_dialog = self.xml.get_widget("filechooserdialog") +- - self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_INT) ++ self.xml.get_object("output_button").connect("clicked", self.output_button_clicked) ++ ++ self.xwindows_user_radiobutton = self.xml.get_object("xwindows_user_radiobutton") ++ self.terminal_user_radiobutton = self.xml.get_object("terminal_user_radiobutton") ++ self.root_user_radiobutton = self.xml.get_object("root_user_radiobutton") ++ self.login_user_radiobutton = self.xml.get_object("login_user_radiobutton") ++ self.admin_user_radiobutton = self.xml.get_object("admin_user_radiobutton") ++ self.existing_user_radiobutton = self.xml.get_object("existing_user_radiobutton") ++ ++ self.user_radiobutton = self.xml.get_object("user_radiobutton") ++ self.init_radiobutton = self.xml.get_object("init_radiobutton") ++ self.inetd_radiobutton = self.xml.get_object("inetd_radiobutton") ++ self.dbus_radiobutton = self.xml.get_object("dbus_radiobutton") ++ self.cgi_radiobutton = self.xml.get_object("cgi_radiobutton") ++ self.sandbox_radiobutton = self.xml.get_object("sandbox_radiobutton") ++ self.tmp_checkbutton = self.xml.get_object("tmp_checkbutton") ++ self.uid_checkbutton = self.xml.get_object("uid_checkbutton") ++ self.pam_checkbutton = self.xml.get_object("pam_checkbutton") ++ self.dbus_checkbutton = self.xml.get_object("dbus_checkbutton") ++ self.audit_checkbutton = self.xml.get_object("audit_checkbutton") ++ self.terminal_checkbutton = self.xml.get_object("terminal_checkbutton") ++ self.mail_checkbutton = self.xml.get_object("mail_checkbutton") ++ self.syslog_checkbutton = self.xml.get_object("syslog_checkbutton") ++ self.view = self.xml.get_object("write_treeview") ++ self.file_dialog = self.xml.get_object("filechooserdialog") ++ + self.store = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_INT) self.view.set_model(self.store) - col = gtk.TreeViewColumn("", gtk.CellRendererText(), text=0) @@ -782,7 +3479,7 @@ index 7460cce..bc01a62 100644 return self.output_entry.set_text(self.file_dialog.get_filename()) -@@ -675,11 +677,11 @@ class childWindow: +@@ -675,11 +680,11 @@ class childWindow: name = entry.get_text() if self.name != name: if name in self.all_types: @@ -796,7 +3493,7 @@ index 7460cce..bc01a62 100644 entry.set_text("") return False -@@ -696,16 +698,16 @@ class childWindow: +@@ -696,16 +701,16 @@ class childWindow: def on_in_net_page_next(self, *args): try: @@ -817,7 +3514,16 @@ index 7460cce..bc01a62 100644 except ValueError as e: self.error(e.message) return True -@@ -770,7 +772,7 @@ class childWindow: +@@ -741,7 +746,7 @@ class childWindow: + if exe == "": + self.error(_("You must enter a executable")) + return True +- policy = generate.policy(name, self.get_type()) ++ policy = sepolicy.generate.policy(name, self.get_type()) + policy.set_program(exe) + policy.gen_writeable() + policy.gen_symbols() +@@ -770,7 +775,7 @@ class childWindow: self.mainWindow.connect("destroy", self.quit) self.mainWindow.show_all() diff --git a/selinux-python-fedora.patch b/selinux-python-fedora.patch index 298a188..c0364ac 100644 --- a/selinux-python-fedora.patch +++ b/selinux-python-fedora.patch @@ -776,6 +776,49 @@ index 5cfc071..24e3526 100644 def reinit(): +diff --git selinux-python-2.7/sepolicy/sepolicy/generate.py selinux-python-2.7/sepolicy/sepolicy/generate.py +index d68f96e..31aa968 100644 +--- selinux-python-2.7/sepolicy/sepolicy/generate.py ++++ selinux-python-2.7/sepolicy/sepolicy/generate.py +@@ -110,7 +110,7 @@ def get_all_ports(): + + + def get_all_users(): +- users = map(lambda x: x['name'], sepolicy.info(sepolicy.USER)) ++ users = [x['name'] for x in sepolicy.info(sepolicy.USER)] + users.remove("system_u") + users.remove("root") + users.sort() +@@ -459,25 +459,25 @@ class policy: + self.out_udp = [all, False, False, verify_ports(ports)] + + def set_use_resolve(self, val): +- if not isinstance(val, types.BooleanType): ++ if type(val) is not bool: + raise ValueError(_("use_resolve must be a boolean value ")) + + self.use_resolve = val + + def set_use_syslog(self, val): +- if not isinstance(val, types.BooleanType): ++ if type(val) is not bool: + raise ValueError(_("use_syslog must be a boolean value ")) + + self.use_syslog = val + + def set_use_kerberos(self, val): +- if not isinstance(val, types.BooleanType): ++ if type(val) is not bool: + raise ValueError(_("use_kerberos must be a boolean value ")) + + self.use_kerberos = val + + def set_manage_krb5_rcache(self, val): +- if not isinstance(val, types.BooleanType): ++ if type(val) is not bool: + raise ValueError(_("manage_krb5_rcache must be a boolean value ")) + + self.manage_krb5_rcache = val diff --git selinux-python-2.7/sepolicy/sepolicy/gui.py selinux-python-2.7/sepolicy/sepolicy/gui.py index 007c94a..6562aa8 100644 --- selinux-python-2.7/sepolicy/sepolicy/gui.py