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:
@@ -338,10 +338,10 @@ status_t
|
|||||||
Shell::_Spawn(int row, int col, const char *encoding, int argc, const char **argv)
|
Shell::_Spawn(int row, int col, const char *encoding, int argc, const char **argv)
|
||||||
{
|
{
|
||||||
const char* defaultArgs[3] = {kDefaultShell, "-l", NULL};
|
const char* defaultArgs[3] = {kDefaultShell, "-l", NULL};
|
||||||
|
struct passwd passwdStruct;
|
||||||
|
struct passwd *passwdResult;
|
||||||
|
char stringBuffer[256];
|
||||||
if (argv == NULL || argc == 0) {
|
if (argv == NULL || argc == 0) {
|
||||||
struct passwd passwdStruct;
|
|
||||||
struct passwd *passwdResult;
|
|
||||||
char stringBuffer[256];
|
|
||||||
if (!getpwuid_r(getuid(), &passwdStruct, stringBuffer,
|
if (!getpwuid_r(getuid(), &passwdStruct, stringBuffer,
|
||||||
sizeof(stringBuffer), &passwdResult)) {
|
sizeof(stringBuffer), &passwdResult)) {
|
||||||
defaultArgs[0] = passwdStruct.pw_shell;
|
defaultArgs[0] = passwdStruct.pw_shell;
|
||||||
|
|||||||
Reference in New Issue
Block a user