Re: Locking Devices on the SUN IPC
Posted in 1993
Topics: Security, Permissions & Auditing
In article 28783@dssmktg.com, rob@dssmktg.com (Rob Minter) writes:
> I,ve tried posting in comp.unix to no avail.
comp.unix.sun may be better (see .sig :-)
> We are trying to lock devices on a SUN IPC running under 4.1.3 OS level,
IPC on 4.1.2 here
> and keep getting errors of 2,6, and 13.
> No such file
Which gets you this ? I couldn't on any file. Sure it's not a typo ?
> No such device
skyline# cat /dev/rsd9a
cat: /dev/rsd9a: No such device or address
if it really isn't there.
> permission denied
playpen 5171> cat /dev/rsd0a
cat: /dev/rsd0a: Permission denied
since the disk is
playpen 5173> ls -lg /dev/rsd0a
crw-r----- 1 root operator 17, 0 Jan 18 11:20 /dev/rsd0a
as G*d intended.
> ... C fcntl code deleted ...
> Somehow error keeps getting set to one of those values indicated above.
> If anyone can help - Thanks, in advance.
Unfortunately, there's a bug logged against fcntl (and indirectly, flock(2),
I suspect), 1055536. This says that you'll get EINVAL "Invalid argument"
if you try to lock a special device in > 4.0.3. Integrated in 5.2.
I see the EINVAL if I fcntl something that *is* there and *is* r/w (/dev/rfd0c).
Since you're not getting EINVAL, looks like perms probs. However, if you
really have to do this, prod your Sun support for a patch and consider
using semaphores/shared memory/<add your own ipc here> meantime.
> Robert Minter Data Systems Support
> Programmer, Software Development Orange, CA
> internet: rob@dssmktg.com Tel: 714.771.0454
> bangpath: uunet.uu.net!dssmktg!rob Fax: 714.771.3028
Hope you don't mind me posting, just occurred to me that others may be trying
to do this. Good flames CC by email, please, case I miss 'em ...
Disclaimer: "It wasn't me, it was the squirrels"
Cheers !
Tony.Heskett@sun.co.uk Direct: (+44) 276 416490, (+44) 831 546576
Hotline: (+44) 276 691974 Recep'n: (+44) 276 20444 x490 Fax: (+44) 276 416655