Guardian Programmer's Guide

Table Of Contents
Writing a Command-Interpreter Monitor ($CMON)
Guardian Programmer’s Guide 421922-014
23 - 15
When the User Requests to Change a
Remote Password
After processing the Password^msg message, $CMON sends a Password^reply
message back to the TACL process. The format of this structure is as follows:
The following code fragment checks a flag value to see whether password changes are
allowed, then returns a display message to the TACL process, depending on the
setting of the flag:
CALL READUPDATEX(RECV^NUM,SBUFFER,RCOUNT,BYTES^READ);
IF BUFFER[0] = -57 THEN
BEGIN
IF CHANGE^PASSWORD = YES THEN
BEGIN
PASSWORD^REPLY.REPLYCODE := 0;
PASSWORD^REPLY.REPLYTEXT ':='
["Password change approved",0];
END
ELSE
BEGIN
PASSWORD^REPLY.REPLYCODE := 1;
PASSWORD^REPLY.REPLYTEXT ':='
["Password change rejected",0];
END;
SCAN PASSWORD^REPLY.REPLYTEXT[0] UNTIL 0 -> @LAST;
REPLY^LEN := 2 + @LAST - @PASSWORD^REPLY.REPLYTEXT;
CALL REPLYX(PASSWORD^REPLY,REPLY^LEN);
END;
When the User Requests to Change a Remote Password
When a user requests to change a remote password by issuing a
REMOTEPASSWORD command, the RPASSWRD process sends a
Remotepassword^msg message to the $CMON process. This message is like the
Password^msg message, except that it also contains the name of the node on which
the user wants to change the password. The $CMON reply indicates whether the
users password can be changed and contains optional display text.
Format of Password^reply structure:
STRUCT PASSWORD^REPLY;
BEGIN
INT REPLYCODE; ![0] if 0, allows the password
! to be changed; if 1,
! disallows a change of
! password
STRING REPLYTEXT[0:n]; ![1] optional display text;
! maximum length is 132 bytes
END;