Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jul 2001 16:16:07 +0100 (BST)
From:      ian j hart <ianjhart@freeloader.freeserve.co.uk>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/29302: p5-IMAP-Admin get_acl returns no data
Message-ID:  <200107291516.f6TFG7N01201@alpha.private>

next in thread | raw e-mail | index | archive | help

>Number:         29302
>Category:       ports
>Synopsis:       p5-IMAP-Admin get_acl returns no data
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 29 08:30:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     ian j hart
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD alpha.private 4.3-STABLE FreeBSD 4.3-STABLE #7: Tue Jul 24 21:34:59 BST 2001 ianjhart@alpha.private:/usr/obj/usr/src/sys/ALPHA i386


	
>Description:

	Calling get_acl results in "Use of uninitialised value" error.
>How-To-Repeat:

	Apply IO::Socket::INET patch as per pr29161

	#! /usr/bin/perl -w
	
	use IMAP::Admin;
	
	$imap = IMAP::Admin->new('Server' => 'localhost',
			'Login' => 'cyradm',
			'Password' => 'editmefirst',
			);
	
	$who = "user.testimapadmingetacl";
	
	$err = $imap->create($who);
	if($err != 0) {print "$imap->{'Error'}";}
	
	@acl = $imap->get_acl($who);
	
	print "$acl[0] $acl[1]\n";
		
	$err = $imap->set_acl($who, "cyradm", "lrswipcda");
	if($err != 0) {print "$imap->{'Error'}";}
	
	$imap->delete($who);
	if($err != 0) {print "$imap->{'Error'}";}
	
	$imap->close;

>Fix:

	De-obfuscate the code. Note this includes the aforementioned pr29161 patch
	
	*** Admin.pm.orig	Sun Jul 29 15:22:18 2001
	--- Admin.pm	Sun Jul 29 14:50:27 2001
	***************
	*** 6,12 ****
	  use Carp;
	  use IO::Select;
	  use IO::Socket;
	! use IO::Socket::INET;
	  use Text::ParseWords qw(parse_line);
	  use Cwd;
	  
	--- 6,12 ----
	  use Carp;
	  use IO::Select;
	  use IO::Socket;
	! #use IO::Socket::INET;
	  use Text::ParseWords qw(parse_line);
	  use Cwd;
	  
	***************
	*** 463,469 ****
	      print $fh qq{try GETACL "$mailbox"\n};
	      delete $self->{'acl'};
	      my $try = $self->_read;
	!     while ($try =~ /^\* ACL\s+(?:\".*?\"|.*?)\s+((\".*?\"|.*?)(?:\s)(?{ push @{$self->{'acl'}}, $2; }))+(\w+)(?{ push @{$self->{'acl'}}, $3; })$/) {
	  	$try = $self->_read;
	      }
	      if ($try =~ /^try OK/) {
	--- 463,471 ----
	      print $fh qq{try GETACL "$mailbox"\n};
	      delete $self->{'acl'};
	      my $try = $self->_read;
	!     while ($try =~ /^\* ACL\s+(?:\".*?\"|.*?)\s+((\".*?\"|.*?)(?:\s))+(\w+)$/) {
	! 	push (@{$self->{'acl'}}, $2);
	! 	push (@{$self->{'acl'}}, $3);
	  	$try = $self->_read;
	      }
	      if ($try =~ /^try OK/) {
	
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107291516.f6TFG7N01201>