home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / CPM3 / INSTALL.CCP < prev    next >
Text File  |  2000-06-30  |  14KB  |  382 lines

  1. To:       Irv Hoff
  2. From:     Jon Saxton
  3. Date:     4 May 97
  4. Subject:  CCP configuration for RCPM+
  5.  
  6.  
  7.  
  8. AN RCPM+ WITHOUT CCP104
  9. =======================
  10.  
  11. You  don't really NEED to implement Jim Lopushinsky's replacement
  12. CCP to run an RCPM+ but it does help.   Without CCP104+ you'd  do
  13. something like this:-
  14.  
  15. 1.   CP/M  Plus supports password protection on disks and  files.
  16.      Since  we'll be using this facility we enable password  pro-
  17.      tection on the A: drive
  18.  
  19.           set a: [protect=on]
  20.  
  21.      This  only  needs to be done once and not on every  warm  or
  22.      cold  boot so there's no need,  for example,  to include the
  23.      above command in PROFILE.SUB.   (CP/M Plus will  auto-SUBMIT
  24.      PROFILE.SUB  if it and SUBMIT.COM both exist on the  default
  25.      disk after a cold boot.)
  26.  
  27. 2.   Put ALL executable command files on A0: - including the ones
  28.      you don't want people to use - and make them all SYS files
  29.  
  30.           A>set *.*[sys]
  31.  
  32. 3.   Establish the command search path.  This needs to be done on
  33.      cold  boot  and  should  be included  in  PROFILE.SUB  or  a
  34.      derivative - more on that later but the basic command is:-
  35.  
  36.           setdef a:
  37.  
  38.      which  tells  the  CCP to ALWAYS look on the  A:  drive  and
  39.      NOWHERE  ELSE for command files.   You may have an  extended
  40.      path if you really want but it seems a waste on an RCPM (and
  41.      unnecessarily dangerous):-
  42.  
  43.           setdef *,a:,g:
  44.  
  45.      sets the command search path to <current>,A:,G: so that
  46.  
  47.           D3>prog
  48.  
  49.      looks for PROG.COM in D3:, D0:, A3:, A0:, G3:, G0:.
  50.  
  51.      I  use  an  extended setdef command which  does  some  other
  52.      things at the same time:-
  53.  
  54.           setdef a: [order=(com,sub),temp=p:]
  55.  
  56.      The [order=(com,sub)] tells the CCP to look for  program.COM
  57.      and if not found the program.SUB; the [temp=p:] tells things
  58.      like SUBMIT to put temporary files on (my tiny ramdisk) P:.
  59.  
  60.      The  advantage  of the [order...] specification is that  you
  61.      can  execute .SUB files without saying "submit" and  without
  62.      adding a ".sub" suffix, i.e. you can say
  63.  
  64.           compile prog
  65.  
  66.      instead of
  67.  
  68.           submit compile prog
  69.  
  70.      or
  71.           compile.sub prog
  72.  
  73.      to invoke COMPILE.SUB.
  74.  
  75. Now you can execute the programs on A0:  from anywhere.   You may
  76. wish  to  patch  the  standard CCP to  display  the  user  number
  77. regardless of whether or not user 0 is selected.  To do that load
  78. up the CCP under a debugging utility (SID or Z8E are the easiest)
  79.  
  80.           sid ccp.com    or   z8e ccp.com
  81.           s568                e 568
  82.           cd                  cd
  83.           .                   .
  84.           wccp.com            w ccp.com
  85.  
  86. The above sequence changes a CALL NZ,0C13  to a simple CALL 0C13.
  87. Before issuing the wccp.com command to SID or Z8E you should also
  88. locate the internal command list (0637h), and change all internal
  89. commands to lower case - for SID use s637 followed by
  90.  
  91.           "dir type erase rename dirsys user
  92.  
  93. or for Z8E use e637 followed by
  94.  
  95.           'dir type erase rename dirsys user'
  96.  
  97. The  next  trick is to stop remote callers from  executing  those
  98. commands which could compromise the RCPM+.   We have prepared for
  99. this  already by enabling password protection on  the  A:  drive.
  100. Now we just need to protect the appropriate files.  Choose a nice
  101. obscure password...
  102.  
  103.           set erase.com [protect=read,password=obscure]
  104.           set rename.com[pro=read,pass=obscure]
  105.           set date.com[pro=read,pass=obscure]
  106.  
  107. and  so  on for each 'nasty' program.   This only has to be  done
  108. once  so  no  need to make a .SUB file - by using  ^W  and  other
  109. editing  keys it is not too painful.   Do NOT set  protection  on
  110. SUBMIT.COM otherwise PROFILE.SUB won't execute.
  111.  
  112. Somehow  we have to let users 'see' the programs they're  allowed
  113. to execute.  I used a disk editor (SUPERZAP version 3.0 or later)
  114. to  construct  (empty) directory entries in A0:  for things  like
  115. 'dir.com', 'type.com' and so on, using LOWER CASE letters.
  116.  
  117. Now we have all the user commands visible in a directory listing,
  118. all  commands visible to the CCP from anywhere on the system  and
  119. all dangerous commands password-protected so that remote  callers
  120. who  don't know the password cannot execute them.
  121.  
  122. When  doing sysopy things you can use the SET command to set  the
  123. default password
  124.  
  125.           set [default=obscure]
  126.  
  127. and the whole system will be opened up to you.   There's just one
  128. snag - namely that you'd probably want to protect the SET command
  129. itself so you'd have to say
  130.  
  131.           set;obscure [default=obscure]
  132.  
  133. Another option is to use a special password-setting utility  such
  134. as PU which is distributed as source code in this library.  PU is
  135. easy to use and has another advantage ....
  136.  
  137. Finally, we want to set up PROFILE.SUB so that it initializes the
  138. system correctly.  Note that
  139.  
  140.      a)   PROFILE.SUB cannot be password-protected,
  141.      b)   SUBMIT.COM cannot be password-protected,
  142.      c)   Users should not be able to say SUBMIT PROFILE (or just
  143.           PROFILE) and do anything dangerous.
  144.  
  145. One way around these constraints is to have two .SUB files, e.g.
  146.  
  147.      PROFILE.SUB              SETUP.SUB
  148.  
  149.      pu                       date read
  150.      :submit setup            setdef a:
  151.                               device lst:=null
  152.                               hist
  153.  
  154. The  PU program mentioned earlier sets the BDOS result flag to an
  155. error  value if the password prompt is not  answered  'correctly'
  156. and  the next line (starting with a colon) will be  skipped.   If
  157. the  PU  response  is correct then SETUP.SUB  will  be  executed.
  158. SETUP.SUB  can and should be password-protected as should all the
  159. programs it invokes.
  160.  
  161.  
  162. At  first reading all the above probably seems  more  complicated
  163. than  it  really  is.   The password protection  mechanism  is  a
  164. standard feature  of CP/M Plus and is arguabley far  more  secure
  165. than the ZCPR-style "wheel" byte.   Indeed, with the above system
  166. even  the  sysop cannot execute dangerous programs just by  being
  167. the  sysop - either the correct password must be supplied on  any
  168. protected  utility or the password must be set up as the  default
  169. password.
  170.  
  171. A  degree of simplification and a number of other benefits can be
  172. had by implementing Jim Lopushinsky's ZCPR-style CCP replacement,
  173. CCP104.
  174.  
  175.  
  176. SOME ADVANTAGES OF CCP104
  177. =========================
  178.  
  179. 1.   Programs  no  longer have to be marked as SYS  files  to  be
  180.      executable  from  user 0.   This means that it is no  longer
  181.      necessary  to construct fake directory entries  for  command
  182.      files just to show users what is available.   You can simply
  183.      make the user commands DIR files.
  184.  
  185. 2.   A  command library can be tacked onto the end of the  search
  186.      path in the same fashion as ZCPR2's automatic LRUN facility.
  187.      If  a  command has not been found by the end of  the  search
  188.      path (which probably points to A: and nowhere else) then the
  189.      CCP  can  automatically search COMMAND.LBR and  execute  the
  190.      program from there (if it exists therein).
  191.  
  192. 3.   CCP104 supports many ZCPR-style features such as the "wheel"
  193.      byte along with drive and user limits.
  194.  
  195. 4.   The  command library search can be subject to the wheel byte
  196.      setting.  This means it is possible to put all the dangerous
  197.      programs  into COMMAND.LBR and they will only be  accessible
  198.      when  the wheel byte is set - a security feature  completely
  199.      different from and independent of password protection.
  200.  
  201. 5.   CCP104  is compatible with and supports the HIST  RSX  which
  202.      stores the last few commands for recall, edit and re-issue.
  203.  
  204.  
  205. CONFIGURING AND GENERATING CCP104
  206. =================================
  207.  
  208. (Read this section in conjunction with a listing of CCPHDR.MAC)
  209.  
  210. CCP should be YES
  211.  
  212. WHLLBR should probably be YES to inhibit command library searches
  213. when the WHEEL byte is not set in which case you'd put  DANGEROUS
  214. programs  into the command library.   However Tesseract RCPM+ has
  215. been running for a long time with WHLLBR set to NO and with  SAFE
  216. programs  in  the library.   (The dangerous ones are outside  the
  217. library and are password-protected.)
  218.  
  219. EXPAND should probably be YES.
  220.  
  221. MYDRV,  MYWHL and MYUSR should be left at their default values of
  222. 'P',  0FFh  and 15 respectively (plus applicable offsets).   Your
  223. BBS  software  can (and should) set the  values  appropriate  for
  224. remote callers at login.
  225.  
  226. TIME  should probably be YES - it is a nice touch.   However  you
  227. might  like  to dive into the main source code  (CCP104.MAC)  and
  228. suppress  the  enclosing  [brackets] which  have  no  information
  229. value.
  230.  
  231. BYECHK  must be YES if you are going to set NOXOFF to  YES.   I'm
  232. not sure what else is affected by BYECHK.  In any case it doesn't
  233. hurt to leave it set to YES.
  234.  
  235. NOXOFF - take your pick.   If all your RCPM+ utilities sense XOFF
  236. and XON then I guess there's no need to let the BDOS do it  also,
  237. but I left NOXOFF set to NO.
  238.  
  239. YESPRL  should probably be set to NO.   Remember that .PRL  files
  240. are  executable  under CP/M+.   You probably don't have any  .PRL
  241. files  that you want to execute and it is a nuisance to have  to
  242. remember to rename any .PRLs to something else.  KMD does protect
  243. against uploaded .PRL files by automatically renaming them,  just
  244. as  it does for .COM files so if you want to say PROG.PRL on  the
  245. odd occasion then set YESPRL to YES.
  246.  
  247. YESLBR  should be YES if you are going to use the command library
  248. facility.
  249.  
  250. TIMEON  is  up to you.   Having TIMEON set to YES would  be  more
  251. useful  if it displayed the time remaining rather than  the  time
  252. which has elapsed.
  253.  
  254. CRNAME - I can think of no reason why you'd want to use  anything
  255. other  than the default name CMDRUN.COM.   However I'd not  waste
  256. time by allowing a path search.  I'd set it up as:-
  257.  
  258.      crname:
  259.                db        1              ;User 0 (really!)
  260.                db        1              ;Drive A
  261.                db        'CMDRUN  COM'  ;Library processor
  262.  
  263. That  completes the configuration for CCPHDR.MAC from which a new
  264. CCP will be generated.  On a CP/M+ system you just say
  265.  
  266.           ccphdr.sub
  267.  
  268. and CCP.COM pops out the other end.
  269.  
  270.  
  271. LIBRARY COMMAND PROCESSOR
  272. =========================
  273.  
  274. Edit  LRUNHDR.MAC and change EXDRV and EXUSR to match your upload
  275. area.  Tesseract's is B0: so I set
  276.  
  277.      EXDRV:    db     2
  278.      EXUSR:    db     0
  279.  
  280. That's it.  Generate CMDRUN.COM by saying
  281.  
  282.           lrunhdr.sub
  283.  
  284. NAMED DIRECTORIES
  285. =================
  286.  
  287. Of  dubious value.   By the time users figure out what names  are
  288. available they know where to look anyway.   Seems pointless using
  289. up TPA space to store directory names.
  290.  
  291. If  you plan on using Jim Lopushinsky's LD301 (renamed to LD.COM)
  292. to get inside .LBR files then it is a nice touch to include
  293.  
  294.           dirname on
  295.  
  296. in the commands executed (indirectly) out of PROFILE.SUB.  When a
  297. user says
  298.  
  299.           D4>ld bye510
  300.  
  301. then the prompt changes to something like
  302.  
  303.           D4\BYE510>
  304.  
  305. If you're going to use LUX then the above does not apply.
  306.  
  307. WHAT NOW?
  308. =========
  309.  
  310. Most  CP/M Plus systems expect to find CCP.COM on  A0:  but  some
  311. (like  the Osborne Executive) load the CCP from the system tracks
  312. in CP/M2.2-style.   That is quite silly, because in a system with
  313. banked  memory it is possible to store a copy of the  CCP  during
  314. cold boot and reload it from banked memory every warm boot.   The
  315. saving  of a directory entry and 4K of file space seems pointless
  316. even  on  a floppy disk system because then you can change  disks
  317. and no longer need to have a "system" disk in any drive once cold
  318. booting is complete.
  319.  
  320. However it is possible that the computer system on which all this
  321. is  to run has software cast in the old mould,  supplied  without
  322. source code, missing some of the standard configuration tools and
  323. you are stuck with it.
  324.  
  325. The clue is to look for CCP.COM in user 0 of your ORIGINAL system
  326. disk.   If  it exists then the chances are you can  just  replace
  327. your  current  CCP.COM with the one you've just  generated.   If,
  328. when  you  cold-boot you see the prompt displayed as  A>  or  0A>
  329. instead  of A0> then your computer cannot be loading the CCP from
  330. CCP.COM - it must be getting it from somewhere else,  most likely
  331. the system tracks.
  332.  
  333. I cannot tell you how your system track(s) is (are) arranged.  If
  334. you  are lucky then your computer manuals will.   Since I do  not
  335. have that information it is difficult for me to suggest a general
  336. method of rewriting selected portions of the system tracks.
  337.  
  338.  
  339. COMMAND HISTORY
  340. ===============
  341.  
  342. Once you get CCP104 running,  a really nice extra is to implement
  343. a command history stack so you can recall,  edit and re-issue the
  344. most recent commands.
  345.  
  346. At least three are available:-
  347.  
  348.      BUFF12A by Andrew McLean - now superseded.
  349.      HIST by   Jim   Lopushinsky  - derived  from   BUFF12A   but
  350.           substantially rewritten and simplified.
  351.      HISTORY by Stuart Rose.
  352.  
  353. Assuming  you choose HIST (which is available as HIST+.LBR)  then
  354. you  should  password-protect it and invoke it as the  VERY  LAST
  355. command  of the PROFILE.SUB sequence.   (General rule is that any
  356. program  with  an attached [permanent] RSX should be  LAST  in  a
  357. SUBMIT file.   This precludes having two RSX programs in a SUBMIT
  358. file but there is a work-around if you really need it.)
  359.  
  360. Note  also that there is a CCP105+ which supports command history
  361. in  the  same style as UNIX's csh.   I don't know it this  is  an
  362. "approved" version of the CCP10X series.
  363.  
  364. MODIFICATION TO SUBMIT.COM
  365. ==========================
  366.  
  367. With SUMBIT.COM, SUBMOD1.HEX and SID.COM all accessible just say
  368.  
  369.      submod1.sub
  370.  
  371. to  patch SUBMIT.COM to allow it to execute non-SYS submit  files
  372. in user 0.  Note that for this to work, CCP104 or similar MUST be
  373. installed.
  374.  
  375.  
  376. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  377.  
  378.  
  379. Well  that's it.   It has been a while since I actually  did  all
  380. this  so my memory is not to be trusted absolutely but I think  I
  381. have it right.      JRS.
  382.