By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 985
Collapse All | Expand All

(-)tdelibs/tdeio/tdeio/sessiondata.cpp (-2 / +2 lines)
Lines 82-95 Link Here
82
82
83
private:
83
private:
84
#ifdef Q_OS_UNIX
84
#ifdef Q_OS_UNIX
85
  KDEsuClient * m_tdesuClient;
85
  TDEsuClient * m_tdesuClient;
86
#endif
86
#endif
87
};
87
};
88
88
89
SessionData::AuthDataList::AuthDataList()
89
SessionData::AuthDataList::AuthDataList()
90
{
90
{
91
#ifdef Q_OS_UNIX
91
#ifdef Q_OS_UNIX
92
  m_tdesuClient = new KDEsuClient;
92
  m_tdesuClient = new TDEsuClient;
93
#endif
93
#endif
94
  setAutoDelete(true);
94
  setAutoDelete(true);
95
}
95
}
(-)tdelibs/tdeio/tdeio/slavebase.cpp (-1 / +1 lines)
Lines 1182-1188 Link Here
1182
{
1182
{
1183
#ifdef Q_OS_UNIX
1183
#ifdef Q_OS_UNIX
1184
    // TODO: Ping kded / kpasswdserver
1184
    // TODO: Ping kded / kpasswdserver
1185
    KDEsuClient client;
1185
    TDEsuClient client;
1186
    int success = client.ping();
1186
    int success = client.ping();
1187
    if( success == -1 )
1187
    if( success == -1 )
1188
    {
1188
    {
(-)tdelibs/tdesu/client.cpp (-25 / +25 lines)
Lines 37-43 Link Here
37
37
38
#include "client.h"
38
#include "client.h"
39
39
40
class KDEsuClient::KDEsuClientPrivate {
40
class TDEsuClient::TDEsuClientPrivate {
41
public:
41
public:
42
    TQString daemon;
42
    TQString daemon;
43
};
43
};
Lines 47-53 Link Here
47
	             + strlen ((ptr)->sun_path))
47
	             + strlen ((ptr)->sun_path))
48
#endif
48
#endif
49
49
50
KDEsuClient::KDEsuClient()
50
TDEsuClient::TDEsuClient()
51
{
51
{
52
    sockfd = -1;
52
    sockfd = -1;
53
#ifdef Q_WS_X11
53
#ifdef Q_WS_X11
Lines 65-83 Link Here
65
#endif
65
#endif
66
66
67
    sock = TQFile::encodeName(locateLocal("socket", TQString("tdesud_%1").arg(display.data())));
67
    sock = TQFile::encodeName(locateLocal("socket", TQString("tdesud_%1").arg(display.data())));
68
    d = new KDEsuClientPrivate;
68
    d = new TDEsuClientPrivate;
69
    connect();
69
    connect();
70
}
70
}
71
71
72
72
73
KDEsuClient::~KDEsuClient()
73
TDEsuClient::~TDEsuClient()
74
{
74
{
75
    delete d;
75
    delete d;
76
    if (sockfd >= 0)
76
    if (sockfd >= 0)
77
	close(sockfd);
77
	close(sockfd);
78
}
78
}
79
79
80
int KDEsuClient::connect()
80
int TDEsuClient::connect()
81
{
81
{
82
    if (sockfd >= 0)
82
    if (sockfd >= 0)
83
	close(sockfd);
83
	close(sockfd);
Lines 165-171 Link Here
165
    return 0;
165
    return 0;
166
}
166
}
167
167
168
TQCString KDEsuClient::escape(const TQCString &str)
168
TQCString TDEsuClient::escape(const TQCString &str)
169
{
169
{
170
    TQCString copy = str;
170
    TQCString copy = str;
171
    int n = 0;
171
    int n = 0;
Lines 185-191 Link Here
185
    return copy;
185
    return copy;
186
}
186
}
187
187
188
int KDEsuClient::command(const TQCString &cmd, TQCString *result)
188
int TDEsuClient::command(const TQCString &cmd, TQCString *result)
189
{
189
{
190
    if (sockfd < 0)
190
    if (sockfd < 0)
191
	return -1;
191
	return -1;
Lines 211-217 Link Here
211
    return 0;
211
    return 0;
212
}
212
}
213
213
214
int KDEsuClient::setPass(const char *pass, int timeout)
214
int TDEsuClient::setPass(const char *pass, int timeout)
215
{
215
{
216
    TQCString cmd = "PASS ";
216
    TQCString cmd = "PASS ";
217
    cmd += escape(pass);
217
    cmd += escape(pass);
Lines 221-227 Link Here
221
    return command(cmd);
221
    return command(cmd);
222
}
222
}
223
223
224
int KDEsuClient::exec(const TQCString &prog, const TQCString &user, const TQCString &options, const QCStringList &env)
224
int TDEsuClient::exec(const TQCString &prog, const TQCString &user, const TQCString &options, const QCStringList &env)
225
{
225
{
226
    TQCString cmd;
226
    TQCString cmd;
227
    cmd = "EXEC ";
227
    cmd = "EXEC ";
Lines 243-249 Link Here
243
    return command(cmd);
243
    return command(cmd);
244
}
244
}
245
245
246
int KDEsuClient::setHost(const TQCString &host)
246
int TDEsuClient::setHost(const TQCString &host)
247
{
247
{
248
    TQCString cmd = "HOST ";
248
    TQCString cmd = "HOST ";
249
    cmd += escape(host);
249
    cmd += escape(host);
Lines 251-271 Link Here
251
    return command(cmd);
251
    return command(cmd);
252
}
252
}
253
253
254
int KDEsuClient::setPriority(int prio)
254
int TDEsuClient::setPriority(int prio)
255
{
255
{
256
    TQCString cmd;
256
    TQCString cmd;
257
    cmd.sprintf("PRIO %d\n", prio);
257
    cmd.sprintf("PRIO %d\n", prio);
258
    return command(cmd);
258
    return command(cmd);
259
}
259
}
260
260
261
int KDEsuClient::setScheduler(int sched)
261
int TDEsuClient::setScheduler(int sched)
262
{
262
{
263
    TQCString cmd;
263
    TQCString cmd;
264
    cmd.sprintf("SCHD %d\n", sched);
264
    cmd.sprintf("SCHD %d\n", sched);
265
    return command(cmd);
265
    return command(cmd);
266
}
266
}
267
267
268
int KDEsuClient::delCommand(const TQCString &key, const TQCString &user)
268
int TDEsuClient::delCommand(const TQCString &key, const TQCString &user)
269
{
269
{
270
    TQCString cmd = "DEL ";
270
    TQCString cmd = "DEL ";
271
    cmd += escape(key);
271
    cmd += escape(key);
Lines 274-280 Link Here
274
    cmd += "\n";
274
    cmd += "\n";
275
    return command(cmd);
275
    return command(cmd);
276
}
276
}
277
int KDEsuClient::setVar(const TQCString &key, const TQCString &value, int timeout,
277
int TDEsuClient::setVar(const TQCString &key, const TQCString &value, int timeout,
278
                        const TQCString &group)
278
                        const TQCString &group)
279
{
279
{
280
    TQCString cmd = "SET ";
280
    TQCString cmd = "SET ";
Lines 289-295 Link Here
289
    return command(cmd);
289
    return command(cmd);
290
}
290
}
291
291
292
TQCString KDEsuClient::getVar(const TQCString &key)
292
TQCString TDEsuClient::getVar(const TQCString &key)
293
{
293
{
294
    TQCString cmd = "GET ";
294
    TQCString cmd = "GET ";
295
    cmd += escape(key);
295
    cmd += escape(key);
Lines 299-305 Link Here
299
    return reply;
299
    return reply;
300
}
300
}
301
301
302
TQValueList<TQCString> KDEsuClient::getKeys(const TQCString &group)
302
TQValueList<TQCString> TDEsuClient::getKeys(const TQCString &group)
303
{
303
{
304
    TQCString cmd = "GETK ";
304
    TQCString cmd = "GETK ";
305
    cmd += escape(group);
305
    cmd += escape(group);
Lines 332-338 Link Here
332
    return list;
332
    return list;
333
}
333
}
334
334
335
bool KDEsuClient::findGroup(const TQCString &group)
335
bool TDEsuClient::findGroup(const TQCString &group)
336
{
336
{
337
    TQCString cmd = "CHKG ";
337
    TQCString cmd = "CHKG ";
338
    cmd += escape(group);
338
    cmd += escape(group);
Lines 342-348 Link Here
342
    return true;
342
    return true;
343
}
343
}
344
344
345
int KDEsuClient::delVar(const TQCString &key)
345
int TDEsuClient::delVar(const TQCString &key)
346
{
346
{
347
    TQCString cmd = "DELV ";
347
    TQCString cmd = "DELV ";
348
    cmd += escape(key);
348
    cmd += escape(key);
Lines 350-356 Link Here
350
    return command(cmd);
350
    return command(cmd);
351
}
351
}
352
352
353
int KDEsuClient::delGroup(const TQCString &group)
353
int TDEsuClient::delGroup(const TQCString &group)
354
{
354
{
355
    TQCString cmd = "DELG ";
355
    TQCString cmd = "DELG ";
356
    cmd += escape(group);
356
    cmd += escape(group);
Lines 358-364 Link Here
358
    return command(cmd);
358
    return command(cmd);
359
}
359
}
360
360
361
int KDEsuClient::delVars(const TQCString &special_key)
361
int TDEsuClient::delVars(const TQCString &special_key)
362
{
362
{
363
    TQCString cmd = "DELS ";
363
    TQCString cmd = "DELS ";
364
    cmd += escape(special_key);
364
    cmd += escape(special_key);
Lines 366-377 Link Here
366
    return command(cmd);
366
    return command(cmd);
367
}
367
}
368
368
369
int KDEsuClient::ping()
369
int TDEsuClient::ping()
370
{
370
{
371
    return command("PING\n");
371
    return command("PING\n");
372
}
372
}
373
373
374
int KDEsuClient::exitCode()
374
int TDEsuClient::exitCode()
375
{
375
{
376
    TQCString result;
376
    TQCString result;
377
    if (command("EXIT\n", &result) != 0)
377
    if (command("EXIT\n", &result) != 0)
Lines 380-386 Link Here
380
    return result.toLong();
380
    return result.toLong();
381
}
381
}
382
382
383
int KDEsuClient::stopServer()
383
int TDEsuClient::stopServer()
384
{
384
{
385
    return command("STOP\n");
385
    return command("STOP\n");
386
}
386
}
Lines 398-404 Link Here
398
    return daemon;
398
    return daemon;
399
}
399
}
400
400
401
bool KDEsuClient::isServerSGID()
401
bool TDEsuClient::isServerSGID()
402
{
402
{
403
    if (d->daemon.isEmpty())
403
    if (d->daemon.isEmpty())
404
       d->daemon = findDaemon();
404
       d->daemon = findDaemon();
Lines 414-420 Link Here
414
    return (sbuf.st_mode & S_ISGID);
414
    return (sbuf.st_mode & S_ISGID);
415
}
415
}
416
416
417
int KDEsuClient::startServer()
417
int TDEsuClient::startServer()
418
{
418
{
419
    if (d->daemon.isEmpty())
419
    if (d->daemon.isEmpty())
420
       d->daemon = findDaemon();
420
       d->daemon = findDaemon();
(-)tdelibs/tdesu/client.h (-5 / +5 lines)
Lines 47-56 Link Here
47
 * See setVar, delVar, delGroup.
47
 * See setVar, delVar, delGroup.
48
 */
48
 */
49
49
50
class TDESU_EXPORT KDEsuClient {
50
class TDESU_EXPORT TDEsuClient {
51
public:
51
public:
52
    KDEsuClient();
52
    TDEsuClient();
53
    ~KDEsuClient();
53
    ~TDEsuClient();
54
54
55
    /**
55
    /**
56
     * Lets tdesud execute a command. If the daemon does not have a password
56
     * Lets tdesud execute a command. If the daemon does not have a password
Lines 198-205 Link Here
198
    int command(const TQCString &cmd, TQCString *result=0L);
198
    int command(const TQCString &cmd, TQCString *result=0L);
199
    TQCString escape(const TQCString &str);
199
    TQCString escape(const TQCString &str);
200
200
201
    class KDEsuClientPrivate;
201
    class TDEsuClientPrivate;
202
    KDEsuClientPrivate *d;
202
    TDEsuClientPrivate *d;
203
};
203
};
204
204
205
#endif //Q_OS_UNIX
205
#endif //Q_OS_UNIX
(-)tdelibs/tdesu/libtdesu.nmcheck (-1 / +1 lines)
Lines 7-10 Link Here
7
StubProcess::*
7
StubProcess::*
8
PtyProcess::*
8
PtyProcess::*
9
KCookie::*
9
KCookie::*
10
KDEsuClient::*
10
TDEsuClient::*

Return to bug 985