carson@tron.UUCP (Dana Carson) (03/04/89)
Please respond to the address below or post as this looks like it might be of general interest. If mail to that address fails respond to me. ------------ We, like many other organizations, have a home-brewed accounting system which asks the interactive user for an account (charge) number at login, validates it and then stuffs the process header & control region. We have a slight problem under DECwindows... Once the user logs in thru the Username/Passowrd dialog box, we have written an application which pops up and gets the account number. If it's valid, we're all set. If not, we have a problem: We'd normally logout the user at this point if it were a terminal or terminal window. If we log out this "user", we have logged out the session manager -- not a good idea! Since it takes privs (CMKRNL among others) to restart the manager (and most of our users don't have CMKRNL - imagine that!) we need a way to allow them (since by this time the process is their context, not SYSTEM) to restart it. Initially we thought we could get away with writing an INSTALLed program which would run the DECW$STARTLOGIN.EXE process via a LIB$DO_COMMAND - doesn't work since the privs are gone by the time the CLI gets control - likewise LIB$RUN_PROGRAM. It's not obvious whether some hack using LIB$FIND_SYMBOL will accomplish what we need -- Has anybody come up with a way around this problem?? This is the command procedure we started with in SYS$MANAGER:DECW$SYLOGIN: $ set nocontrol_y $ on ERROR then continue $ set noon $ set proc/name=DECWSYLOGIN ! so that the user's process name will start off $ ! ! as the username $ run ACC$:DECW_ACCLOGIN $ if $STATUS then goto GOOD_ACCOUNT ! If bad account then $ stop DECW$WINMGR ! Must stop window manager $ run ACC$:RUN_DECW$STARTLOGIN ! Start login box process $ logout/brief ! Logout this process $ GOOD_ACCOUNT: $ set proc/name=DECWSESSIONMGR $ set working_set/quota=200 $ set on $ set nocontrol_y Thanks for any suggestions, -- Al Sorrell Westinghouse VAX Support Group Baltimore, Md. Internet address: VSG%Plaza.dnet%tron.UUCP@umbc3.UMBC.EDU