[horde] alarms - permission denied

Michael Redinger Michael.Redinger at uibk.ac.at
Tue Mar 18 08:18:35 UTC 2008


Jan Schneider schrieb:
> Zitat von Michael Redinger <Michael.Redinger at uibk.ac.at>:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>>
>>
>> Jan Schneider wrote:
>>> Zitat von Michael Redinger <Michael.Redinger at uibk.ac.at>:
>>>
>>>> ok, I tried to track this down:
>>>>
>>>> I call the alarm script eg. as root like this:
>>>>
>>>> /usr/bin/php /var/www/html/horde/admin/alarms.php
>>>>
>>>> alarms.php checks if the user has admin permissions:
>>>> if (!Auth::isAdmin()) {
>>>>     Horde::authenticationFailureRedirect();
>>>> }
>>> These lines don't exist in alarms.php.
>> Oops, sorry, at some point I got the file wrong (admin/alarms.php
>> instead of scripts/alarm.php).
>> However, the problem is real, "only" the description was wrong ... And
>> if I read the code correctly, the question stays the same:
>> How should the session be set correctly by the alarm script if called
>> from the command line?
>> Back to scripts/alarms.php:
>>
>> I tracked the problem down to kronolith/lib/api.php, function
>> _kronolith_listAlarms($time, $user = null) (same for nag):
>>
>> $current_user = Auth::getAuth();
>> if ((empty($user) || $user != $current_user) && !Auth::isAdmin()) {
>>
>> If I read the code correctly, scripts/alarms.php calls the alarm notify
>> function with the user set to null (first parameter). This function then
>> calls notify, which calls listAlarms, which calls load. Next,
>> $registry->callByPackage actually switches to the kronolith api
>> (listAlarms).
> 
> scripts/alarms.php sets the user before calling notify().

Could you please elaborate? I did not find this.
I only noted AUTH_HANDLER being defined, which is used at two places in 
the Horde library but not by kronolith and nag in api.php.

Thanks,
Michael



-- 
Michael Redinger
Zentraler Informatikdienst (Central IT Services)
Universitaet Innsbruck
Technikerstrasse 13                    Tel.: ++43 512 507 2335
6020 Innsbruck                         Fax.: ++43 512 507 949 02335
Austria                                Mail: Michael.Redinger at uibk.ac.at
BB98 D2FE 0F2C 2658 3780  3CB1 0FD7 A9D9 65C2 C11D
http://homepage.uibk.ac.at/~c102mr/mred-pubkey.asc


More information about the horde mailing list