From 4aa326251d797d12e5228a7a1ea6d45518e64ba5 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Thu, 10 Oct 2002 19:56:29 +0000 Subject: bastard standard login shell --- diff --git a/core/apps/embeddedkonsole/MyPty.cpp b/core/apps/embeddedkonsole/MyPty.cpp index 6421ab0..9adc248 100644 --- a/core/apps/embeddedkonsole/MyPty.cpp +++ b/core/apps/embeddedkonsole/MyPty.cpp @@ -64,6 +64,7 @@ */ +#include #include #include #include @@ -169,8 +170,10 @@ int MyPty::run(const char* cmd, QStrList &, const char*, int) char msg[] = "WARNING: You are running this shell as root!\n"; write(ttyfd, msg, sizeof(msg)); } -; //creates a login shell - execl(cmd, cmd, "--login", 0); + + QString ccmd = "-"+QFileInfo(cmd).fileName(); //creates a login shell + + execl(cmd, ccmd.latin1(), 0); donePty(); exit(-1); -- cgit v0.9.0.2