[0001]
[0002]
[0003]
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071]
[0072]
[0073]
[0074]
[0075]
[0076]
[0077]
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111]
[0112]
[0113]
[0114]
[0115]
[0116]
[0117]
[0118]
[0119]
[0120]
[0121]
[0122]
[0123]
[0124]
[0125]
[0126]
[0127]
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
[0134]
[0135]
[0136]
[0137]
[0138]
[0139]
[0140]
[0141]
[0142]
[0143]
[0144]
[0145]
[0146]
[0147]
[0148]
$!-----------------------------------------------------------------------------
$! USERNAMES.COM
$!
$! Copyright (C) 1996-2021 Mark G.Daniel.
$!
$! Licensed under the Apache License, Version 2.0 (the "License");
$! you may not use this file except in compliance with the License.
$! You may obtain a copy of the License at
$!
$!    http://www.apache.org/licenses/LICENSE-2.0
$!
$! Unless required by applicable law or agreed to in writing, software
$! distributed under the License is distributed on an "AS IS" BASIS,
$! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
$! See the License for the specific language governing permissions and
$! limitations under the License.
$!
$! Check for and/or establishes the HTTP$SERVER and HTTP$NOBODY usernames.
$!
$! P1..P3   "INSTALL"            called from INSTALL.COM
$! P1..P3   "SERVER=<string>"    specifying the server account username
$! P1..P3   "NOBODY=<string>"    specifying the scripting account username
$!
$! 07-NOV-2009  MGD  WASD v10 logical naming schema
$! 01-NOV-2002  MGD  initial
$!-----------------------------------------------------------------------------
$!
$ if f$trnlnm("INSTALL$DBUG") .nes. "" then set verify
$ ss$_abort = 44
$ ss$_bugcheck = 676
$ say = "write sys$output"
$ if f$environment("depth") .eq. 1 then say ""
$ on controly then exit ss$_abort
$!
$!(if called by INSTALL.COM to create required accounts)
$ install = 0
$ if p1 .eqs. "INSTALL" then install = 1
$!
$ @WASD_ROOT:[INSTALL]SECHAN.COM
$!
$ http$server_username == ""
$ http$nobody_username == ""
$!
$ if f$element(0,"=",p1) .eqs. "SERVER" -
     then http$server_username == f$element(1,"=",p1) 
$ if f$element(0,"=",p2) .eqs. "SERVER" -
     then http$server_username == f$element(1,"=",p2) 
$ if f$element(0,"=",p3) .eqs. "SERVER" -
     then http$server_username == f$element(1,"=",p3) 
$!
$ if f$element(0,"=",p1) .eqs. "NOBODY" -
     then http$nobody_username == f$element(1,"=",p1) 
$ if f$element(0,"=",p2) .eqs. "NOBODY" -
     then http$nobody_username == f$element(1,"=",p2) 
$ if f$element(0,"=",p3) .eqs. "NOBODY" -
     then http$nobody_username == f$element(1,"=",p3) 
$!
$ if http$server_username .eqs. ""
$ then
$    set noon
$    sechan /getuai "HTTP$SERVER"
$    if $status then http$server_username == "HTTP$SERVER"
$    set on
$ endif
$!
$ if http$nobody_username .eqs. ""
$ then
$    set noon
$    sechan /getuai "HTTP$NOBODY"
$    if $status then http$nobody_username == "HTTP$NOBODY"
$    set on
$ endif
$!
$ if http$server_username .eqs. "" .or. -
     http$nobody_username .eqs. ""
$ then
$    call get_usernames
$ endif
$!
$!(delete the symbols it created)
$ sechan /getuai
$ exit
$!
$!-----------------------------------------------------------------------------
$!
$ GET_USERNAMES: SUBROUTINE
$!
$! prompts for server and scripting usernames (if necessary)
$! parameters: none
$! returns: can modify global symbols 'http$server_username' and
$!          'http$nobody_username'
$!
$ on controly then exit ss$_abort
$ server = "HTTP$SERVER"
$ nobody = "HTTP$NOBODY"
$!
$ set noon
$ sechan /getuai "''http$server_username'"
$ set on
$ if f$type(sechan_uic) .eqs. ""
$ then
$    type sys$input
                       ******************************
                       *  SUPPLY PACKAGE USERNAMES  *
                       ******************************

$    response = ""
$    read sys$command response /prompt="Server account username [''server']: "
$    say ""
$    if response .nes. ""
$       then http$server_username == f$edit(response,"upcase")
$       else http$server_username == server
$    endif
$ endif
$!
$ set noon
$ sechan /getuai "''http$nobody_username'"
$ set on
$ if f$type(sechan_uic) .eqs. ""
$ then
$!
$    response = "YES"
$    read sys$command response /prompt="Do you (want to) use a separate default scripting account? [YES]: " 
$    say ""
$    if response .eqs. "" then response = "YES"
$    if response 
$    then
$       response = ""
$       read sys$command response /prompt="Enter scripting account username [''nobody']: "
$       say ""
$       if response .nes. ""
$       then
$          http$nobody_username == f$edit(response,"upcase")
$       else
$          http$nobody_username == nobody
$       endif
$    else
$       http$nobody_username == server
$    endif
$ endif
$!
$!(delete the symbols created)
$ sechan /getuai
$!
$ exit
$ endsubroutine
$!
$!-----------------------------------------------------------------------------