Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 451454
Collapse All | Expand All

(-)kdelibs-4.9.5.org/kdecore/auth/kauthhelpersupport.cpp (+21 lines)
Lines 22-27 Link Here
22
22
23
#include <cstdlib>
23
#include <cstdlib>
24
#include <syslog.h>
24
#include <syslog.h>
25
#include <unistd.h>
26
#include <sys/types.h>
27
#include <pwd.h>
25
28
26
#include <QCoreApplication>
29
#include <QCoreApplication>
27
#include <QTimer>
30
#include <QTimer>
Lines 40-47 Link Here
40
43
41
static bool remote_dbg = false;
44
static bool remote_dbg = false;
42
45
46
static int fixEnviroment(int argc, char **argv)
47
{
48
    //try correct HOME
49
    char *home = "HOME";
50
    if(getenv(home)==NULL)
51
    {
52
	struct passwd *pw = getpwuid(getuid());
53
	int overwrite = 0;
54
55
	if(pw!=NULL)
56
	    setenv(home, pw->pw_dir, overwrite);
57
    }
58
59
    return 0;
60
}
61
43
int HelperSupport::helperMain(int argc, char **argv, const char *id, QObject *responder)
62
int HelperSupport::helperMain(int argc, char **argv, const char *id, QObject *responder)
44
{
63
{
64
    fixEnviroment(argc, argv);
65
45
    openlog(id, 0, LOG_USER);
66
    openlog(id, 0, LOG_USER);
46
    qInstallMsgHandler(&HelperSupport::helperDebugHandler);
67
    qInstallMsgHandler(&HelperSupport::helperDebugHandler);
47
68

Return to bug 451454