Hi, all.
I will be happy to apply my small patches to main stream of the OTRS.
otrs-1.3.2-alt-kernal-shm.patch - check if kernel with openwall patch used
otrs-1.3.2-alt-queue-access.patch - add queue access right via mail
What you think about?
--
With best regards Chief of Support Department
Igor Muratov migor at altlinux dot org
--- Kernel/System/Log.pm. 2004-04-07 21:24:50 +0400
+++ Kernel/System/Log.pm 2005-01-09 20:53:53 +0300
@@ -149,11 +149,18 @@
$Self->{lc($Priority)}->{Message} = $Message;
}
# write shm cache log
+ my $shm_error;
if ($Priority !~ /^debug/i && $Self->{IPC}) {
$Priority = lc($Priority);
my $Data = localtime().";;$Priority;;$Self->{LogPrefix};;$Subroutine2;;$Line1;;$Message;;\n";
my $String = $Self->GetLog();
- shmwrite($Self->{Key}, $Data.$String, 0, $Self->{IPCSize}) || die $!;
+ shmwrite($Self->{Key}, $Data.$String, 0, $Self->{IPCSize}) || do {
+ if (not defined $shm_error) {
+ warn "shmwrite: $!";
+ warn "apparently you are running Owl kernel with enabled CONFIG_HARDEN_SHM configuration option\n";
+ $shm_error = 1;
+ }
+ };
}
return 1;
}
@@ -188,8 +195,15 @@
sub GetLog {
my $Self = shift;
my $String = '';
+ my $shm_error;
if ($Self->{IPC}) {
- shmread($Self->{Key}, $String, 0, $Self->{IPCSize}) || die "$!";
+ shmread($Self->{Key}, $String, 0, $Self->{IPCSize}) || do {
+ if (not defined $shm_error) {
+ warn "shmread: $!";
+ warn "apparently you are running Owl kernel with enabled CONFIG_HARDEN_SHM configuration option\n";
+ $shm_error = 1;
+ }
+ };
}
return $String;
}
--- Kernel/System/PostMaster/NewTicket.pm. 2005-01-09 21:12:59 +0300
+++ Kernel/System/PostMaster/NewTicket.pm 2005-01-09 21:12:26 +0300
@@ -152,6 +152,17 @@
if (!$GetParam{'X-OTRS-CustomerUser'}) {
$GetParam{'X-OTRS-CustomerUser'} = $GetParam{'SenderEmailAddress'};
}
+ # --
+ # check access to queue
+ # --
+ my %Tos = $Self->{QueueObject}->GetAllQueues(
+ CustomerUserID => $Self->{UserLogin},
+ Type => 'rw',
+ );
+ if(!exists($Tos{$QueueID})) {
+ $QueueID = 3;
+ $Queue = $Self->{QueueObject}->QueueLookup(QueueID => $QueueID);
+ }
# --
# create new ticket
# --
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev