[comp.unix.xenix] stand-alone programs

root@rdb1.UUCP (Robert Barrell) (06/05/90)

     The SCO development system manuals mention the ability for ld or fixhdr to
set a stand-alone program address to create programs which would not run
directly from xenix.  An example of this kind of program is /dos which, when
typed at the boot prompt, will boot the user to MSDOS if there is a proper DOS
partition on the hard drive.  Unfortunately, the manuals don't make it very
clear as to how to create any such programs.  I have tried, and when my
program's name is typed at the boot prompt, the machine just sits there.
     What I'd like to do is very simple: I know a few people who wish to prevent
unauthorized people from booting their machines.  Preventing a DOS boot-up is
easy, by just renaming /dos to something more cryptic (of course, this doesn't
account for floppy booting, but that's not the point here).  I'd like to be able
to do something similar for /xenix but also have a few "dummy" programs to
replace the originals so that if "xenix" or "dos" are entered at the boot prompt
the user will get a message to the effect that access has been disallowed.
     I tried something as simple as:

#include <stdio.h>

main()
{
	printf("***** Sorry, access not allowed *****\n");
}

but that didn't work - even with the stand-alone address set to the same value
as that used by /dos.  Is it possible for a C program to work stand-alone like
this, without having to resort to assembly (the last assembly I did was on Z80)?
Do I need to use different I/O routines (maybe something a little lower-level)?
     Please respond by e-mail.  If there is enough interest, I will post a
summary.  Thanks.

-- 
Robert Barrell      | ...!cbmvax!gvlv2!lock60!rdb1!root | Cody Computer Services
Milo's Meadow BBS   |        root@rdb1.canal.org        | 55 East High Street
login: nuucp or bbs |-----------------------------------| Pottstown, PA   19464
(215) 323-0497      | Business and Police Dept Software | (215) 326-7476