From 1651fcb54a3690cb973fdadbda8e8130da1e351c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sat, 18 Oct 2014 14:07:17 +0200 Subject: Fix conditionnal utmpx support in tdm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François Andriot " --- tdm/kfrontend/kgreeter.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tdm/kfrontend') diff --git a/tdm/kfrontend/kgreeter.cpp b/tdm/kfrontend/kgreeter.cpp index 5ff8d5516..cb38599c1 100644 --- a/tdm/kfrontend/kgreeter.cpp +++ b/tdm/kfrontend/kgreeter.cpp @@ -71,7 +71,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include #include #include +#ifdef HAVE_UTMPX #include +#endif #include #include -- cgit v1.2.1 From d246c7d9388e0ca16db9f6c17f438761022f4515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 18 Oct 2014 14:10:43 +0200 Subject: Fix tdm_greet crash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- tdm/kfrontend/kgreeter.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tdm/kfrontend') diff --git a/tdm/kfrontend/kgreeter.cpp b/tdm/kfrontend/kgreeter.cpp index cb38599c1..e6073da50 100644 --- a/tdm/kfrontend/kgreeter.cpp +++ b/tdm/kfrontend/kgreeter.cpp @@ -1296,13 +1296,14 @@ void ControlPipeHandlerObject::run(void) { umask(0); struct stat buffer; int status; - char *fifo_parent_dir = strdup(FIFO_DIR); - dirname(fifo_parent_dir); + char *fifo_parent_dir; + char *fifo_dir = strdup(FIFO_DIR); + fifo_parent_dir = dirname(fifo_dir); status = stat(fifo_parent_dir, &buffer); if (status != 0) { - mkdir(fifo_parent_dir, 0644); + mkdir(fifo_parent_dir, 0755); } - free(fifo_parent_dir); + free(fifo_dir); status = stat(FIFO_DIR, &buffer); if (status == 0) { int file_mode = ((buffer.st_mode & S_IRWXU) >> 6) * 100; @@ -1315,7 +1316,7 @@ void ControlPipeHandlerObject::run(void) { return; } } - mkdir(FIFO_DIR,0600); + mkdir(FIFO_DIR,0700); mknod(mPipeFilename.ascii(), S_IFIFO|0600, 0); chmod(mPipeFilename.ascii(), 0600); -- cgit v1.2.1 From 107220694fe3387df4051dcd94ae6c9995cb45f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 18 Oct 2014 14:19:37 +0200 Subject: Allow contitional build with tdehwlib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- tdm/kfrontend/kgapp.cpp | 4 ++++ tdm/kfrontend/kgapp.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'tdm/kfrontend') diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp index f172521bc..2d630485e 100644 --- a/tdm/kfrontend/kgapp.cpp +++ b/tdm/kfrontend/kgapp.cpp @@ -123,11 +123,14 @@ void GreeterApp::init() startTimer( pingInterval * 60000 ); } +#ifdef __TDE_HAVE_TDEHWLIB TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*))); +#endif } void GreeterApp::deviceChanged(TDEGenericDevice* device) { +#ifdef __TDE_HAVE_TDEHWLIB #ifdef WITH_XRANDR if (device->type() == TDEGenericDeviceType::Monitor) { KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI(); @@ -135,6 +138,7 @@ void GreeterApp::deviceChanged(TDEGenericDevice* device) { delete randrsimple; } #endif // WITH_XRANDR +#endif // __TDE_HAVE_TDEHWLIB } void diff --git a/tdm/kfrontend/kgapp.h b/tdm/kfrontend/kgapp.h index 6150b4f5d..c9e2802c1 100644 --- a/tdm/kfrontend/kgapp.h +++ b/tdm/kfrontend/kgapp.h @@ -27,7 +27,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #define KGAPP_H #include +#ifdef __TDE_HAVE_TDEHWLIB #include +#else +#define TDEGenericDevice void +#endif class GreeterApp : public TDEApplication { Q_OBJECT -- cgit v1.2.1