Previous | Contents | Index |
The LGI$ICB_PWDEXPIRED callback routine checks for password expiration.
LGI$ICB_PWDEXPIRED
No value. Does not return on failure.
None.
Use this callback routine to determine whether the account password has expired. If the password is expired, the callback routine:
- Writes its standard error message to the user terminal, if there is a terminal
- Does not return control to the caller
None.
The LGI$ICB_USERPARSE callback routine parses the user name input.
LGI$ICB_USERPARSE input_buffer
OpenVMS usage: cond_value type: longword (unsigned) access: write only mechanism: by value
Condition value in R0.
input_buffer
OpenVMS usage: character string type: string descriptor access: read only mechanism: by reference
The input buffer must contain the characters LOGIN in the first five character locations, followed by an ASCII space character and then the user name and applicable site-specified qualifiers.
The site can use this callback routine to parse input for interactive logins on character-cell and DECwindows terminals.Upon completion of this routine, the user name is accessible at the LGI$A_USERNAME entry in the standard arguments vector.
True (1) if successful; otherwise, any condition code returned by CLI$PARSE.
The LGI$ICB_USERPROMPT callback routine prompts for the user name.
LGI$ICB_USERPROMPT prompt
OpenVMS usage: cond_value type: longword (unsigned) access: write only mechanism: by value
Condition value in R0.
prompt
OpenVMS usage: character string type: string descriptor access: read only mechanism: by reference
A string that must begin with "cr,lf". For example, to produce the standard user name prompt, use your language equivalent of the following BLISS value:
UPLIT(12,UPLIT BYTE(CR,LF,'Username: '))Declare the string in C using the following statement:
You then pass the descriptor using the variable name.
$DESCRIPTOR(<variable_name>, "lrlnUsername:")This routine also produces the standard user name prompt if you pass the value 0 for this argument.
Use this callback routine to interactively prompt for the user name on a character-cell terminal. The callback routine reads the response to the prompt and does standard DCL parsing for the user name and any qualifiers provided. Upon completion of this routine, the user name is accessible at the LGI$A_USERNAME entry in the standard arguments vector.
SS$_NORMAL Success. LGI$_NOTVALID Retry count exceeded for user input.
The LGI$ICB_VALIDATE callback routine validates the user name and passwords against the system authorization file.
LGI$ICB_VALIDATE username ,pwd1 ,pwd2
OpenVMS usage: cond_value type: longword (unsigned) access: write only mechanism: by value
Condition value in R0.
username
OpenVMS usage: character string type: string descriptor access: read only mechanism: by reference
User name.pwd1
OpenVMS usage: character string type: string descriptor access: read only mechanism: by reference
Primary password.pwd2
OpenVMS usage: character string type: string descriptor access: read only mechanism: by reference
Secondary password.
The site can use this callback routine to validate the user name and the user's primary and secondary passwords against the system authorization file (SYSUAF.DAT). The routine also:
- Updates the user authorization (UAF) record with information about login failures
- Performs security auditing
- Performs break-in detection and intrusion evasion
Success, or an error indicating the reason for the failure.
The callable interface of the Mail utility (MAIL) lets you send messages to users on your system or on any other computer connected to your system with DECnet. This chapter describes how application programs using callable MAIL routines can perform the following functions:
For information about the DCL interface to the Mail utility, see the
OpenVMS User's Manual.
16.1 Messages
Messages are files that contain information you want to send to other users. Messages having one or two blocks are part of a mail file, while messages having more than two blocks are external sequential files.
External files reside in the same directory as the mail file that points to them.
A message consists of header information and the bodypart. The message bodypart consists of text records that contain information you want to send to another user.
Figure 16-1 illustrates the format of a mail message.
Figure 16-1 Standard Message Format
From: MYNODE::USER "The Celestial Navigator" (1) To: NODE::J_DOE (2) CC: USER (3) Subj: Perseids ... (4) Get ready. Tuesday of this week (August 12th), one (5) of the most abundant meteor showers of the year will occur. The Perseids, also known as the St. Laurence's Tears, stream across earth's orbit at 319.3 degrees. Radiant 3h4m +58 degrees. Fine for photography with an average magnitude of 2.27. There will be some fireballs, fainter white or yellow meteors, and brighter green or orange or red ones. About one third of the meteors, including all the brightest, leave yellowish trains, which may be spectacular, up to 2 degrees wide and lasting up to 100 seconds. Brighter meteors often end in flares or bursts. (6) |
The parts of a message are as follows:
External Message Identification Number
In addition, the file name of an external message uses the following format:
MAIL$nnnnnnnnnnnnnnnn.MAI |
where n...n is the external message identification number.
16.2 Folders
The Mail utility organizes messages by date and time received and, secondarily, by folder name. All messages are associated with a folder name---either default folders or user-specified folders. The Mail utility associates mail messages with one of three default mail folder names. Table 16-1 describes the three default mail folders.
Folder | Contents |
---|---|
NEWMAIL | Newly received, unread messages |
Messages that have been read and not deleted | |
WASTEBASKET | Messages designated for deletion |
You can also place messages in any user-defined mail folder and file.
16.3 Mail Files
A mail file is an indexed file that contains the following types of data:
In addition, you can select messages from mail files as well as copy or move messages to or from mail files.
The indexed mail file format offers two advantages: use of folders and
faster access time than sequential access. Indexed mail files use two
keys to locate messages---a primary key denoting the
date and time received and a secondary key using the
folder name.
16.4 User Profile Database
The Mail utility maintains an indexed data file VMSMAIL_PROFILE.DATA that serves as a systemwide database of user profile entries. A user profile entry is a record that contains data describing a Mail user's default processing characteristics and whose primary key is the user name. Table 16-2 summarizes information contained in a user profile entry.
Field | Function |
---|---|
Directory | Default MAIL subdirectory |
Form | Default print form |
Forwarding address | Forwarding address |
Personal name string | User-specified character string included in the message header |
Queue name | Default print queue name |
Flags
Automatic purge CC: prompt Copy self forward Copy self reply Copy self send |
Purging of the wastebasket folder on exiting Carbon copy prompt Copy to self when forwarding a message Copy to self when replying to a message Copy to self when sending a message |
Signature file | Text file that is automatically appended to the end of the body of a mail message |
Both the callable interface and the user interface access the user
profile database to determine default processing characteristics.
16.5 Mail Utility Processing Contexts
The Mail utility defines four discrete levels of processing, or contexts for manipulating mail files, messages, folders, and the user profile database as shown in Table 16-3.
Context | Entity |
---|---|
Mail file | Mail files and folders |
Message | Mail files, folders, and messages |
Send | Messages |
User | User profile database |
Within each context, your application processes specific entities in certain ways using callable MAIL routines as described in the sections that follow.
You must explicitly begin and end each MAIL context. Each group of routines contains a pair of context-initiating and terminating routines.
When you begin processing in any context, the Mail utility performs the following functions:
Terminating a MAIL processing context deallocates virtual memory. You
must explicitly terminate processing in any context by calling a
context-terminating routine.
16.5.1 Callable Mail Utility Routines
There are four types of callable Mail utility routines, each corresponding to the context within which they execute. A prefix identifies each functional group:
Table 16-4 lists Mail utility routines according to context.
Context | Routine |
---|---|
Mail file |
MAIL$MAILFILE_BEGIN
MAIL$MAILFILE_CLOSE MAIL$MAILFILE_COMPRESS MAIL$MAILFILE_END MAIL$MAILFILE_INFO_FILE MAIL$MAILFILE_MODIFY MAIL$MAILFILE_OPEN MAIL$MAILFILE_PURGE_WASTE |
Message |
MAIL$MESSAGE_BEGIN
MAIL$MESSAGE_COPY MAIL$MESSAGE_DELETE MAIL$MESSAGE_END MAIL$MESSAGE_GET MAIL$MESSAGE_INFO MAIL$MESSAGE_MODIFY MAIL$MESSAGE_SELECT |
Send |
MAIL$SEND_ABORT
MAIL$SEND_ADD_ADDRESS MAIL$SEND_ADD_ATTRIBUTE MAIL$SEND_ADD_BODYPART MAIL$SEND_BEGIN MAIL$SEND_END MAIL$SEND_MESSAGE |
User |
MAIL$USER_BEGIN
MAIL$USER_DELETE_INFO MAIL$USER_END MAIL$USER_GET_INFO MAIL$USER_SET_INFO |
Once you have successfully initiated MAIL processing in a context, you have created a thread. A thread is a series of calls to MAIL routines that uses the same context information. Applications can contain one or more threads.
For example, consider an application that begins mail file processing; opens, compresses, and closes a mail file; and ends mail file context processing. This application executes a single thread of procedures that reference the same context variable names and pass the same context information.
You can create up to 31 concurrent threads. Applications that contain more than one thread must maintain unique context variables for each thread in order to pass thread-specific context information.
The Mail utility returns the condition value MAIL$_NOMORECTX when your
process attempts to exceed the maximum number of allowable threads.
16.6 Programming Considerations
The calling sequence for all MAIL routines consists of a status variable, an entry point name, and an argument list. All arguments within the argument list are required. All callable MAIL routines use the same arguments in their calling sequences as described in the following example:
STATUS=MAIL$MAILFILE_BEGIN(CONTEXT, IN_ITEM_LIST, OUT_ITEM_LIST) |
The variable status receives the condition value, and
the argument context receives the context information.
The arguments in_item_list and
out_item_list are input and output item lists that
contain one or more input or output item descriptors.
16.6.1 Condition Handling
At run time, a hardware- or software-related event can occur that determines whether or not the application executes successfully. The Mail utility processes such an event, or condition in the following ways:
You can establish your own condition handler or allow the program to signal the default condition handler.
You can disable signaling for any call by specifying the item code
MAIL$_NOSIGNAL as an item in the input item list.
16.6.2 Item Lists and Item Descriptors
Your application passes data to callable MAIL routines and receives
data from routines through data structures called item
lists defined in your program.
16.6.2.1 Structure of an Item Descriptor
An input or output item list is a data structure that consists of one or more input or output item descriptors.
The following table summarizes the characteristics of item lists:
Item Descriptor | Characteristics |
---|---|
Input | Each descriptor points to a buffer or file from which Mail reads data. |
Output | Each descriptor points to a buffer or file to which Mail writes data. |
An item descriptor is a data structure consisting of three longwords as described in Figure 16-2.
Figure 16-2 Item Descriptor
Item descriptor fields are described as follows:
Field | Function | ||||||
---|---|---|---|---|---|---|---|
Item code | Specifies an action the routine is to perform. | ||||||
Buffer length | Specifies the length in bytes of an input or output buffer. | ||||||
Buffer address | Specifies the address of the input or output buffer. | ||||||
Return length address |
Depends on the type of item code specified:
|
You can specify item descriptors in any order within an item list. |
The item code defines an action that the routine is to perform. Input and output item codes are specified in input and output item descriptors, respectively.
Boolean input and output item codes request an operation but do not pass data to the called routine. For example, the item code MAIL$_USER_SET_CC_PROMPT sets the CC prompt flag enabling use of CC: field text.
For a complete list of input and output item codes, see Tables 16-10 and 16-11.
Previous | Next | Contents | Index |