bugweb-cyradm - Bugs: bug #13964, Changing password for superuser...

 
 

bug #13964: Changing password for superuser would remove its entry from domainadmin table.

Submitted by:  None
Submitted on:  Fri 29 Jul 2005 05:07:12 AM UTC  
 
Category: mainSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: DuplicatePrivacy: Public
Assigned to: Lukasz Marciniak <landm>Originator Name: Yen-Wei Liu
Originator Email: -unavailable-Open/Closed: Closed
Release: 0.5.4Operating System: None
Reproducibility: Every TimePlanned Release: 0.5.5
Cyrus IMAP version: 2.2.xPHP version: 4.3
Database type: MySQL 4.0

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 01 Aug 2007 03:08:15 PM UTC, comment #5:

It's already done at line 192:
190: if ($type != $_POST['newtype'] || $type = '1') {
191: # First delete and set new Domainresponsibilities
192: $query = "DELETE FROM domainadmin WHERE adminuser='".$_POST['username']."'";
193: $result = $handle->query($query);
194: if (DB::isError($result)) {
195: die (_("Database error"));
196: }
197: }

Lukasz Marciniak <landm>
Project MemberIn charge of this item.
Wed 01 Aug 2007 02:09:22 PM UTC, comment #4:

perhaps you should as well fix this when converting a superuser to a normal admin?

Suggestion: add at Line 282 of editadminuser...

# remove domainadmin Entry
$query="DELETE FROM domainadmin WHERE adminuser='$username' and domain_name='*'";
$result=$handle1->query($query);

Anonymous
Tue 13 Dec 2005 08:13:22 PM UTC, comment #3:

i guess it would be cleaner to have an asterisk-entry in the domaintable as the the database-creation-script does. here my patch-suggestion:

--- editadminuser.php.orig 2005-12-13 21:07:39.939586562 +0100
+++ editadminuser.php 2005-12-13 21:08:33.197176731 +0100
@@ -282,11 +282,15 @@
if ($newtype==0){

# If the new type of admin will be superuser, we also need to delete the domain
- # Responsibilities, because a superuser is always responsible for all domains
+ # Responsibilities, because a superuser is always responsible for all domains...
$query = "DELETE FROM domainadmin WHERE adminuser='$username'";
$result = $handle1->query($query);

- # And update the type of this admin
+ # ...and update it's permission to administrate all domains
+ $query = "INSERT INTO domainadmin VALUES('*', '$username')";
+ $result = $handle1->query($query);
+
+ # as well as update the type of this admin
$query="UPDATE adminuser SET type='$newtype' WHERE username='$username'";
$result=$handle1->query($query);
}

cheers
romanDOThochuliATnexellentDOTch

Anonymous
Sat 20 Aug 2005 05:53:29 AM UTC, comment #2:

Hello,

I have done a quick fix to this problem. In editadminuser.php on line around 286,


# If the new type of admin will be superuser, we also need to delete the domain
# Responsibilities, because a superuser is always responsible for all domains
$query = "DELETE FROM domainadmin WHERE adminuser='$username'";
$result = $handle1->query($query);
---

Add two lines below this fragment of code above :

---
$query="INSERT INTO domainadmin (domain_name,adminuser) VALUES('', '$username')";
$result = $handle1->query($query);
---

It's true that admin user doesn't have to have any domain names, but the empty entry still needs to be present in the table, or everything would become chaotic.

Anonymous
Fri 29 Jul 2005 05:12:27 AM UTC, comment #1:

I forgot to say this happens on 0.5.4-1.

Anonymous
Fri 29 Jul 2005 05:07:12 AM UTC, original submission:

After changing the superuser ("admin") password, I logged out. Then I couldn't log in. I kept get "Security Violation" error. Then I found out this entry ("*","admin") was removed from the domainadmin table so login failed. This is a bug.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by landm (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 30 Jul 2006 10:40:54 AM UTClandmStatusNone=>Duplicate
      Assigned toNone=>landm
      Open/ClosedOpen=>Closed
      ReleaseNone=>0.5.4
      Planned ReleaseNone=>0.5.5
      Dependencies-=>Depends on bugs #12519
    Fri 29 Jul 2005 05:07:13 AM UTCNoneCarbon-Copy-=>Added ywliu --AT-- hotmail --DOT-- com

    Back to the top


    Powered by Savane 3.1-cleanup1