This one needs some more work - The issue is that in Trash.c, CheckDeletePermission(), a call is made to a (stupidly named) function called FileSysType(). This accepts an integer corresponding to statbuf.st_dev

However, FileSysType() calls statfs (with your changes) with this argument as the first argument (which must be a char *path) - so we get an integer to pointer conversion warning.

In reality, CheckDeletePermission() is the only function that calls this FileSysType().

CheckDeletePermission() can almost certainly be refactored to eliminate this. For example, the code involved seems to be all about detecting whether root can delete a file on an NFS mounted FS.

I will work on this one locally, and improve it somewhat with follow on patch(es) before merging to master.

-jon

On 08/21/2018 02:17 PM, David Cantrell wrote:
On 08/21/2018 03:55 PM, David Cantrell wrote:
This is now a compile time failure on systems with glibc-2.28 as they
have removed ustat(2) from the library.  The replacement for a while has
been statfs(2), so this patch does that for dtfile which is the only
program I found that uses that.

Also, this patch could be refactored or just have a different style.
Not sure what the project is aiming for here, but let me know if you
want things altered.

Thanks,


Whoops, forgot to include sys/vfs.h in Trash.c.  Here's revision 2 of
the patch.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


--
Jon Trulson

"Fire all weapons and open a hailing frequency for my victory yodle."

                              - Zapp Brannigan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to