Move the password structs outside of the inner block as well. Fixes #6464.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38221 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
de8a0836ac
commit
420cd21c94
@ -338,10 +338,10 @@ status_t
|
||||
Shell::_Spawn(int row, int col, const char *encoding, int argc, const char **argv)
|
||||
{
|
||||
const char* defaultArgs[3] = {kDefaultShell, "-l", NULL};
|
||||
struct passwd passwdStruct;
|
||||
struct passwd *passwdResult;
|
||||
char stringBuffer[256];
|
||||
if (argv == NULL || argc == 0) {
|
||||
struct passwd passwdStruct;
|
||||
struct passwd *passwdResult;
|
||||
char stringBuffer[256];
|
||||
if (!getpwuid_r(getuid(), &passwdStruct, stringBuffer,
|
||||
sizeof(stringBuffer), &passwdResult)) {
|
||||
defaultArgs[0] = passwdStruct.pw_shell;
|
||||
|
Loading…
Reference in New Issue
Block a user