From 64104e14e4026658551e7283498eafbe3855e6d5 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sun, 20 Mar 2005 18:03:31 +0000 Subject: #1560 fix opie-console picking up the wrong shell. patch courtesy Paul Eggleton (bluelightning) --- diff --git a/ChangeLog b/ChangeLog index 4722f9b..1c4cfe4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,7 @@ * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) * #1558 - Fixed opie-login breaking opie startup (mickeyl) + * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) * #1604 - Checkbook crashed on startup (drw) diff --git a/noncore/apps/opie-console/consoleconfigwidget.cpp b/noncore/apps/opie-console/consoleconfigwidget.cpp index a6ad8d2..27d9a3f 100644 --- a/noncore/apps/opie-console/consoleconfigwidget.cpp +++ b/noncore/apps/opie-console/consoleconfigwidget.cpp @@ -8,7 +8,7 @@ #include #include - +#include #include "consoleconfigwidget.h" @@ -71,12 +71,12 @@ void ConsoleConfigWidget::load( const Profile& prof ) { */ struct passwd *ent = 0; char *shell = "/bin/sh"; + int uid = getuid(); - while ( (ent = getpwent()) != 0 ) { + ent = getpwuid(uid); if (ent->pw_shell != "") { shell = ent->pw_shell; } - } m_cmd->setText(prof.readEntry("Command", shell )); int envcount = prof.readNumEntry("EnvVars", 0); -- cgit v0.9.0.2