[Kolab-devel] Freebusy data not provided (native openSUSE)

Richard Bos ml at radoeka.nl
Sat Apr 18 16:44:12 CEST 2009


Hi Alar,

Op zaterdag 18 april 2009 12:02:01 schreef Alar Sing:
> I did some debugging on this issue
> something is wrong in class Horde_Kolab_FreeBusy_Cache_DB function  
> &singleton after $cachedb[$signature] = new $class($cache_dir); line  
> there is nothing script stops here with $class($cache_dir) being  
> Horde_Kolab_FreeBusy_Cache_DB_acl(/var/cache/freebusy)
> I looked /var/cache/freebusy has owner apache user and has correct chmod

To exclude any problem with the permissions just make the directory 777.  That 
way you know for sure that it should work.  After the correct permission or 
user settings can be determined.

I found a diff between the openSUSE version and the openpkg version of the 
file Horde/Kolab/FreeBusy/Cache.php
The diff is as follows:
# cat /var/tmp/Horde_Kolab_Freebusy_Cache.diff                                                                           
--- /usr/share/php5/PEAR/Horde/Kolab/FreeBusy/Cache.php 2009-04-10 
22:45:52.000000000 +0200                                       
+++ /var/tmp/Cache.php  2009-04-18 16:17:17.000000000 +0200                                                                       
- * $Horde: framework/Kolab_FreeBusy/lib/Horde/Kolab/FreeBusy/Cache.php,v 
1.17.2.3 2009/03/20 22:03:32 wrobel Exp $               
+ * $Horde: framework/Kolab_FreeBusy/lib/Horde/Kolab/FreeBusy/Cache.php,v 1.17 
2008/12/12 15:00:07 wrobel Exp $                   
  *                                                                                                                               
  * Copyright 2004-2008 Klarälvdalens Datakonsult AB                                                                              
  *                                                                                                                               
@@ -169,8 +169,6 @@                                                                                                               
                 if (is_a($result, 'PEAR_Error')) {                                                                               
                     return $result;                                                                                              
                 }                                                                                                                
-            } else {                                                                                                             
-                $acl = null;                                                                                                     
             }                                                                                                                    
                                                                                                                                  
             Horde::logMessage(sprintf("Horde_Kolab_FreeBusy_Cache::store(file=%s, 
relevance=%s, acl=%s, xacl=%s)",               
@@ -363,9 +361,27 @@                                                                                                              
         /* Check if the calling user has access to the extended information 
of                                                   
          * the folder we are about to integrate into the free/busy data.                                                         
          */                                                                                                                      
-        $groups = $access->user_object->getGroups();                                                                             
-        if (is_a($groups, 'PEAR_Error')) {                                                                                       
-            return $groups;                                                                                                      
+        $uid_groups = $access->user_object->getGroups();                                                                         
+        if (is_a($uid_groups, 'PEAR_Error')) {                                                                                   
+            return $uid_groups;
+        }
+
+        global $conf;
+        require_once 'Horde/Kolab/Server.php';
+        /* Connect to the Kolab user database */
+        $db = &Horde_Kolab_Server::singleton(array('uid' => $conf['kolab']
['ldap']['phpdn']));
+
+        $groups = array();
+        foreach ($uid_groups as $uid) {
+            $group = $db->fetch($uid);
+            if (is_a($groups, 'PEAR_Error')) {
+                continue;
+            }
+            $mail = $group->get(KOLAB_ATTR_MAIL);
+            if (is_a($mail, 'PEAR_Error')) {
+                continue;
+            }
+            $groups[] = $mail;
         }

         $groups[] = $access->user;

Compared to the openSUSE file, openpkg has something added to the file.  It's 
a little weird as the openpkg seems to be a little older....  I can't 
determine if the different code will have impact on the problem that we see.  
I'll sent you the openpkg version in private.  Perhaps you can test it with 
that one?

-- 
Richard




More information about the devel mailing list