From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.bugs Subject: bug#20999: 24.4; Inconsistent UID vs USER resolution between emacsclient and emacs daemon Date: Wed, 08 Jul 2015 20:03:20 +0200 Message-ID: <85si8yed71.fsf@iznogoud.viz> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1436378845 13380 80.91.229.3 (8 Jul 2015 18:07:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jul 2015 18:07:25 +0000 (UTC) Cc: 20999@debbugs.gnu.org To: Mike Alexander Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 08 20:07:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZCtkW-0008Hx-Tw for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jul 2015 20:07:13 +0200 Original-Received: from localhost ([::1]:36252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCtkV-0006NS-Us for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jul 2015 14:07:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCtkS-0006N9-31 for bug-gnu-emacs@gnu.org; Wed, 08 Jul 2015 14:07:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCtkM-0007Wl-RT for bug-gnu-emacs@gnu.org; Wed, 08 Jul 2015 14:07:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCtkM-0007We-NE for bug-gnu-emacs@gnu.org; Wed, 08 Jul 2015 14:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZCtkL-0004RM-V5 for bug-gnu-emacs@gnu.org; Wed, 08 Jul 2015 14:07:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Wolfgang Jenkner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jul 2015 18:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20999 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20999-submit@debbugs.gnu.org id=B20999.143637881317053 (code B ref 20999); Wed, 08 Jul 2015 18:07:01 +0000 Original-Received: (at 20999) by debbugs.gnu.org; 8 Jul 2015 18:06:53 +0000 Original-Received: from localhost ([127.0.0.1]:44468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCtkC-0004Qz-Um for submit@debbugs.gnu.org; Wed, 08 Jul 2015 14:06:53 -0400 Original-Received: from b2bfep13.mx.upcmail.net ([62.179.121.58]:35391) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCtk9-0004Qk-TQ for 20999@debbugs.gnu.org; Wed, 08 Jul 2015 14:06:50 -0400 Original-Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep13.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150708180642.EVLI2939.b2bfep13-int.chello.at@edge11.upcmail.net> for <20999@debbugs.gnu.org>; Wed, 8 Jul 2015 20:06:42 +0200 Original-Received: from iznogoud.viz ([91.119.108.4]) by edge11.upcmail.net with edge id pu6i1q00H05jbv70Bu6ieT; Wed, 08 Jul 2015 20:06:42 +0200 X-SourceIP: 91.119.108.4 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZCtk2-00015N-3B; Wed, 08 Jul 2015 20:06:42 +0200 User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (berkeley-unix) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104834 Archived-At: On Tue, Jul 07 2015, Mike Alexander wrote: > I get a > connection refused from the command "emacsclient -c -s $EMACS_DAEMON_NAME" > after starting and confirming the daemon is running via the command "emacs > --daemon=$EMACS_DAEMON_NAME". Since connect() is a syscall you could run emacsclient under strace to easily find out with which arguments it is called. In my case (using truss under FreeBSD) I see the following syscalls leading up to the connect() call socket(PF_LOCAL,SOCK_STREAM,0) = 3 (0x3) geteuid() = 1002 (0x3ea) mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34380709888 (0x801400000) stat("/tmp/emacs1002/foobar",{ mode=srwx------ ,inode=23,size=0,blksize=4096 }) = 0 (0x0) geteuid() = 1002 (0x3ea) madvise(0x801406000,0x1000,0x5,0xaaaaaaaaaaaaaaab,0x801400030,0x800de29e0) = 0 (0x0) connect(3,{ AF_UNIX "/tmp/emacs1002/foobar" },23) = 0 (0x0)