@Deprecated public class SetUIDServer extends org.eclipse.jetty.server.Server
Server will make a JNI call to set the unix UID.
This can be used to start the server as root so that privileged ports may be accessed and then switch to a non-root user for security. Depending on the value
of setStartServerAsPrivileged(boolean), either the server will be started and then the UID set; or the Server.getConnectors() will be opened
with a call to Connector#open(), the UID set and then the server is started. The later is the default and avoids any webapplication code being run as
a privileged user, but will not work if the application code also needs to open privileged ports.
The configured umask is set before the server is started and the configured uid is set after the server is started.
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener| Constructor and Description |
|---|
SetUIDServer()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart()
Deprecated.
|
int |
getGid()
Deprecated.
|
String |
getGroupname()
Deprecated.
|
RLimit |
getRLimitNoFiles()
Deprecated.
|
int |
getUid()
Deprecated.
|
int |
getUmask()
Deprecated.
|
String |
getUmaskOctal()
Deprecated.
|
String |
getUsername()
Deprecated.
|
boolean |
isStartServerAsPrivileged()
Deprecated.
|
void |
setGid(int gid)
Deprecated.
|
void |
setGroupname(String groupname)
Deprecated.
|
void |
setRLimitNoFiles(RLimit rlimit)
Deprecated.
|
void |
setStartServerAsPrivileged(boolean startContextsAsPrivileged)
Deprecated.
|
void |
setUid(int uid)
Deprecated.
|
void |
setUmask(int umask)
Deprecated.
|
void |
setUmaskOctal(String umask)
Deprecated.
|
void |
setUsername(String username)
Deprecated.
|
addConnector, clearAttributes, doStop, dump, getAttribute, getAttributeNames, getConnectors, getDateField, getSessionIdManager, getStopAtShutdown, getThreadPool, getURI, getVersion, handle, handleAsync, handleOptions, isDumpAfterStart, isDumpBeforeStop, join, main, removeAttribute, removeConnector, setAttribute, setConnectors, setDumpAfterStart, setDumpBeforeStop, setSessionIdManager, setStopAtShutdown, start, toStringdestroy, expandChildren, getHandler, getHandlers, handle, setHandler, setServerexpandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClassaddBean, addBean, addBean, addEventListener, contains, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, stop, unmanage, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic void setUsername(String username)
public String getUsername()
public void setGroupname(String groupname)
public String getGroupname()
public int getUmask()
public String getUmaskOctal()
public void setUmask(int umask)
public void setUmaskOctal(String umask)
public int getUid()
public void setUid(int uid)
public void setGid(int gid)
public int getGid()
public void setRLimitNoFiles(RLimit rlimit)
public RLimit getRLimitNoFiles()
protected void doStart()
throws Exception
doStart in class org.eclipse.jetty.server.ServerExceptionpublic boolean isStartServerAsPrivileged()
public void setStartServerAsPrivileged(boolean startContextsAsPrivileged)
startContextsAsPrivileged - if true, the server is started and then the process UID is switched. If false, the connectors are opened, the UID is switched and then the
server is started.Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.