Uploaded image for project: 'Commons Daemon'
  1. Commons Daemon
  2. DAEMON-242

jsvc cannot find libcap.so on debian-based distributions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.9
    • 1.0.10
    • Jsvc
    • None
    • Debian 6.0.2
      Ubuntu 11.04

    Description

      Debian-based distributions do not symlink the "main" shared object to the major version.

      For example:

      On RHEL4u4:
      $ ls -l /lib/libcap.so*
      lrwxrwxrwx 1 root root 11 Jun 13 2007 /lib/libcap.so -> libcap.so.1
      lrwxrwxrwx 1 root root 14 Jun 12 2007 /lib/libcap.so.1 -> libcap.so.1.10
      -rwxr-xr-x 1 root root 11784 Oct 7 2006 /lib/libcap.so.1.10

      Notice libcap.so -> libcap.so.1

      On Debian 6.02:
      $ ls -l /lib/libcap.so*
      lrwxrwxrwx 1 root root 14 Jan 25 10:19 /lib/libcap.so.2 -> libcap.so.2.19
      rw-rr- 1 root root 16640 Aug 16 2010 /lib/libcap.so.2.19

      On Ubuntu 11.04:
      $ ls -l /lib/libcap.so*
      lrwxrwxrwx 1 root root 14 2011-07-16 09:52 /lib/libcap.so.2 -> libcap.so.2.20
      rw-rr- 1 root root 13816 2011-02-15 14:35 /lib/libcap.so.2.20

      Notice there is no libcap.so -> libcap.so.2

      Therefore, when jsvc attempts to load libcap.so, it fails...

      I see this when running jsvc -debug ...

      Attemtping to load library /lib/libcap.so
      Attemtping to load library /usr/lib/libcap.so
      failed loading capabilities library – /usr/lib/libcap.so: cannot open shared object file: No such file or directory.
      set_caps(CAPS) failed for user 'oncommand'
      Service exit with a return value of 4

      If I create the libcap.so -> libcap.so.2 symlink, it works.

      I'm guessing the fix for this would be to load libcap.so, libcap.so.2, libcap.so.1 in progression to see if any work.

      (Note that I have performed the workaround I mentioned in https://issues.apache.org/jira/browse/DAEMON-241 to get this far.)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              philsttr Phil Clay
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: