admin(1) admin(1)NAME admin - creates and administers SCCS files SYNOPSIS admin [-aname-or-gid] [-doption[value]] [-ename-or-gid] [-foption[value]] [-h] [-i[name]] [-m[mrlist]] [-n] [-rrelease[.level]] [-t[descriptive-text]] [-y[comment]] [-z] file... ARGUMENTS -aname-or-gid Specifies a login name or a numeric group ID to be added to the list of users who are allowed to modify the Source Code Control System (SCCS) file. The list of users is stored in the control information of the SCCS file. Specifying a group ID is the same as specifying all the login names common to that group ID. You can use more than one -a option on a single admin command line, and you can accumulate as many login names and numeric group IDs as you wish. If the control information does not include a list of users, which is the default, anyone who can read and write the file can check out the file for editing. If you precede name-or-gid with an exclamation mark (!), the specified login name or members of the specified group ID will not be allowed to check out the file for editing. To remove a login name or group ID from the list of users, see the -e option. -doption [list] Causes the specified option, previously added by the -f option, to be removed from the SCCS file. You can specify the -d option on existing SCCS files only, and you can combine several -d options on a single admin command line. If you specify the l option and a list of releases, admin ``unlocks'' the releases. See the -f option for the other possible options. -ename-or-gid Specifies a login name or numeric group ID to be removed from the list of users who are allowed to make changes to the file. The list of users is stored in the control information of the SCCS file. Specifying a group ID is the same as specifying all login names common to that group ID. You can use several -e options on a single admin command line. This option undoes the work of the -a option. file Specifies the file that admin is to create or update. When a file is placed under SCCS for the first time, file is the name of a file that admin is to create. The number of file arguments depends on the option, that January 1992 1
admin(1) admin(1)you use to create the file. (These options are described later in this list. For compatibility with the SCCS commands, the name of a file controlled by SCCS must begin with an s and a period (.). The name that you provide can consist of up to 255 characters, including the required s. prefix. When creating a new file, admin initializes control information according to the options provided on the command line and assigns default values for any required options that are not specified. When changing control information, you can provide one or more file arguments, which is the name of a file previously created by the admin command. The admin command changes only the specified control information and leaves the remainder alone. If file is a directory, admin behaves as though each file in the directory were specified on the command line. If file is a hyphen (-), admin reads the standard input and interprets each line as the name of an SCCS file to be processed. In either case, files that do not begin with s. and unreadable files are silently ignored. -foptions [list] Specifies an option to be placed in the control information of an SCCS file. Some options require or accept value, which further defines the action of option. You can use more than one -f option on a single admin command line. You can use the -d option to remove an option from an SCCS file. Here are the allowable values of option and their meanings: b Allows the use of the -b option on any future get command to create branch deltas. cceiling Specifies the highest release number that get can assign to this file. The value of ceiling must be less than 10,000. The default value of ceiling is 9999. See the -r option for an explanation of release numbers. ddeltanum Specifies the default delta number (SID) to be used by any future get command. ffloor Specifies the lowest release number that get can assign to this file. The value of floor must be greater than 0 but less than 9999. The default value of floor is 1. See the -r option for an explanation of release numbers. 2 January 1992
admin(1) admin(1)i[string] Protects the presence of keywords, which you add manually to the text of a file before you run admin on it. If a future get or delta of a protected file results in the No id keywords (ge6) message, the message is treated as a fatal error. You must restore the keywords to the file before proceeding. If you do not use this option, get and delta treat this message as a warning. If you do not specify string, all keywords are protected. If you specify string, the SCCS file must contain a string of keywords that exactly matches string. Embedded newlines are not allowed in string. To specify multiple keywords separated by a space, quote them, as in -fi"%M %I %D" See get(1) for a list of valid identification keywords. j Allows concurrent get commands for editing the same SID of an SCCS file. This option allows multiple concurrent updates to the same version of the SCCS file. llist Specifies a list of releases to which deltas may no longer be made. Any future attempts to use the get command on one of these ``locked'' releases for editing will fail. The list has the following syntax: <list> ::= <range> | <list> , <range> <range>~::= release-number | a Using the character a in list is equivalent to specifying all releases for the named SCCS file. mmodule-name Uses module-name to specify a string that get will substitute for all occurrences of the %M% keyword in the SCCS file when the text is retrieved. If you do not use the m option, get substitutes the name of the SCCS file, with the prefix s. removed, for all occurrences of the %M% keyword. n Causes future invocations of delta to create a null delta for any skipped releases when a delta is made in a new release. For example, if you January 1992 3
admin(1) admin(1)make delta 5.1 after delta 2.7, releases 3 and 4 are skipped. The null deltas serve as anchor points so that you can create branch deltas later. If you do not use this option, you will be unable to create branch deltas for the skipped releases in the future. qstring Specifies a string that get will substitute for all occurrences of the %Q% keyword in the SCCS file when the text is retrieved. tmodule-type Uses module-type to specify a string that get will substitute for all occurrences of the %Y% keyword in the SCCS file when it retrieves the text. v[program] Uses program to specify the name of a user- supplied Modification Request (MR) validity- checking program. The value of program can be an absolute pathname or a program that resides in a directory listed in $PATH. If you set this option when you are creating an SCCS file, you must also use the -m option. The v option causes future invocations of delta on the text of the SCCS file to prompt for MR numbers as the reason for making a delta and to invoke the validity-checking program to verify that the MR number is valid. -h Causes admin to check the structure of the SCCS file (see sccsfile(4)) and to compare a newly computed checksum with the checksum stored in the first line of the SCCS file. (The checksum is the sum of all the characters in the SCCS file except those in the first line.) The admin command displays an error diagnostic if the comparison of the checksums fails. Because this option inhibits writing to the file argument, you cannot use this option in conjunction with any other option. As a result, this option is useful only when an existing file is processed. -i[name] Creates a new SCCS file whose text is the content of the file specified by name. If you use this option and omit name, admin obtains the text by reading the standard input until it encounters an end-of-file. You can specify only one file argument when you use this option. If you do not use this option, you must 4 January 1992
admin(1) admin(1)explicitly specify the -n option. -m[mrlist] Specifies a list of alphanumeric MR numbers to be associated with the initial version of an SCCS file. This option can be used only with the -i or -n option and must be used in conjunction with the v option. If the list has more than one MR number, enclose the list in quotation marks and separate the numbers by a space or a tab. This list can have up to 61 MR numbers. The admin command executes the user-supplied MR validity-checking program specified by the v option to verify mrlist. The admin command displays error diagnostics if the v option is not set or if MR validity checking fails. If validity-checking is successful, the admin command inserts mrlist in a manner identical to that of delta. -n Creates a new SCCS file that contains only control information. Use this option when you do not have an existing file to place under SCCS. You can supply more than one file argument when you use this option. -rrelease[.level] Specifies an integer value for the release and level into which the initial delta is to be inserted. If you do not use this option, 1.1 is the default initial delta. You can use this option only if you also use the -i option. -t[descriptive-text] Causes descriptive text, from the file specified by descriptive-text, to be incorporated in the control information of the SCCS file. Descriptive text is any text that, for your own purposes, you want to associate with the actual text of the file. If you use this option with the -i or -n option to create an SCCS file, descriptive-text is required. If you use this option with an existing SCCS file and do not provide descriptive-text, admin removes any existing descriptive text from the SCCS file. If you provide descriptive-text, admin replaces any existing descriptive text with the contents of the file specified by descriptive-text. -y[comment] Specifies text to be inserted as a comment in the SCCS file when it is created. If comment contains spaces, January 1992 5
admin(1) admin(1)enclose the entire comment in double quotation marks. You can use this option only in conjunction with the -i and -n options. The admin command inserts the comment in a manner identical to that of delta. If you do not specify this option, admin inserts a default comment of the form: date and time created YY/MM/DD HH:MM:SS by login-id -z Causes admin to recompute the checksum and store it in the first line of the SCCS file. Note that use of this option on a corrupted file prevents future detection of the corruption. DESCRIPTION admin creates new SCCS files and changes the control information of existing SCCS files. A file created by admin contains, in addition to the actual text, control information used by the SCCS commands to manage the text. The control information consists of an option followed by the associated information. In general, you place a file under SCCS by using the -i or -n option, and you tailor the control information through the other options. Many of the options for tailoring the control information manage the outcome of future get and delta commands. Any particular version of an SCCS file is commonly called a ``delta''; the cycle of running get and delta on a file is commonly called ``checking a file out and in.'' Making a change to an SCCS file is commonly called ``making a delta.'' Security and Permission Bits For the highest level of security, the permission bits of directories that contain SCCS files should be 755, and the permission bits of SCCS files themselves should be read-only (444). These settings allow only the owner of an SCCS file to modify it by using SCCS commands only. To create a new SCCS file, you must have write permission in the pertinent directory. The admin command sets the permission bits on a newly created SCCS file to 444. When updating an existing SCCS file, admin retains the file's original permission bits. The admin command writes to a temporary file called x.filename. This file is created with read-only permission bits, if a new SCCS file is being created; if an existing file is being changed, this file is created with the same permission bits as the existing SCCS file. After successfully creating or updating x.filename, admin removes the SCCS file (if it exists) and renames x.filename with the name of the SCCS file. This strategy 6 January 1992
admin(1) admin(1)ensures that changes are made to the SCCS file only if no errors occurred. The admin command also uses a temporary lock file, z.filename, to prevent simultaneous updates to an SCCS file by two or more users. See get(1) for further information. Handling a Corrupted File If you, as the owner, need to correct an SCCS file by using a non-SCCS command, you can change the permission bits to 644 and use an editor to make the correction. You should always run admin -h on the edited file to check for corruption and then run admin -z to generate a valid checksum. You should then run admin -h again to ensure that the SCCS file is valid. The Validity-Checking Program If you want to take advantage of the v option, which causes delta to prompt for MR numbers, you must write a program to check the numbers. The admin and delta commands call execvp (see exec(2) for details) to execute the validity-checking program. The first element of the argv array contains the name of the validity-checking program, as specified by the v option, and the second element contains the filename, with its s. prefix removed, of the SCCS file being processed. The validity-checking program should return zero to indicate that the MR number is valid, or nonzero to indicate failure. EXAMPLES This command uses a file named tempest.c to create a new file in SCCS format named s.tempest: admin -itempest.c s.tempest.c STATUS MESSAGES AND VALUES The bdiff command produces messages that the help command can interpret. You may, for example, see this message: ERROR [s.file]: MRs required (de10) To see an explanation of this message, enter help de10 FILES /usr/bin/admin Executable file filename Existing file to be placed under SCCS control s.filename January 1992 7
admin(1) admin(1)SCCS file created or changed by admin x.filename Temporary file z.filename Lock file that prevents simultaneous updates to s.filename SEE ALSO delta(1), ed(1), get(1), help(1), prs(1), what(1) sccsfile(4) in A/UX Programmer's Reference ``SCCS Reference'' in A/UX Programming Languages and Tools, Volume 2 8 January 1992