There's apparently some shenanigans in access so it may not actually
check anything for X_OK.
if(!udevadm_path)
{
+ struct stat st;
udevadm_path = "/bin/udevadm";
- if(access(udevadm_path, X_OK)<0)
+ if(stat(udevadm_path, &st)<0 || !(st.st_mode&0111))
{
udevadm_path = "/sbin/udevadm";
- if(access(udevadm_path, X_OK)<0)
+ if(stat(udevadm_path, &st)<0 || !(st.st_mode&0111))
{
udevadm_path = NULL;
perror("Unable to find udevadm");