Public bug reported:

Affects: gnome-volume-manager (Ubuntu)
       Severity: Normal
       Priority: (none set)
         Status: Unconfirmed


Description:
The patch in 02_pmount_crypt.patch includes a test to test if /sbin/cryptsetup 
is executable.
It calls g_access with G_FILE_TEST_IS_EXECUTABLE as a parameter. This is wrong 
and yields an error in the final call to access, as g_access mandates that the 
mode parameter should be the same as the one used for the access call. In this 
case, X_OK --- defined to two --- whereas G_FILE_TEST_IS_EXECUTABLE is set to 8.

Doing an strace of gnome-volume-manager while attaching an encrypted usb volume 
shows:
access("/sbin/cryptsetup", 0x8 /* ?_OK */) = -1 EINVAL (Invalid argument)
And an erroe message about cryptsetup not being installed is shown to the user.

The test should be rewritten, either using X_OK as the mode parameter,
or using the function g_file_test that does accept
G_FILE_TEST_IS_EXECUTABLE as a parameter.
-- 
Incorrect test in 02_pmount_crypt.patch
https://launchpad.net/malone/bugs/37863

--
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to