Ticket #440 (closed Defect: fixed)

Opened 9 months ago

Last modified 9 months ago

BM on Unix: fails to create new account if fifth field in /etc/passwd is empty

Reported by: fthomas Assigned to: romw
Priority: Minor Milestone: Undetermined
Component: Manager Version:
Keywords: patch Cc:

Description

Hi,

Please have a look at this detailed bug report http://bugs.debian.org/447320. Summary: The BOINC Manager fails to create an account under certain conditions with the error "missing or bad parameter: user_name". The cause for this is that the fifth field in /etc/passwd for the user that started the BM is empty and therefore ai->user_name in clientgui/ProjectProcessingPage.cpp:

ai->user_name = (const char*)::wxGetUserName().mb_str();

is also empty. My proposed solution is to check whether ai->user_name after the wxGetUserName() call is empty and if it is use the output of wxGetUserId() as ai->user_name. According to the wxWidgets manual this function returns the first field of /etc/passwd - the login name - on Unix. I've attached a patch against the current trunk which fixes this bug. Of course I've verified that it really fixes it.

If you want to I can check this in myself.

Thanks, Frank

Attachments

use_uid_if_user_name_is_empty.patch (0.8 kB) - added by fthomas on 10/20/07 04:43:13.

Change History

10/20/07 04:43:13 changed by fthomas

  • attachment use_uid_if_user_name_is_empty.patch added.

10/20/07 08:37:35 changed by Ageless

We've had a similar report in this BOINC forum thread, although that one was for 5.8.16 and the workaround given works.

10/20/07 17:22:06 changed by Nicolas

  • keywords set to patch.

10/23/07 12:36:21 changed by romw

Go ahead and check it in Frank.

Looks good to me.

:)

10/24/07 00:53:33 changed by fthomas

  • status changed from new to closed.
  • resolution set to fixed.

(In [13940]) MGR: Check on account creation if wxGetUserName() returned an empty string and if it did assign the output of wxGetUserId() to ai->user_name instead. (fixes #440)

10/24/07 09:35:33 changed by romw

(In [13944]) - MGR: Check on account creation if wxGetUserName() returned an empty

string and if it did assign the output of wxGetUserId() to ai->user_name instead. (fixes #440)

clientgui/

ProjectProcessingPage?.cpp


If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.