Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#440 closed Defect (fixed)

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

Reported by: fthomas Owned by: 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 (1)

use_uid_if_user_name_is_empty.patch (800 bytes) - added by fthomas 17 years ago.

Download all attachments as: .zip

Change History (6)

Changed 17 years ago by fthomas

comment:1 Changed 17 years ago 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.

comment:2 Changed 17 years ago by Nicolas

Keywords: patch added

comment:3 Changed 17 years ago by romw

Go ahead and check it in Frank.

Looks good to me.

:)

comment:4 Changed 17 years ago by fthomas

Resolution: fixed
Status: newclosed

(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)

comment:5 Changed 17 years ago 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

Note: See TracTickets for help on using tickets.