Results 1 to 9 of 9

Thread: AppArmor Configuration Error

  1. #1

    Default AppArmor Configuration Error

    Hello,
    after apply a new update OpenSuSE 15.0, after run yast2:

    Security and Users > AppArmor Configuration > Settings > Configure Profile modes [Configure]

    appearing this error message:

    Error
    Internal error. Please report a bug report with logs.
    Run save_y2logs to get complete logs.
    Details: undefined method `addPid' for nil:NilClass
    Caller: /usr/share/YaST2/lib/apparmor/profiles.rb:76:in `block (2 levels) in initialize'

    Thank in advance

  2. #2
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,565

    Default Re: AppArmor Configuration Error

    @djuradj:

    Please, with the user “root”, check the output of the following system integrity tests and then, take any forced package re-installation actions as needed:
    • zypper verify
    • rpm --verify --all

    You should also use the user “root” to run “rpmconfigcheck” to find any system configuration files which may need to be changed.

  3. #3

    Default Re: AppArmor Configuration Error

    Thank you for your answer. I'm late, sorry.

    linux-eyc2:/ # zypper verify
    Loading repository data...
    Warning: Repository 'openSUSE-Leap-15.0-Update-Non-Oss' appears to be outdated. Consider using a different mirror or server.
    Reading installed packages...

    Dependencies of all installed packages are satisfied.

    linux-eyc2:/ # rpm --verify --all

    nothing in regard with apparmor/profiles...

    linux-eyc2:/ # rpmconfigcheck
    Searching for unresolved configuration files
    Please check the following files (see /var/adm/rpmconfigcheck):
    /etc/plymouth/plymouthd.conf.rpmnew

    Thank in advance
    BR
    Dj.

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,383
    Blog Entries
    2

    Default Re: AppArmor Configuration Error

    First,
    No matter how you've been updating your system, run the following in an elevated console(You can use sudo in a regular console or su to root which can save you from typing sudo with every command)
    Code:
    zypper up
    Accept all proposed changes to your system unless something strikes you as questionable, you can ask here about that.

    Although a reboot probably isn't necessary, do so anyway... anything related to a kernel upgrade will likely require a reboot and security can be one.

    After your reboot,
    Try opening YaST as you did before and see if that solves your problem.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5

    Default Re: AppArmor Configuration Error

    Thank you for your reply.
    All done, but error still exists...

    linux-eyc2:~ # date
    Tue Sep 3 10:23:17 CEST 2019

    linux-eyc2:~ # zypper up
    Loading repository data...
    Warning: Repository 'openSUSE-Leap-15.0-Update-Non-Oss' appears to be outdated. Consider using a different mirror or server.
    Reading installed packages...

    The following 8 packages are going to be upgraded:
    aaa_base aaa_base-extras apache2 apache2-example-pages apache2-prefork apache2-utils ebtables quota

    8 packages to upgrade.

    (1/8) Installing: aaa_base-84.87+git20180409.04c9dae-lp150.14.1.x86_64 ...................................................................................[done]
    (2/8) Installing: apache2-example-pages-2.4.33-lp150.2.23.1.x86_64 ...........................................................................................[done]
    (3/8) Installing: apache2-utils-2.4.33-lp150.2.23.1.x86_64 ...........................................................................................................[done]
    (4/8) Installing: ebtables-2.0.10.4-lp150.4.3.1.x86_64 .................................................................................................................[done]
    (5/8) Installing: quota-4.05-lp150.10.1.x86_64 ............................................................................................................................[done]
    (6/8) Installing: aaa_base-extras-84.87+git20180409.04c9dae-lp150.14.1.x86_64 .........................................................................[done]
    (7/8) Installing: apache2-2.4.33-lp150.2.23.1.x86_64 ..................................................................................................................[done]
    (8/8) Installing: apache2-prefork-2.4.33-lp150.2.23.1.x86_64 ........................................................................................................[done]
    There are running programs which still use files and libraries deleted or updated by recent upgrades. They should be restarted to benefit from the latest updates. Run 'zypper ps -s' to list these programs.

    Core libraries or services have been updated.
    Reboot is required to ensure that your system benefits from these updates.

    linux-eyc2:~ # reboot

    linux-eyc2:~ # yast2


    Available AppArmor Modules:
    Settings
    Scan Audit logs
    Manually Add Profile

    Error
    Internal error. Please report a bug report with logs.
    Run save_y2logs to get complete logs.
    Details: undefined method `addPid' for nil:NilClass
    Caller: /usr/share/YaST2/lib/apparmor/profiles.rb:76:in `block (2 levels) in initialize'


    Thank in advance
    BR. Dj.

  6. #6
    Join Date
    Sep 2012
    Posts
    5,197

    Default Re: AppArmor Configuration Error

    Quote Originally Posted by djuradj View Post
    All done, but error still exists...
    So report a bug as you already have been told to do.

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,383
    Blog Entries
    2

    Default Re: AppArmor Configuration Error

    Before giving up, try re-installing AppArmor
    Code:
    zypper in -f -t pattern apparmor
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #8

    Default Re: AppArmor Configuration Error

    Thank you tsu2
    All done according your instruction:

    Code:
    linux-eyc2:~ # zypper in -f -t pattern apparmor
    Retrieving repository 'openSUSE-Leap-15.0-Update' metadata ................................................................................................................[done]
    Building repository 'openSUSE-Leap-15.0-Update' cache .....................................................................................................................[done]
    Loading repository data...
    Warning: Repository 'openSUSE-Leap-15.0-Update-Non-Oss' appears to be outdated. Consider using a different mirror or server.
    Reading installed packages...
    Forcing installation of 'pattern:apparmor-20171206-lp150.15.9.1.x86_64' from repository 'openSUSE-Leap-15.0-Update'.
    Resolving package dependencies...
    
    The following package is going to be reinstalled:
      patterns-base-apparmor
    
    The following pattern is going to be reinstalled:
      apparmor
    
    1 package to reinstall.
    Overall download size: 78.0 KiB. Already cached: 0 B. No additional space will be used or freed after the operation.
    Continue? [y/n/v/...? shows all options] (y):
    Retrieving package patterns-base-apparmor-20171206-lp150.15.9.1.x86_64                                                                      (1/1),  78.0 KiB (   54   B unpacked)
    Retrieving: patterns-base-apparmor-20171206-lp150.15.9.1.x86_64.rpm .......................................................................................................[done]
    Checking for file conflicts: ..............................................................................................................................................[done]
    (1/1) Installing: patterns-base-apparmor-20171206-lp150.15.9.1.x86_64 .....................................................................................................[done]

    The error still exists.
    I will report a bug with logs...

    Thanx a lot

  9. #9

    Arrow Re: AppArmor Configuration Error -- local fix

    Hello.

    The problem is in this code: /usr/share/YaST2/lib/apparmor/profiles.rb

    h.each do |name, pidmap|
    pidmap.each do |p|
    @prof[name].addPid(p['pid'])
    end



    name in this case is something like /usr/sbin/nscd that comes from aa-status --json "processs" array. in the profile you may have just "nscd", therefore @prof[name] will be NULL.
    so you can do a fix like this:

    h.each do |name, pidmap|
    pidmap.each do |p|
    pname = File.basename(name)
    @prof[pname].addPid(p['pid'])
    end

    Cheerz,

    Alex.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •