Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.setuid
Class SetUIDServer

    java.lang.Object
      org.mortbay.component.AbstractLifeCycle
          org.mortbay.jetty.handler.AbstractHandler
              org.mortbay.jetty.handler.AbstractHandlerContainer
                  org.mortbay.jetty.handler.HandlerWrapper
                      org.mortbay.jetty.Server
                          org.mortbay.setuid.SetUIDServer

All Implemented Interfaces:
  LifeCycle, Handler, HandlerContainer, Attributes

    public class SetUIDServer

extends Server

This extension of `Server` will make a JNI call to set the unix UID after the server has been started. This can be used to start the server as root so that priviledged ports may be accessed and then switch to a non-root user for security. The configured umask is set before the server is started and the configured uid is set after the server is started.

Author:
  gregw

Field Summary

Fields inherited from class org.mortbay.jetty.handler.AbstractHandler
`_string`

Fields inherited from interface org.mortbay.jetty.Handler
`ALL, DEFAULT, ERROR, FORWARD, INCLUDE, REQUEST`

Constructor Summary
`SetUIDServer()`

Method Summary
`protected void` | `doStart()`
`int` | `getUid()`
`int` | `getUmask()`
`void` | `setUid(int uid)`
`void` | `setUmask(int umask)`

Methods inherited from class org.mortbay.jetty.Server
`addConnector, addHandler, addLifeCycle, addUserRealm, clearAttributes, doStop, getAttribute, getAttributeNames, getConnectors, getContainer, getHandlers, getSendServerVersion, getSessionIdManager, getStopAtShutdown, getThreadPool, getUserRealms, getVersion, handle, join, removeAttribute, removeConnector, removeHandler, removeLifeCycle, removeUserRealm, setAttribute, setConnectors, setHandlers, setSendServerVersion, setSessionIdManager, setStopAtShutdown, setThreadPool, setUserRealms`

Methods inherited from class org.mortbay.jetty.handler.HandlerWrapper
`expandChildren, getHandler, handle, setHandler, setServer`

Methods inherited from class org.mortbay.jetty.handler.AbstractHandlerContainer
`expandHandler, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass`

Methods inherited from class org.mortbay.jetty.handler.AbstractHandler
`destroy, getServer, toString`

Methods inherited from class org.mortbay.component.AbstractLifeCycle
`isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, start, stop`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.mortbay.component.LifeCycle
`isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, start, stop`

Constructor Detail

### SetUIDServer

    public SetUIDServer()

Method Detail

### getUmask

    public int getUmask()

### setUmask

    public void setUmask(int umask)

### getUid

    public int getUid()

### setUid

    public void setUid(int uid)

### doStart

    protected void doStart()
                    throws Exception

  Overrides:
    `doStart` in class `Server`
  Throws:
    `Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.