Package: selinux-policy-refpolicy-targeted
Version: 0.0.20070507-5
Severity: important

Problem affects both policy packages strict & targeted.
When I did installation of selinux-policy-refpolicy-strict package on
XEN domU Debian unstable (Sid). Some policy packages were not loaded.

I was lacking ssh.pp initialy.

I looked into the postinst package and discover, that for ssh there is
prepared glob mapping, but code can't handle this.

I did small correction of postinst.policy in source, rebuild deb
and some additional packages are now loaded.

There is my patch for postinst.policy:

--- postinst.policy.orig        2007-06-07 13:57:48.000000000 +0200
+++ postinst.policy     2007-06-07 13:28:47.000000000 +0200
@@ -107,6 +107,12 @@
            'xserver'       => [ 'gdm', 'kdm', 'xdm', 'xserver*' ]
           );
 
+# Converts wildcard (glob) pattern into regex pattern (only `*' is wild).
+sub wild2re {
+  my ($pat) = @_;
+  return join('.*', map(quotemeta, split('\*', $pat, -1)));
+}
+
 #  List all th modules, except the base module, in the policy
 #  directory. This sets @all_modules and %Module_Path
 sub list_modules {
@@ -196,7 +202,10 @@
 
   PACKAGE:
     for my $pkg (@{ $map{$module} }) {
-      if ($Installed{$pkg}) {
+      my $is_installed = index($pkg, '*') < 0 ?
+             $Installed{$pkg} # exact name
+             : grep(m/[EMAIL PROTECTED]($pkg)]}$/, keys %Installed); # wildcard
+      if ($is_installed) {
         if (defined $Deps{$module}) {
           for my $dep (split(' ', $Deps{$module})) {
             next if $Loaded{$dep};

Regards
--
Vaclav Ovsik


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-4-xen-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=cs_CZ.ISO-8859-2 (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/bash

Versions of packages selinux-policy-refpolicy-targeted depends on:
ii  libpam-modules                0.79-4     Pluggable Authentication Modules f
ii  libselinux1                   2.0.15-2   SELinux shared libraries
ii  policycoreutils               2.0.16-1   SELinux core policy utilities
ii  python                        2.4.4-6    An interactive high-level object-o

Versions of packages selinux-policy-refpolicy-targeted recommends:
ii  checkpolicy                   2.0.2-1    SELinux policy compiler
ii  setools                       2.4-3      Tresys tools for managing Security


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to