home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / srev13h.zip / ADDPRIVS.RX0 < prev    next >
Text File  |  1996-11-06  |  2KB  |  52 lines

  1. /* An "INTERPRET" file used to add "dynamic, additional" privileges
  2.  to the _ADDPRIV.80 cache.
  3.  
  4.   This should be invoked by including an
  5.        <!-- INTERPRET FILE ADDPRIVS.RXX  add_priv_names , duration -->
  6.   keyphrase to you html document, where:
  7.       add_priv_names is the privilege(s) to be added
  8.       duration is the number of minutes it will be retained
  9.  Note that this "dynamic additional privilege" will ONLY be available
  10.  to the client who requested the document containing this keyphrase.
  11.  
  12.  As a security measure, a ! is added to the front of the add_priv_names.
  13.  Thus, an add_priv_names of JELLY will yield an additional client
  14.  privilege of !JELLY.
  15.  
  16.  A typical use of this is to add a privilege that will be used to
  17.  match a MUST_HAVE privilege specified for some other resource. 
  18.  The idea is that:
  19.      access to this other resource will require requesting this
  20.      "keyphrase containing" document  first.
  21.  
  22.  This uses SREF_ADD_PRIVS to do the work -- as an alternative
  23.  to using this "INTERPRET"ed file, you may wish to directly
  24.  call SREF_ADD_PRIVS from a "server side processing" routine.
  25.  
  26. Notes:
  27.   If duration is not specified, 15 minutes is used
  28.   If add_priv_name is not specified, nothing is done
  29.   If desired, you can change (or suppress) the ! add_priv_names
  30.   prefix (see the description of the ADD_PRIV_NAMES_PREFIX variable
  31.   in INITFILT.DOC).
  32.  
  33. */
  34.  
  35.  
  36.  
  37. parse arg  add_names , aduration
  38. aport=extract('serverport')
  39. auser=extract('clientaddr')
  40.  
  41. parse upper arg privlist,expire_minutes,verbose,port,host_nickname,user
  42.  
  43. status=sref_add_privs(add_names,aduration,verbose,aport,host_nickname,auser,enmadd)
  44. if status=0 then do
  45.   if verbose>1 then say " Warning: problem writing to additional-privileges file "
  46. end
  47.  
  48. interpret.results=' '
  49.  
  50.  
  51.  
  52.