[comp.sys.att] permissions on swap

todd@ivucsb.sba.ca.us (Todd Day) (06/14/89)

Here are the permissions on my swapspace device:

brw-r--r--  1 sys     sys       0,  1 Jan  1  1970 /dev/swap

I think this is a security hole... what do you think?  Must it
be world readable?

Also, even though my swap space HAS been used, why is the last
update date big-bang (unix time)?
-- 

Todd Day | todd@ivucsb.sba.ca.us | ivucsb!todd@anise.acc.com
"All theory, no practice.  That's the story of my life."

jbm@uncle.UUCP (John B. Milton) (06/17/89)

In article <1989Jun14.042038.432@ivucsb.sba.ca.us> todd@ivucsb.UUCP (Todd Day) writes:
>Here are the permissions on my swapspace device:
>brw-r--r--  1 sys     sys       0,  1 Jan  1  1970 /dev/swap
>I think this is a security hole... what do you think?  Must it
>be world readable?
Yes, it is a hole, no it nee$ not be readable

>Also, even though my swap space HAS been used, why is the last
>update date big-bang (unix time)?

The kernel does not open the swap partition from "far-enough-out" for the
access times to be changed. You would have to know about some of the internal
routines in the kernel and how the kernel uses them directly to understand.
I suggest the Bach book.

John
-- 
John Bly Milton IV, jbm@uncle.UUCP, n8emr!uncle!jbm@osu-cis.cis.ohio-state.edu
(614) h:294-4823, w:466-9324; N8KSN, AMPR: 44.70.0.52; Don't FLAME, inform!

wjc@ho5cad.ATT.COM (Bill Carpenter) (07/22/89)

In article <559@uncle.UUCP> jbm@uncle.UUCP (John B. Milton) writes:

> >brw-r--r--  1 sys     sys       0,  1 Jan  1  1970 /dev/swap

> Yes, it is a hole, no it nee$ not be readable

I'm sure what JBM meant was that it need not be world readable.  Some
folks reading this may not be aware that the "ps" command needs to
read /dev/swap on many occasions and runs setGid "sys" on the UNIXpc.

A perm of 640 would be okay, for example, but not 600.
--
   Bill Carpenter         att!ho5cad!wjc  or  attmail!bill