[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/ksysguard/ksysguardd [POSSIBLY UNSAFE]
From: Tobias Koenig <tokoe () kde ! org>
Date: 2003-03-06 13:08:12
[Download RAW message or body]
CVS commit by tokoe:
Applyed patch from Simon Hausmann <hausmann@kde.org>, that fixes bug #52189
M +11 -4 ksysguardd.c 1.12 [POSSIBLY UNSAFE: printf]
--- kdebase/ksysguard/ksysguardd/ksysguardd.c #1.11:1.12
@@ -58,4 +58,5 @@ static int ServerSocket;
static ClientInfo ClientList[ MAX_CLIENTS ];
static int SocketPort = -1;
+static unsigned char BindToAllInterfaces = 0;
static int CurrentSocket;
static const char *LockFile = "/var/run/ksysguardd.pid";
@@ -92,5 +93,5 @@ static int processArguments( int argc, c
opterr = 0;
- while ( ( option = getopt( argc, argv, "-p:f:dh" ) ) != EOF ) {
+ while ( ( option = getopt( argc, argv, "-p:f:dih" ) ) != EOF ) {
switch ( tolower( option ) ) {
case 'p':
@@ -103,8 +104,11 @@ static int processArguments( int argc, c
RunAsDaemon = 1;
break;
+ case 'i':
+ BindToAllInterfaces = 1;
+ break;
case '?':
case 'h':
default:
- fprintf(stderr, "Usage: %s [-d] [-p port]\n", argv[ 0 ] );
+ fprintf(stderr, "Usage: %s [-d] [-i] [-p port]\n", argv[ 0 ] );
return -1;
break;
@@ -327,5 +331,8 @@ int createServerSocket()
memset( &s_in, 0, sizeof( struct sockaddr_in ) );
s_in.sin_family = AF_INET;
+ if ( BindToAllInterfaces )
s_in.sin_addr.s_addr = htonl( INADDR_ANY );
+ else
+ s_in.sin_addr.s_addr = htonl( INADDR_LOOPBACK );
s_in.sin_port = htons( SocketPort );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic