Hi,

If ecryptfs is used on a system where /etc/mtab is a symlink to
/proc/mounts, the call to addmntent() will return an error if
uclibc is used.

Essentially the file is read-only and the addmntent() function
calls fseek() which returns an error.  glibc apparently does not
have this error.  The patch below changes ecryptfs to just ignore
errors from addmntent().  It does not affect whether the mount
was successful and there is not much that can be done with the
error except log it.

Comments?

Drew

Signed-off-by: Drew Moseley <[EMAIL PROTECTED]>
--- src/libecryptfs/main.c.orig 2007-10-25 01:35:03.000000000 -0700
+++ src/libecryptfs/main.c      2007-11-09 10:42:54.000000000 -0700
@@ -384,10 +384,8 @@
        mountent.mnt_freq = 0;
        mountent.mnt_passno = 0;
        if (addmntent(mtab_fd, &mountent)) {
-               rc = -EIO;
-               syslog(LOG_ERR, "Failed to write to the mount "
+               syslog(LOG_WARNING, "Failed to write to the mount "
                       "table\n");
-               goto out;
        }
        rc = 0;
 out:

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
eCryptfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecryptfs-devel

Reply via email to