From owner-freebsd-ports Sat Aug 31 10:22:10 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 990B937B400 for ; Sat, 31 Aug 2002 10:22:08 -0700 (PDT) Received: from Mail.Math.Princeton.EDU (mail.math.Princeton.EDU [128.112.18.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA45643E42 for ; Sat, 31 Aug 2002 10:22:07 -0700 (PDT) (envelope-from stalker@Math.Princeton.EDU) Received: from math.Princeton.EDU (math.Princeton.EDU [128.112.18.16]) by Mail.Math.Princeton.EDU (8.11.6/8.11.6) with ESMTP id g7VHM7n25388 for ; Sat, 31 Aug 2002 13:22:07 -0400 Received: from math.Princeton.EDU (stalker@localhost) by math.Princeton.EDU (8.11.6/8.11.6) with ESMTP id g7VHM6x06757 for ; Sat, 31 Aug 2002 13:22:07 -0400 Message-Id: <200208311722.g7VHM6x06757@math.Princeton.EDU> To: ports@FreeBSD.org Subject: wdm in a networked environment considered harmful Date: Sat, 31 Aug 2002 13:22:06 -0400 From: John Stalker Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, wdm works fine on a single machine, but it has one great drawback when managing a remote display. If the user selects "Halt" or "Reboot" it will halt or reboot the machine running wdm, not the machine running the Xserver. Worse yet, there doesn't seem to be any easy fix by modifying wdm-config because the DisplayManager*wdmHalt and DisplayManager*wdmReboot resources are commands which run in a shell with the DISPLAY variable unset. On my home LAN I fixed this by hacking Greet.c and resource.c to call a shell script--or, more generally, anything which can be execve'ed--with two arguments: whether halt or reboot was selected and the display name. I then wrote a shell script to determine the hostname from the display and halt or reboot, using ssh to run sudo halt or sudo reboot on a special account on the X server. This is probably not the most elegant solution, but I am willing contribute the code if noone has a better idea. In any case the current default is quite counter-intuitive for users, who normally expect the halt or reboot will halt or reboot the computer sitting in front of them, and could be considered a security hazard. -- John Stalker Department of Mathematics Princeton University (609)258-6469 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message