Jetty
  1. Jetty
  2. JETTY-458

commons-daemon (jsvc/procrun) integration as alternate to setuid

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      Previously posted to jetty-discuss, but thought this might be a more suitable home

      The basic approach here uses the commons-daemon utilities to control when a switch away from
      root happens. In simple terms anything executed during configure() is done as root, commons-daemon then switches to the alternate user/group before calling start on any configured LifeCycles. (this includes request logs etc...)

      Code is attached. Extract in the top level jetty directory to create
      contrib/jetty-daemon. It also adds a MainDaemon class to start.jar so
      that ClassLoading mechanism can be retained.

      Instructions in the README.TXT should work for 6.1.4

      In svn/6.1.6rc0 you'll need to revert /etc/jetty.xml to include the call
      to open the connectors during configuration.

      I've run this on an Ubuntu 7.04 box with the jsvc package installed.

      Note that jsvc on linux must be run as root and the capabilities kernel
      module must be loaded.

      1. daemon.tar.gz
        5 kB
        Grant Gardner
      2. jetty-458.diff
        15 kB
        Grant Gardner

        Activity

        Hide
        Greg Wilkins added a comment -

        Up for grabs

        Show
        Greg Wilkins added a comment - Up for grabs
        Hide
        Grant Gardner added a comment -

        New patch for jetty 7. Takes a different approach, no dependencies on commons-daemon, just defines appropriate methods in ...start.Main and ...xml.XMLMain (new class factoring the main method out of XmlConfiguration).

        Show
        Grant Gardner added a comment - New patch for jetty 7. Takes a different approach, no dependencies on commons-daemon, just defines appropriate methods in ...start.Main and ...xml.XMLMain (new class factoring the main method out of XmlConfiguration).
        Hide
        Grant Gardner added a comment -

        This time including jetty-jsvc.sh

        Show
        Grant Gardner added a comment - This time including jetty-jsvc.sh
        Hide
        Jan Bartel added a comment -

        This issue has been moved to jetty eclipse bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=396571

        Grant - if you are happy from an ip perspective, and you think the code is still appropriate, can you re-attach the patch to the issue above?

        thanks
        Jan

        Show
        Jan Bartel added a comment - This issue has been moved to jetty eclipse bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=396571 Grant - if you are happy from an ip perspective, and you think the code is still appropriate, can you re-attach the patch to the issue above? thanks Jan
        Hide
        Grant Gardner added a comment -

        Done

        Show
        Grant Gardner added a comment - Done

          People

          • Assignee:
            Michael Gorovoy
            Reporter:
            Grant Gardner
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: