Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Feb 1999 12:29:07 -0600 (CST)
From:      Robert Wall <rsw@vsat.net>
To:        security@FreeBSD.ORG
Subject:   Perl and file locking
Message-ID:  <Pine.BSF.3.96.990203122205.27616A-100000@bridge.millstream.net>

next in thread | raw e-mail | index | archive | help
I noticed something interesting the other day - I'm writing a perl script
to add users to my master.passwd file, and I'm attempting to use exclusive
locks (flock filename, 2).  During my test run of the script, another
program was accessing the file.  My program paused and stuck until it
could get the exclusive lock for the file (~20 seconds), then finished
executing normally.  Is this a bug, a feature, or just general weirdness?
More importantly - can this behavior be counted upon, and are there any
known security risks to processes that are suid root being queued up
waiting for a file to become available?

I'd appreciate any advice you might have.

---------------------------------------
Robert Wall              (rsw@vsat.net)
Systems Technician
Intellicom, Inc.
http://www.vsat.net/

v.  (715) 720-1760
f.  (715) 720-1762
---------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990203122205.27616A-100000>