[comp.unix.ultrix] Ultrix Security

bill@pslu1.psl.wisc.edu (Bill Roth) (11/01/90)

Does anybody know if there is a way to programmatically determine what
what level of security Ultrix 4 is using? I can't seem to find one.


-- 

------------------------------------------------------------------------
Bill Roth,  University of Wisconsin Physical Sciences Laboratory
email: bill@pslu1.psl.wisc.edu bill@wiscpsl.bitnet   /  (608)-873-6651

mike@electro.Berkeley.EDU (Michael Ewan) (11/01/90)

In article <1990Oct31.192812.13169@pslu1.psl.wisc.edu>, bill@pslu1.psl.wisc.edu (Bill Roth) writes:
|> 
|> Does anybody know if there is a way to programmatically determine what
|> what level of security Ultrix 4 is using? I can't seem to find one.
 

Grep for 'SECLEVEL' in the file /etc/svc.conf.  It will be one of:

SECLEVEL=BSD
SECLEVEL=UPGRADE
SECLEVEL=ENHANCED

schemers@vela.acs.oakland.edu (Roland Schemers III) (11/02/90)

In article <9426@orca.wv.tek.com> mike@electro.Berkeley.EDU (Michael Ewan) writes:
>In article <1990Oct31.192812.13169@pslu1.psl.wisc.edu>, bill@pslu1.psl.wisc.edu (Bill Roth) writes:
>|> 
>|> Does anybody know if there is a way to programmatically determine what
>|> what level of security Ultrix 4 is using? I can't seem to find one.
>
>Grep for 'SECLEVEL' in the file /etc/svc.conf.  It will be one of:


The correct way is to call getsvc.

It returns a pointer to a svcinfo structure which contains all the good
info.

Roland

-- 
Roland J. Schemers III                              Systems Programmer 
schemers@vela.acs.oakland.edu (Ultrix)              Oakland University 
schemers@argo.acs.oakland.edu (VMS)                 Rochester, MI 48309-4401
~Disclaimer::Disclaimer() { reboot(RB_HALT); }      (313)-370-4323

mamros@energy.irc.cbm.dec.com (Shawn Mamros) (11/02/90)

The getsvc(3) call returns a pointer to an svcinfo struct, which in turn
contains a struct named svcauth which contains the security level.  Here's a
sample program which uses it:

#include <sys/svcinfo.h>

main()
{
   struct svcinfo *svc;

   svc = getsvc();
   switch (svc->svcauth.seclevel) {
   case SEC_BSD:
     printf("Security level is BSD\n");
     break;
   case SEC_UPGRADE:
     printf("Security level is UPGRADE\n");
     break;
   case SEC_ENHANCED:
     printf("Security level is ENHANCED\n");
     break;
   default:
     printf("Unknown security level - check /etc/svc.conf\n");
   }
 }

-Shawn Mamros
E-mail to: mamros@crl.dec.com