READ ONLY FORUM: m23 :: makes software distribution easy Forum Index READ ONLY FORUM: m23 :: makes software distribution easy
The m23 discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ASSI_addClient does not define password var

 
Post new topic   Reply to topic    READ ONLY FORUM: m23 :: makes software distribution easy Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
TheGuv



Joined: 29 Oct 2010
Posts: 11

PostPosted: Wed Nov 17, 2010 9:20    Post subject: ASSI_addClient does not define password var Reply with quote

I discovered that function ASSI_addClient (in assimilate.php) does not define $data['password'] which is defined in CLIENT_addClient (client.php) as being populated.

The following patch will correct this on 10.5:

Code:

--- assimilate.php.bak   2010-11-09 10:56:53.000000000 +0000
+++ assimilate.php   2010-11-17 10:32:48.000000000 +0000
@@ -56,6 +56,7 @@
    $data['client'] = $client;
    $data['ip'] = $ip;
    $data['newgroup'] = "default";
+        $data['rootpassword'] = $password;
 
    $err = CLIENT_addClient($data,"",CLIENT_ADD_TYPE_assimilate,false);


EDIT: fixup to use the correct key for $data.
--
TheGuv


Last edited by TheGuv on Wed Nov 17, 2010 13:20; edited 2 times in total
Back to top
View user's profile Send private message
Hauke



Joined: 02 Mar 2003
Posts: 1072

PostPosted: Wed Nov 17, 2010 11:32    Post subject: Reply with quote

Hi,

I would be surprised, if it works, because "password" is no key of the $data array. Shocked

Did you try it?

But
Code:
$data['rootpassword'] = $password;

should do it.

Can you try this and check?
_________________
Hauke Goos-Habermann
- project leader m23 (http://m23.sf.net) -
Jabber: dodgerm23@jabber.org

Schulung, Entwicklung und Support zu m23 und anderen OpenSource-Produkten: www.goos-habermann.de

Auch DU kannst etwas gegen Softwarepatente tun! www.patentfrei.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TheGuv



Joined: 29 Oct 2010
Posts: 11

PostPosted: Wed Nov 17, 2010 13:17    Post subject: Reply with quote

Hauke wrote:
Hi,

I would be surprised, if it works, because "password" is no key of the $data array. Shocked

Did you try it?



Yes I tried it and it works, but for the wrong reason!

In my other patch (whcih is what this one was to support) I added function CLIENT_addSvrEtcHosts() like this:

CLIENT_addSvrEtcHosts($data['ip'], $data['password'], $_SERVER[SERVER_NAME],

Of course it would work, as both patches use $data['password'] instead of $data['rootpassword']

I'll fix that up - thanks for spotting.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    READ ONLY FORUM: m23 :: makes software distribution easy Forum Index -> Bugs All times are GMT - 2 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group