Don't define this any longer, we now use the port the daemon is listening
1998-11-11 Martin Baulig <martin@home-of-linux.org> * include/glibtop/gnuserv.h (MCOOKIE_SCREEN): Don't define this any longer, we now use the port the daemon is listening on instead of a fixed screen.
This commit is contained in:
committed by
Martin Baulig
parent
d59234afc2
commit
a637c8b406
@@ -1,3 +1,9 @@
|
|||||||
|
1998-11-11 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* include/glibtop/gnuserv.h (MCOOKIE_SCREEN): Don't define this
|
||||||
|
any longer, we now use the port the daemon is listening on instead
|
||||||
|
of a fixed screen.
|
||||||
|
|
||||||
1998-11-11 Martin Baulig <martin@home-of-linux.org>
|
1998-11-11 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* configure.in (--enable-debug): Define LIBGTOP_ENABLE_DEBUG
|
* configure.in (--enable-debug): Define LIBGTOP_ENABLE_DEBUG
|
||||||
|
@@ -75,7 +75,9 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a
|
|||||||
* stuff related to supporting MIT-MAGIC-COOKIE-1
|
* stuff related to supporting MIT-MAGIC-COOKIE-1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0
|
||||||
#define MCOOKIE_SCREEN "42980" /* screen # to use as the gnuserv cookie */
|
#define MCOOKIE_SCREEN "42980" /* screen # to use as the gnuserv cookie */
|
||||||
|
#endif
|
||||||
#define MCOOKIE_NAME "MAGIC-1" /* authentication protocol name */
|
#define MCOOKIE_NAME "MAGIC-1" /* authentication protocol name */
|
||||||
#define MCOOKIE_X_NAME "MIT-MAGIC-COOKIE-1" /* as needed by X */
|
#define MCOOKIE_X_NAME "MIT-MAGIC-COOKIE-1" /* as needed by X */
|
||||||
|
|
||||||
|
@@ -216,7 +216,7 @@ permitted (u_long host_addr, int fd)
|
|||||||
static int
|
static int
|
||||||
setup_table (void)
|
setup_table (void)
|
||||||
{
|
{
|
||||||
char hostname [HOSTNAMSZ];
|
char hostname [HOSTNAMSZ], screen [BUFSIZ];
|
||||||
long host_addr;
|
long host_addr;
|
||||||
int i, hosts = 0;
|
int i, hosts = 0;
|
||||||
|
|
||||||
@@ -231,10 +231,12 @@ setup_table (void)
|
|||||||
|
|
||||||
#ifdef AUTH_MAGIC_COOKIE
|
#ifdef AUTH_MAGIC_COOKIE
|
||||||
|
|
||||||
|
sprintf (screen, "%d", SERVER_PORT);
|
||||||
|
|
||||||
server_xauth = XauGetAuthByAddr
|
server_xauth = XauGetAuthByAddr
|
||||||
(FamilyInternet,
|
(FamilyInternet,
|
||||||
sizeof (host_addr), (char *) &host_addr,
|
sizeof (host_addr), (char *) &host_addr,
|
||||||
strlen (MCOOKIE_SCREEN), MCOOKIE_SCREEN,
|
strlen (screen), screen,
|
||||||
strlen (MCOOKIE_X_NAME), MCOOKIE_X_NAME);
|
strlen (MCOOKIE_X_NAME), MCOOKIE_X_NAME);
|
||||||
hosts++;
|
hosts++;
|
||||||
|
|
||||||
|
@@ -274,11 +274,13 @@ connect_to_internet_server (const char *serverhost, u_short port)
|
|||||||
|
|
||||||
/* send credentials using MIT-MAGIC-COOKIE-1 protocol */
|
/* send credentials using MIT-MAGIC-COOKIE-1 protocol */
|
||||||
|
|
||||||
|
sprintf (buf, "%d", port);
|
||||||
|
|
||||||
server_xauth =
|
server_xauth =
|
||||||
XauGetAuthByAddr (FamilyInternet,
|
XauGetAuthByAddr (FamilyInternet,
|
||||||
sizeof (peeraddr_in.sin_addr.s_addr),
|
sizeof (peeraddr_in.sin_addr.s_addr),
|
||||||
(char *) &peeraddr_in.sin_addr.s_addr,
|
(char *) &peeraddr_in.sin_addr.s_addr,
|
||||||
strlen (MCOOKIE_SCREEN), MCOOKIE_SCREEN,
|
strlen (buf), buf,
|
||||||
strlen (MCOOKIE_X_NAME), MCOOKIE_X_NAME);
|
strlen (MCOOKIE_X_NAME), MCOOKIE_X_NAME);
|
||||||
|
|
||||||
if (server_xauth && server_xauth->data) {
|
if (server_xauth && server_xauth->data) {
|
||||||
|
Reference in New Issue
Block a user