home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Spezial
/
SPEZIAL2_97.zip
/
SPEZIAL2_97.iso
/
ANWEND
/
ONLINE
/
SREFV12J
/
ADDPRIVS.RX0
< prev
next >
Wrap
Text File
|
1996-11-06
|
2KB
|
52 lines
/* An "INTERPRET" file used to add "dynamic, additional" privileges
to the _ADDPRIV.80 cache.
This should be invoked by including an
<!-- INTERPRET FILE ADDPRIVS.RXX add_priv_names , duration -->
keyphrase to you html document, where:
add_priv_names is the privilege(s) to be added
duration is the number of minutes it will be retained
Note that this "dynamic additional privilege" will ONLY be available
to the client who requested the document containing this keyphrase.
As a security measure, a ! is added to the front of the add_priv_names.
Thus, an add_priv_names of JELLY will yield an additional client
privilege of !JELLY.
A typical use of this is to add a privilege that will be used to
match a MUST_HAVE privilege specified for some other resource.
The idea is that:
access to this other resource will require requesting this
"keyphrase containing" document first.
This uses SREF_ADD_PRIVS to do the work -- as an alternative
to using this "INTERPRET"ed file, you may wish to directly
call SREF_ADD_PRIVS from a "server side processing" routine.
Notes:
If duration is not specified, 15 minutes is used
If add_priv_name is not specified, nothing is done
If desired, you can change (or suppress) the ! add_priv_names
prefix (see the description of the ADD_PRIV_NAMES_PREFIX variable
in INITFILT.DOC).
*/
parse arg add_names , aduration
aport=extract('serverport')
auser=extract('clientaddr')
parse upper arg privlist,expire_minutes,verbose,port,host_nickname,user
status=sref_add_privs(add_names,aduration,verbose,aport,host_nickname,auser,enmadd)
if status=0 then do
if verbose>1 then say " Warning: problem writing to additional-privileges file "
end
interpret.results=' '