Bug 192410 - fstab-sync deletes "/" entry in fstab on startup
fstab-sync deletes "/" entry in fstab on startup
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: hal (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
:
Depends On: 175523
Blocks: 176344 198868
  Show dependency treegraph
 
Reported: 2006-05-19 10:43 EDT by Bastien Nocera
Modified: 2013-03-05 22:45 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2007-0198
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-01 13:35:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
hal-dont-delete-slash.patch (306 bytes, patch)
2006-05-19 10:43 EDT, Bastien Nocera
no flags Details | Diff

  None (edit)
Description Bastien Nocera 2006-05-19 10:43:28 EDT
hal-0.4.2-3.EL4

Patch from Keiichi Mori <kmori@redhat.com>

After a default installation, this line from the /etc/fstab:
LABEL=/                 /                       ext3    defaults        1 2
gets removed by fstab-sync.

The while loop to parse the options is:
   978 static boolean
  979 fs_table_line_has_mount_option (FSTableLine *line, const char *option)
  980 {
...
  986   p = line->mount_options;
  987   q = p;
  988   while (*q != '\0')
  989     {
  990       while (*q != ',' && *q != '\0')
  991         q++;
  992
  993       if (strncmp (option, p, q - p) == 0)
  994         return TRUE;
  995
  996       q++;
  997       p = q;
  998     }

When the end of the options is reached, p == q, so the strncmp retval will be 0,
as an strncmp of 0 length is always 0.
Comment 1 Bastien Nocera 2006-05-19 10:43:29 EDT
Created attachment 129603 [details]
hal-dont-delete-slash.patch
Comment 2 RHEL Product and Program Management 2006-08-18 11:49:38 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 4 Bastien Nocera 2007-01-24 06:51:06 EST
Built in hal-0.4.2-6.EL4
Comment 7 Red Hat Bugzilla 2007-05-01 13:35:16 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0198.html

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