is the daemon called by
to have a task performed under different userid while
maintaining limited trust between caller and callee.
There is one optional argument:
Requests that the program daemonise. If this flag is supplied,
will fork and completely detach from the controlling terminal.
If this option is not supplied,
will remain in its starting process group and continue to use the
supplied stderr stream for any runtime system messages; this is useful
as a child of
itself will be reported via
in either case.
issues diagnostics of various kinds to syslog, with facility
The syslog levels used are:
Verbose messages about the activity of the userv daemon.
Two log messages about the nature and outcome of each request.
Messages about the status of the daemon, including the
startup message and the hourly socket check messages.
If the uservd exits because it believes that it no longer controls the
rendezvous socket (ie, its socket has become orphaned), this level
will receive messages indicating why the daemon believes this and
notifying of its shutdown.
A believed-recoverable error condition was detected by the userv
server in itself, the client or the operating system (this includes
resource shortages). The uservd will try to continue.
The uservd detected a non-recoverable error condition after startup
and will exit.
The service configuration language has the facility to direct error
and warning messages to syslog. The default facility and level is
but the author of the configuration file(s) can override this.
The daemon's exit code will reflect how well things went:
The daemon was asked to detach itself from the controlling
terminal and this appears to have been done successfully.
The daemon got a SIGTERM or SIGINT and shut itself down.
The daemon believed that it was no longer the uservd and so exited to
uservd was started with incorrect arguments.
A system call failure or other environmental problem occurred
There was a non-recoverable error after startup; the uservd had
The daemon was asked to detach itself, but its detaching child
died for some unexpected reason.
An unexpected internal error, usually caused by a bug in uservd. This
can also occur if an attempt to block signals using sigprocmask fails.
Outcomes marked * are not possible if the daemon is asked to detach
itself - these exit statuses will be reaped by init instead and so
will not usually be logged anywhere.
The daemon's per-request children will report the success or otherwise
of its request in their exit status. These are not usually be logged
unless they indicate a serious problem.
All of the environment variables passed to
will be inherited by services as part of the default environment.
configuration directive is used, then other system configuration files
can modify the environment. Consult the specification.)
"User service daemon and client specification"
GNU userv, including this manpage, is Copyright (C)1996-2003,2006 Ian
Jackson, except that the
manpage is Copyright (C)2000 Ben Harris and Copyright (C)2003 Ian
GNU userv is licensed under the terms of the GNU General Public
Licence, version 2 or (at your option) any later version, and it comes
with NO WARRANTY, not even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
You should have received a copy of the GNU General Public License
along with userv, if not, write to the Free Software Foundation, 59
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
was initially written in 1996 by Ian Jackson. It became
in 1999, and version 1.0 was released in 2000.