From 3406e5733c1e0f7995d073684cd32ff619bdd525 Mon Sep 17 00:00:00 2001 From: Stephen Torri Date: Tue, 16 Sep 2003 02:15:39 +0000 Subject: The code that checked to see that the cdrom and dvdrom drives were usable by the user were never executed. The condition code to check the drive permissions was never false. The change here uses the access() function to check the permission of the drives. CVS patchset: 5394 CVS date: 2003/09/16 02:15:39 --- src/xine-utils/xine_check.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c index a018138f6..82e258149 100644 --- a/src/xine-utils/xine_check.c +++ b/src/xine-utils/xine_check.c @@ -214,8 +214,11 @@ xine_health_check_t* xine_health_check_cdrom (xine_health_check_t* hc) { return hc; } + if ( (access (hc->cdrom_dev, R_OK & W_OK & X_OK)) < 0) { +/* if ((cdrom_st.st_mode & S_IFMT & S_IRWXU & S_IRWXG & S_IRWXO) != (S_IRUSR & S_IXUSR & S_IRGRP & S_IXGRP & S_IROTH & S_IXOTH)) { +*/ set_hc_result (hc, XINE_HEALTH_CHECK_FAIL, "FAILED - %s permissions are not 'rwxrwxrx'\n.", hc->cdrom_dev); return hc; } @@ -243,8 +246,11 @@ xine_health_check_t* xine_health_check_dvdrom(xine_health_check_t* hc) { return hc; } + if ( (access (hc->dvd_dev, R_OK & W_OK & X_OK)) < 0) { +/* if ((dvdrom_st.st_mode & S_IFMT & S_IRWXU & S_IRWXG & S_IRWXO) != (S_IRUSR & S_IXUSR & S_IRGRP & S_IXGRP & S_IROTH & S_IXOTH)) { +*/ set_hc_result(hc, XINE_HEALTH_CHECK_FAIL, "FAILED - %s permissions are not 'rwxrwxrx'.\n", hc->dvd_dev); return hc; } -- cgit v1.2.3