home *** CD-ROM | disk | FTP | other *** search
-
-
-
- RSTARTD(1) RSTARTD(1)
-
-
- NNAAMMEE
- rstartd - a sample implementation of a Remote Start rsh
- helper
-
- SSYYNNOOPPSSIISS
- rrssttaarrttdd
-
- rrssttaarrttdd..rreeaall [-c _c_o_n_f_i_g_f_i_l_e_n_a_m_e]
-
- DDEESSCCRRIIPPTTIIOONN
- _R_s_t_a_r_t_d is an implementation of a Remote Start "helper" as
- defined in "A Flexible Remote Execution Protocol Based on
- rrsshh".
-
- This document describes the peculiarities of _r_s_t_a_r_t_d and
- how it is configured.
-
- OOPPTTIIOONNSS
- --cc _c_o_n_f_i_g_f_i_l_e_n_a_m_e
- This option specifies the "global" configuration
- file that _r_s_t_a_r_t_d is to read. Normally, _r_s_t_a_r_t_d
- is a shell script that invokes _r_s_t_a_r_t_d_._r_e_a_l with
- the --cc switch, allowing local configuration of the
- location of the configuration file. If
- _r_s_t_a_r_t_d_._r_e_a_l is started without the -c option, it
- reads <XRoot>/lib/X11/rstart/config, where <XRoot>
- refers to the root of the X11 install tree.
-
- IINNSSTTAALLLLAATTIIOONN
- It is critical to successful interoperation of the Remote
- Start protocol that _r_s_t_a_r_t_d be installed in a directory
- which is in the "default" search path, so that default rsh
- requests and the ilk will be able to find it.
-
- CCOONNFFIIGGUURRAATTIIOONN AANNDD OOPPEERRAATTIIOONN
- _R_s_t_a_r_t_d is by design highly configurable. One would like
- things like configuration file locations to be fixed, so
- that users and administrators can find them without
- searching, but reality is that no two vendors will agree
- on where things should go, and nobody thinks the original
- location is "right". Thus, _r_s_t_a_r_t_d allows one to relocate
- aallll of its files and directories.
-
- _R_s_t_a_r_t_d has a hierarchy of configuration files which are
- executed in order when a request is made. They are:
-
- global config
- per-user ("local") config
- global per-context config
- per-user ("local") per-context config
- config from request
-
- As you might guess from the presence of "config from
- request", all of the config files are in the format of an
-
-
-
- X Version 11 Release 6.1 1
-
-
-
-
-
- RSTARTD(1) RSTARTD(1)
-
-
- _r_s_t_a_r_t request. _R_s_t_a_r_t_d defines a few additional keywords
- with the INTERNAL- prefix for specifying its
- configuration.
-
- _R_s_t_a_r_t_d starts by reading and executing the global config
- file. This file will normally specify the locations of
- the other configuration files and any systemwide defaults.
-
- _R_s_t_a_r_t_d will then read the user's local config file,
- default name $HOME/.rstart.
-
- _R_s_t_a_r_t_d will then start interpreting the request.
-
- Presumably one of the first lines in the request will be a
- CONTEXT line. The context name is converted to lower
- case.
-
- _R_s_t_a_r_t_d will read the global config file for that context,
- default name <XRoot>/lib/X11/rstart/contexts/<name>, if
- any.
-
- It will then read the user's config file for that context,
- default name $HOME/.rstart.contexts/<name>, if any.
-
- (If neither of these exists, _r_s_t_a_r_t_d aborts with a Failure
- message.)
-
- _R_s_t_a_r_t_d will finish interpreting the request, and execute
- the program specified.
-
- This allows the system administrator and the user a large
- degree of control over the operation of _r_s_t_a_r_t_d. The
- administrator has final say, because the global config
- file doesn't need to specify a per-user config file. If
- it does, however, the user can override anything from the
- global file, and can even completely replace the global
- context config files.
-
- The config files have a somewhat more flexible format than
- requests do; they are allowed to contain blank lines and
- lines beginning with "#" are comments and ignored. (#s in
- the middle of lines are data, not comment markers.)
-
- Any commands run are provided a few useful pieces of
- information in environment variables. The exact names are
- configurable, but the supplied defaults are:
-
- $RSTART_CONTEXT the name of the context
- $RSTART_GLOBAL_CONTEXTS the global contexts directory
- $RSTART_LOCAL_CONTEXTS the local contexts directory
- $RSTART_GLOBAL_COMMANDS the global generic commands directory
- $RSTART_LOCAL_COMMANDS the local generic commands directory
-
- $RSTART_{GLOBAL,LOCAL}_CONTEXTS should contain one special
-
-
-
- X Version 11 Release 6.1 2
-
-
-
-
-
- RSTARTD(1) RSTARTD(1)
-
-
- file, @List, which contains a list of the contexts in that
- directory in the format specified for ListContexts. The
- supplied version of ListContexts will cat both the global
- and local copies of @List.
-
- Generic commands are searched for in several places:
- (defaults)
-
- per-user per-context directory ($HOME/.rstart.commands/<context>)
- global per-context directory (<XRoot>/lib/X11/rstart/commands/<context>)
- per-user all-contexts directory ($HOME/.rstart.commands)
- global all-contexts directory (<XRoot>/lib/X11/rstart/commands)
-
- (Yes, this means you can't have an all-contexts generic
- command with the same name as a context. It didn't seem
- like a big deal.)
-
- Each of these directories should have a file called @List
- that gives the names and descriptions of the commands in
- that directory in the format specified for
- ListGenericCommands.
-
- CCOONNFFIIGGUURRAATTIIOONN KKEEYYWWOORRDDSS
- There are several "special" _r_s_t_a_r_t keywords defined for
- _r_s_t_a_r_t_d configuration. Unless otherwise specified, there
- are no defaults; related features are disabled in this
- case.
-
-
- IINNTTEERRNNAALL--RREEGGIISSTTRRIIEESS nnaammee ......
- Gives a space-separated list of "MISC" registries
- that this system understands. (Registries other
- than this are accepted but generate a Warning.)
-
- IINNTTEERRNNAALL--LLOOCCAALL--DDEEFFAAUULLTT rreellaattiivvee__ffiilleennaammee
- Gives the name ($HOME relative) of the per-user
- config file.
-
- IINNTTEERRNNAALL--GGLLOOBBAALL--CCOONNTTEEXXTTSS aabbssoolluuttee__ddiirreeccttoorryy__nnaammee
- Gives the name of the system-wide contexts
- directory.
-
- IINNTTEERRNNAALL--LLOOCCAALL--CCOONNTTEEXXTTSS rreellaattiivvee__ddiirreeccttoorryy__nnaammee
- Gives the name ($HOME relative) of the per-user
- contexts directory.
-
- IINNTTEERRNNAALL--GGLLOOBBAALL--CCOOMMMMAANNDDSS aabbssoolluuttee__ddiirreeccttoorryy__nnaammee
- Gives the name of the system-wide generic commands
- directory.
-
- IINNTTEERRNNAALL--LLOOCCAALL--CCOOMMMMAANNDDSS rreellaattiivvee__ddiirreeccttoorryy__nnaammee
- Gives the name ($HOME relative) of the per-user
- generic commands directory.
-
-
-
-
- X Version 11 Release 6.1 3
-
-
-
-
-
- RSTARTD(1) RSTARTD(1)
-
-
- IINNTTEERRNNAALL--VVAARRIIAABBLLEE--PPRREEFFIIXX pprreeffiixx
- Gives the prefix for the configuration environment
- variables _r_s_t_a_r_t_d passes to its kids.
-
- IINNTTEERRNNAALL--AAUUTTHH--PPRROOGGRRAAMM aauutthhsscchheemmee pprrooggrraamm aarrggvv[[00]] aarrggvv[[11]]
- ......
- Specifies the program to run to set up
- authentication for the specified authentication
- scheme. "program argv[0] ..." gives the program
- to run and its arguments, in the same form as the
- EXEC keyword.
-
- IINNTTEERRNNAALL--AAUUTTHH--IINNPPUUTT aauutthhsscchheemmee
- Specifies the data to be given to the
- authorization program as its standard input. Each
- argument is passed as a single line. $n, where n
- is a number, is replaced by the n'th argument to
- the "AUTH authscheme arg1 arg2 ..." line.
-
- IINNTTEERRNNAALL--PPRRIINNTT aarrbbiittrraarryy tteexxtt
- Prints its arguments as a Debug message. Mostly
- for _r_s_t_a_r_t_d debugging, but could be used to debug
- config files.
-
- NNOOTTEESS
- When using the C shell, or any other shell which runs a
- script every time the shell is started, the script may get
- run several times. In the worst case, the script may get
- run tthhrreeee times:
-
- By rsh, to run _r_s_t_a_r_t_d
- By _r_s_t_a_r_t_d, to run the specified command
- By the command, eg _x_t_e_r_m
-
- _r_s_t_a_r_t_d currently limits lines, both from config files and
- requests, to BUFSIZ bytes.
-
- DETACH is implemented by redirecting file descriptors 0,1,
- and 2 to /dev/null and forking before executing the
- program.
-
- CMD is implemented by invoking $SHELL (default /bin/sh)
- with "-c" and the specified command as arguments.
-
- POSIX-UMASK is implemented in the obvious way.
-
- The authorization programs are run in the same context as
- the target program - same environment variables, path,
- etc. Long term this might be a problem.
-
- In the X context, GENERIC-CMD Terminal runs xterm. In the
- OpenWindows context, GENERIC-CMD Terminal runs cmdtool.
-
- In the X context, GENERIC-CMD LoadMonitor runs xload. In
-
-
-
- X Version 11 Release 6.1 4
-
-
-
-
-
- RSTARTD(1) RSTARTD(1)
-
-
- the OpenWindows context, GENERIC-CMD LoadMonitor runs
- perfmeter.
-
- GGEENNEERRIICC--CCMMDD LLiissttCCoonntteexxttss lists the contents of @List in
- both the system-wide and per-user contexts directories.
- It is available in all contexts.
-
- GGEENNEERRIICC--CCMMDD LLiissttGGeenneerriiccCCoommmmaannddss lists the contents of
- @List in the system-wide and per-user commands
- directories, including the per-context subdirectories for
- the current context. It is available in all contexts.
-
- CCOONNTTEEXXTT NNoonnee is not implemented.
-
- CCOONNTTEEXXTT DDeeffaauulltt is really dull.
-
- For installation ease, the "contexts" directory in the
- distribution contains a file "@Aliases" which lists a
- context name and aliases for that context. This file is
- used to make symlinks in the contexts and commands
- directories.
-
- All MMIISSCC values are passed unmodified as environment
- variables.
-
- One can mistreat _r_s_t_a_r_t_d in any number of ways, resulting
- in anything from stupid behavior to core dumps. Other
- than by explicitly running programs I don't think it can
- write or delete any files, but there's no guarantee of
- that. The important thing is that (a) it probably won't
- do anything REALLY stupid and (b) it runs with the user's
- permissions, so it can't do anything catastrophic.
-
- @List files need not be complete; contexts or commands
- which are dull or which need not or should not be
- advertised need not be listed. In particular, per-user
- @List files should not list things which are in the
- system-wide @List files. In the future, perhaps
- ListContexts and ListGenericCommands will automatically
- suppress lines from the system-wide files when there are
- per-user replacements for those lines.
-
- Error handling is OK to weak. In particular, no attempt
- is made to properly report errors on the exec itself.
- (Perversely, exec errors could be reliably reported when
- detaching, but not when passing the stdin/out socket to
- the app.)
-
- If compiled with -DODT1_DISPLAY_HACK, _r_s_t_a_r_t_d will work
- around a bug in SCO ODT version 1. (1.1?) (The bug is
- that the X clients are all compiled with a bad library
- that doesn't know how to look host names up using DNS.
- The fix is to look up a host name in $DISPLAY and
- substitute an IP address.) This is a trivial example of
-
-
-
- X Version 11 Release 6.1 5
-
-
-
-
-
- RSTARTD(1) RSTARTD(1)
-
-
- an incompatibility that _r_s_t_a_r_t can hide.
-
- SSEEEE AALLSSOO
- rstart(1), rsh(1), A Flexible Remote Execution Protocol
- Based on rrsshh
-
- AAUUTTHHOORR
- Jordan Brown, Quarterdeck Office Systems
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- X Version 11 Release 6.1 6
-
-
-