From owner-freebsd-security Wed Feb 3 10:26:32 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA25224 for freebsd-security-outgoing; Wed, 3 Feb 1999 10:26:32 -0800 (PST) (envelope-from owner-freebsd-security@FreeBSD.ORG) Received: from bridge.millstream.net (bridge.millstream.net [208.12.120.194]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA25211 for ; Wed, 3 Feb 1999 10:26:21 -0800 (PST) (envelope-from rsw@vsat.net) Received: from localhost (rsw@localhost) by bridge.millstream.net (8.8.8/8.8.8) with SMTP id SAA28640 for ; Wed, 3 Feb 1999 18:29:07 GMT (envelope-from rsw@vsat.net) X-Authentication-Warning: bridge.millstream.net: rsw owned process doing -bs Date: Wed, 3 Feb 1999 12:29:07 -0600 (CST) From: Robert Wall X-Sender: rsw@bridge.millstream.net To: security@FreeBSD.ORG Subject: Perl and file locking Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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