From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#1540: emacsclient -t fails under su Date: Thu, 11 Dec 2008 13:19:58 -0800 (PST) Message-ID: <200812112119.mBBLJwj7001473@mothra.ics.uci.edu> References: Reply-To: Dan Nicolaescu , 1540@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229033041 9018 80.91.229.12 (11 Dec 2008 22:04:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2008 22:04:01 +0000 (UTC) Cc: 1540@emacsbugs.donarmstrong.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 11 23:05:02 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LAteH-0002XD-1D for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Dec 2008 23:04:45 +0100 Original-Received: from localhost ([127.0.0.1]:35431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAtd5-0003cN-Q3 for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Dec 2008 17:03:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAtKZ-0006UV-2F for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 16:44:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAtKX-0006Td-0i for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 16:44:21 -0500 Original-Received: from [199.232.76.173] (port=58270 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAtKW-0006TX-LJ for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 16:44:20 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:60254) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LAtKW-0004kC-2E for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 16:44:20 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBBLiI9G031085; Thu, 11 Dec 2008 13:44:18 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBBLP43X024619; Thu, 11 Dec 2008 13:25:04 -0800 X-Loop: don@donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 11 Dec 2008 21:25:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1540 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1540-submit@emacsbugs.donarmstrong.com id=B1540.122903041723469 (code B ref 1540); Thu, 11 Dec 2008 21:25:04 +0000 X-Spam-Bayes: score:0.0000 Tokens: new, 18; hammy, 104; neutral, 50; spammy, 2. spammytokens:0.987-1--analyzed, 0.863-+--here hammytokens:0.000-+--emacs, 0.000-+--Emacs, 0.000-+--H*i:message, 0.000-+--H*i:2008, 0.000-+--HX-Debbugs-No-Ack:yes Original-Received: (at 1540) by emacsbugs.donarmstrong.com; 11 Dec 2008 21:20:17 +0000 Original-Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBBLKEKS023435 for <1540@emacsbugs.donarmstrong.com>; Thu, 11 Dec 2008 13:20:15 -0800 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mBBLJw6E022050; Thu, 11 Dec 2008 13:19:58 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mBBLJwj7001473; Thu, 11 Dec 2008 13:19:58 -0800 (PST) In-Reply-To: (Glenn Morris's message of "Thu, 11 Dec 2008 15:13:58 -0500") Original-Lines: 32 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mBBLJw6E022050 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Thu, 11 Dec 2008 16:44:21 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:23207 Archived-At: Glenn Morris writes: > I'm logged into an X session as user1. > From the xterm associated with /dev/pts/12, I do: > > user1> su - user2 > user2> emacs -Q -nw > > That works fine. Then I exit that Emacs and do: I analyzed this about a year ago, but forgot about it :-( > user2> emacs -Q -f server-start & # works fine > user2> emacsclient -c # works fine > user2> emacsclient -t > *ERROR*: Could not open file: /dev/pts/12 > > (and indeed user2 does not have permissions for this file) One problem is here: when this happens the terminal data structure is half created, so not complete, because of that when accessing the second time... > user2> emacsclient -t > > This second attempt kills Emacs with a segfault. ... we get a crash here. Not sure what to do. The quick way out would be for emacsclient to check if the tty is writable, and refuse to try to connect in case it is not. But is that TRTD?