[Rt-devel] Bug: rt2tort3 deletes root user but doesn't clean up

Dominic Hargreaves dominic.hargreaves at oucs.ox.ac.uk
Tue Jan 26 07:04:35 EST 2010


When doing the initial import into an rt3 database, dumpfile-to-rt3.0
deletes the root user:

            $RT::Handle->SimpleQuery("DELETE FROM Users where Name='root'");

however this leaves behind associated Group and ACL objects.

rt-oucs=> SELECT * from acl where id=3;
 id | principaltype | principalid | rightname | objecttype | objectid | delegatedby | delegatedfrom 
----+---------------+-------------+-----------+------------+----------+-------------+---------------
  3 | Group         |          13 | SuperUser | RT::System |        1 |           0 |             0
(1 row)

rt-oucs=> SELECT * from groups where id=13;
 id |  name   |      description       |     domain     |   type    | instance 
----+---------+------------------------+----------------+-----------+----------
 13 | User 12 | ACL equiv. for user 12 | ACLEquivalence | UserEquiv |       12
(1 row)

rt-oucs=> SELECT name from users where id=12;
 name 
------
(0 rows)

rt-oucs=> SELECT name,description,type from groupmembers inner join groups on (groupmembers.groupid = groups.id) where memberid=12;
  name   |         description          |    type    
---------+------------------------------+------------
 User 12 | ACL equiv. for user 12       | UserEquiv
         | Pseudogroup for internal use | Everyone
         | Pseudogroup for internal use | Privileged
(3 rows)

and maybe other things?

This should probably be done more cleanly in the code.
For now I've just deleted the ACE manually; I guess the other bits 
should be cleaned up too.

-- 
Dominic Hargreaves, Systems Development and Support Team
Computing Services, University of Oxford
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20100126/614347ff/attachment.pgp 


More information about the Rt-devel mailing list