[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] adding tests....



Daniel Berrange <berrange redhat com> wrote:

> On Mon, Jan 12, 2009 at 01:28:41PM +0100, Jim Meyering wrote:
>> "Daniel P. Berrange" <berrange redhat com> wrote:
>> >> +    if (remote_config_file == NULL) {
>> >> +	static const char *default_config_file
>> >> +	  = SYSCONF_DIR "/libvirt/libvirtd.conf";
>> >> +	remote_config_file =
>> >> +	  (access(default_config_file, X_OK) == 0
>> >> +	   ? default_config_file
>> >> +	   : "/dev/null");
>> >> +    }
>
> That should be R_OK, not X_OK - the config files aren't
> marked executable, so this will never load the config.

Right you are.
I've just committed this:

>From 76eb37b44dd3e51e6ab5304c4e57c10be1ff53a5 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Tue, 13 Jan 2009 13:20:54 +0100
Subject: [PATCH] qemud.c: fix error in yesterday's change: s/X_OK/R_OK/

* qemud/qemud.c (main): Fix error s/X_OK/R_OK/ reported by
Daniel Berrange.
---
 qemud/qemud.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemud/qemud.c b/qemud/qemud.c
index 336f0a9..6a2db78 100644
--- a/qemud/qemud.c
+++ b/qemud/qemud.c
@@ -2371,7 +2371,7 @@ int main(int argc, char **argv) {
         static const char *default_config_file
             = SYSCONF_DIR "/libvirt/libvirtd.conf";
         remote_config_file =
-            (access(default_config_file, X_OK) == 0
+            (access(default_config_file, R_OK) == 0
              ? default_config_file
              : "/dev/null");
     }
--
1.6.1.155.g1b01da


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]