Re: today's bugtraq flock issue

From: Crist J. Clark (crist.clark@attbi.com)
Date: 07/19/02


Date: Thu, 18 Jul 2002 16:01:03 -0700
From: "Crist J. Clark" <crist.clark@attbi.com>
To: Mark Hittinger <bugs@pu.net>

On Thu, Jul 18, 2002 at 01:15:52PM -0500, Mark Hittinger wrote:
>
> Just saw the flock issue on bugtraq. This probably needs some discussion.
>
> Should file locking only be permitted on files that are either owned by the
> caller or are writeable to the caller?

Locks are permitted if you can _read_ the file.

  # chmod 660 /etc/dumpdates

Will "fix" dump(8).

Not sure where tip(1) might block up if aculog is locked. It doesn't
appear to lock it. aculog is just a log file. I don't see a reason to
block on opening it. Just change that.

-- 
Crist J. Clark                     |     cjclark@alum.mit.edu
                                   |     cjclark@jhu.edu
http://people.freebsd.org/~cjc/    |     cjc@freebsd.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message


Relevant Pages

  • Re: [PATCH] RUSAGE_THREAD
    ... use any locks, but without any lock at all it is fundamentally broken. ... I think the following philosphy is adequate for reading times: ... the past by the time that it gets back to the caller. ... update memory copy of the time, so that it is not in the past ...
    (freebsd-hackers)
  • Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate
    ... and GFP_NOFS allocations, which is a bug. ... Because if the caller holds ... locks which prevent filesystem or IO progress, ...
    (Linux-Kernel)
  • Re: [PATCH] memory ordering in __kfifo primitives
    ... requiring the caller hold appropriate locks across calls to ... If someone wants to use explicit locking, ... which cannot be used by the caller to protect other code surrounding ...
    (Linux-Kernel)
  • Re: Do you do?
    ... Does the caller have a safe, vault, ... padlock, bicycle lock, keyless car entry, gunsafe, ... Does the caller want me to find another lock with the same ... want to know if I do car locks. ...
    (alt.home.repair)