$!----------------------------------------------------------------------------- $! 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=" specifying the server account username $! P1..P3 "NOBODY=" 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 $! $!-----------------------------------------------------------------------------