Each line in this file consists of a user name possibly followed by an asterisk '*'. The asterisk designates that the user has spectrometer super user privileges.
The following are example entries:
gladden * callahan * stringer hatcherThe users gladden, callahan, stringer and hatcher are authorized to use the spectrometer and gladden and callahan have spectrometer super user privileges. All other users are unauthorized. Unauthorized users may not start up any spectrometer software that affects the status of spectrometer.
Individuals with super user authorization may halt or abort experiments of which they are not the owner.
Ownership is retained for the life of the process that established it. For example, if the user gains ownership by starting the manager, ownership will be retained until the manager program exits. Likewise, if ownership is gained by running a pulse program, ownership will be retained until the pulse program exits; either because the experiment reached its end or because it was stopped or aborted.
If more than one process establishes ownership on behalf of the user, for example the Manager was started and then a pulse program was started, ownership is retained until both processes terminate. This has an important consequence: if a user starts a pulse program they can then exit the manager and even logoff the computer while still retaining ownership for the life of the experiment. In this case ownership would be relinquished when the experiment finished.
Typically, a user gains ownership at the beginning of a session by starting the Manager. If the spectrometer is un-owned, ownership will be established in the name of the user and will be retained until the user exits the manager program. This guarantees that no other user, operating from another station, can interrupt the user's work.
If the spectrometer is already owned by another user, the Manager will start but all controls that affect the status of the spectrometer will be disabled. Specifically, the buttons for "Run", "Continue, "Halt", "Abort", and "Cond. S/P" will be inactive. It is still possible, however, to perform activities such as editing and compiling pulse programs.
Ownership can also be established by executing the gain_ownership program from the command line. This program deviates from the previous examples in that ownership is granted for the life of the process that started gain_ownership, rather than just until the gain_ownership program exits. For example, if gain_ownership is started from the the user's login shell then ownership will be retained until the user exits the shell (or logs off). Or, if gain_ownership is executed from a script, ownership will be retained until the script exits.
The command line utility owners can be executed to determine who currently owns the spectrometer.
Ownership information is stored in a shared memory structure with the following format:
typedef struct shared_ownership_tag {
uid_t UID;
char proc[PROC_TABLE_SIZE][MAX_STRING];
time_t owned, connected;
} SHARED_OWNERSHIP;
The owned field is used to determine if the spectrometer is currently owned. If the spectrometer is owned, the field contains the time at which ownership was established. If the spectrometer is not owned the field contains zero.
The UID field contains the UID number of the owner. This field is not cleared when ownership is relinquished, so if the spectrometer is not owned it contains the UID of the last owner (assuming there has been an owner since the computer was booted).
The proc[] field is an array of strings that contain the PIDs of the processes that are currently retaining ownership. The strings are actually the proc file system paths of the processes.
The connected field is effectively obsolete. This field was intended to distinguish the case where the the processes retaining ownership had all exited but the pulse programmer was still running. In this case connected would be zero while owned is non-zero. However, the pulse program support code was subsequently modified so that pulse programs do not exit until the pulse programmer has halted. Thus this case never occurs.
If a user has spectrometer super user privileges (see Authorization) they are allowed to stop or abort an experiment even if they are not the current spectrometer owner. For these users, the stop and abort utilities can always be executed successfully from the command line without the necessity of ownership.
However, the super user privilege does not make the "Stop" and "Abort" buttons active in the Manager window when the user is not the owner. Thus halting an experiment not owned by the privileged user requires deliberate action from the command line.