Bug 477301 - Please compile gdbm with fcntl instead of flock usage to make nfs safe.
Summary: Please compile gdbm with fcntl instead of flock usage to make nfs safe.
Keywords:
Status: CLOSED DUPLICATE of bug 477300
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gdbm
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Honza Horak
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-20 06:11 UTC by Tim Connors
Modified: 2011-01-19 14:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-19 14:18:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tim Connors 2008-12-20 06:11:22 UTC
Description of problem:

gdbm can't lock the database when on a nfs client, because it uses by default flock() which fails on nfs, instead of fcntl(), which works.  Other distributions like debian compile libgdbm with #undef HAVE_FLOCK:
http://jasonday.home.att.net/code/backup/README.NFS
(NOTE:  DO NOT TURN OFF LOCKING, NO MATTER HOW TEMPTING IT LOOKS!)

This means that for example /usr/bin/vacation does not work for nfs hosted home directories.  Yes, vacation can be told to use another database pathname, but in our case, the mailserver is a machine that people don't have access to, and so they can't initialise the database unless it is in their home directory, which is of course nfs mounted.

Version-Release number of selected component (if applicable):
1.8.0-24

How reproducible:


Steps to Reproduce:
1. compile /usr/bin/vacation, linking to redhat's gdbm
2. set up a test account's .forward: test, "|/usr/bin/vacation test"
3. Send a mail to test account.

 
Actual results:

look in the mail server's logfile for entries like:
Dec 20 16:10:53 aaocbn vacation[6630]: vacation: .vacation: No locks available 
Dec 20 16:10:53 aaocbn sendmail[6621]: mBK5Arlu006621: to="|/usr/bin/vacation test", ctladdr=<test@domain> (582/15), delay=00:00:00,xdelay=00:00:00, mailer=prog, pri=62265, dsn=5.6.0, stat=Data format error

Expected results:

mail delivered normally because vacation was able to use gdbm, which worked because it was able to make lockfiles on the nfs hosted home directory.

Additional info:

Also affects redhat enterprise 5.

Comment 1 RHEL Program Management 2011-01-19 13:48:44 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 2 Ondrej Vasik 2011-01-19 14:04:03 UTC
Moving to RHEL-5 - now it is too late for RHEL-4 which now adresses only critical and security fixes.
Additionally, could you please contact Red Hat Product Support directly? Bugzilla is just bug tracking tool and RHEL updates are based on customer requests tracked by support team - so direct contact to support will increase chances of having this (and any bugfix) fixed in RHEL-5.

Comment 3 Honza Horak 2011-01-19 14:18:02 UTC

*** This bug has been marked as a duplicate of bug 477300 ***


Note You need to log in before you can comment on or make changes to this bug.