[Bug 37863] Incorrect test in 02_pmount_crypt.patch
miguelrp at gmail.com
Mon Apr 3 13:40:33 UTC 2006
Public bug reported:
Affects: gnome-volume-manager (Ubuntu)
Priority: (none set)
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
More information about the desktop-bugs