From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Alexander Newsgroups: gmane.emacs.bugs Subject: bug#20999: 24.4; Inconsistent UID vs USER resolution between emacsclient and emacs daemon Date: Tue, 07 Jul 2015 20:00:19 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11414af451c4eb051a4e79c5 X-Trace: ger.gmane.org 1436370679 1552 80.91.229.3 (8 Jul 2015 15:51:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jul 2015 15:51:19 +0000 (UTC) Bcc: rgm@gnu.org To: 20999@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 08 17:51:10 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 1ZCrcs-0000Ts-Ct for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jul 2015 17:51:10 +0200 Original-Received: from localhost ([::1]:35711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCrcr-0001hk-VE for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jul 2015 11:51:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCrco-0001hd-40 for bug-gnu-emacs@gnu.org; Wed, 08 Jul 2015 11:51:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCrck-0004Gb-Mq for bug-gnu-emacs@gnu.org; Wed, 08 Jul 2015 11:51:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCrck-0004GX-IV for bug-gnu-emacs@gnu.org; Wed, 08 Jul 2015 11:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZCrck-0007v1-9e for bug-gnu-emacs@gnu.org; Wed, 08 Jul 2015 11:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mike Alexander Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jul 2015 15:51:02 +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: moreinfo Original-Received: via spool by 20999-submit@debbugs.gnu.org id=B20999.143637062530391 (code B ref 20999); Wed, 08 Jul 2015 15:51:02 +0000 Original-Received: (at 20999) by debbugs.gnu.org; 8 Jul 2015 15:50:25 +0000 Original-Received: from localhost ([127.0.0.1]:44438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCrc7-0007u4-Ui for submit@debbugs.gnu.org; Wed, 08 Jul 2015 11:50:24 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47123) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCrc5-0007to-9v for 20999@debbugs.gnu.org; Wed, 08 Jul 2015 11:50:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCrbx-0003gz-R9 for 20999@debbugs.gnu.org; Wed, 08 Jul 2015 11:50:15 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCrbx-0003gf-O9 for 20999@debbugs.gnu.org; Wed, 08 Jul 2015 11:50:13 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZCrbx-0000nE-Ck for 20999@debbugs.gnu.org; Wed, 08 Jul 2015 11:50:13 -0400 Resent-Message-ID: <21917.18100.843610.379138@gnu.org> Resent-Date: Wed, 8 Jul 2015 11:50:12 -0400 Resent-From: Glenn Morris Resent-To: 20999@debbugs.gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=95pqKlHiWOX1QM/HZ16c7beK+t4fIQCooVitoE52Ofo=; b=mHwM5GlB1reQjw/nbnrmWOOgC/lklHWaHiEv+XEL+0eLuQl2f2/5qjfchYDchnhn21 01vOIFI4VkhTvpimoEHcxpSq4Kl7XQ7bsdob89S0UsT0uTdRwvBRhcIBV3Lrs6L9sNgG rbhPN+wGMrNMmfnkRxBtm4xcLltw10pMOttPww+o9jwkqXf9TouL60Jrhq+yrvJVWQmX 6cRbNtnQ0IsaDRdt+IbhyP43+fgcOhpG8zLryAnngbdpIIFceqzW/64pAvF0vZF540Si sTHTHJJJ/bJnUYdXyQaVtrIZfkBfTtg70MxuIn3jOT7TcIQtfeGqgXSXVuiHP9QEmfwK sBgg== X-Received: by 10.107.166.203 with SMTP id p194mr10159892ioe.30.1436299228724; Tue, 07 Jul 2015 13:00:28 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Bogosity: no, spamicity=0.040391, v1.2.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:104833 Archived-At: --001a11414af451c4eb051a4e79c5 Content-Type: text/plain; charset=UTF-8 emacs --version gives 24.4.2, while emacsclient --version gives 24.4. Furthermore, both are the version installed automatically with the make install target after building from source (using the config script). I guess I don't _know_ it's using my username instead of UID, but 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". To be safe, I replaced the environment variable with the direct text and saw the exact same issue. A " sudo netstat -xaupen | grep emac" shows the correct socket (using the UID) for the server, but the client still refuses the connection. I saw a hit on a blog talking about a similar problem and needing to specify the fullly pathed socket name to the client so I tried that and found it worked. Maybe it's not really a username versus UID issue, but the construction method between the two is clearly different somehow. Incidentally I'm working on a corporate server that integrates with a company wide user base, so I do have a huge UID. In my case the username is mtalexander and the UID is 1073796907. -Mike On Tue, Jul 7, 2015, 08:48 Glenn Morris wrote: > Mike Alexander wrote: > > > Starting the emacs daemon with "emacs --daemon=$EMACS_DAEMON_NAME", where > > the $EMACS_DAEMON_NAME matches the standard letter, number, underscore > > requrements, ends up using > > my UID in the socket creation since my username is longer than 8 > > characters ("/tmp/emacs$(id -u)/$EMACS_DAEMON_NAME"). > > I've never seen this use anything BUT the UID, no matter how long your > username is. That's what it has always used for me, with a two character > username, and emacsclient works fine. > > Nevertheless, I tried with a username with more than 8 chars, and that > too worked fine. > > > However, running "emacsclient -c -s $EMACS_DAEMON_NAME" fails with a > > refused connection because it attempts to connect using my username > > instead of the UID and fails to find the socket > > ("/tmp/emacs$USER/$EMACS_DAEMON_NAME"). > > How did you conclude that it was trying to use your username? > > I don't suppose you have a huge UID? > > Are you sure your version of emacsclient matches your version of emacs? > --001a11414af451c4eb051a4e79c5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

emacs --version gives 24.4.2, while emacsclient --version gi= ves 24.4. Furthermore, both are the version installed automatically with th= e make install target after building from source (using the config script).=

I guess I don't _know_ it's using my username instea= d of UID, but 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=3D$EMACS_DAEMON_NAME".= =C2=A0 To be safe, I replaced the environment variable with the direct text= and saw the exact same issue. A " sudo netstat -xaupen | grep emac&qu= ot; shows the correct socket (using the UID) for the server, but the client= still refuses the connection. I saw a hit on a blog talking about a simila= r problem and needing to specify the fullly pathed socket name to the clien= t so I tried that and found it worked. Maybe it's not really a username= versus UID issue, but the construction method between the two is clearly d= ifferent somehow.=C2=A0

Incidentally I'm working on a corporate server that inte= grates with a company wide user base, so I do have a huge UID. In my case t= he username is mtalexander and the UID is 1073796907.

-Mike


On Tue, Jul 7, 2015, 08:48= =C2=A0Glenn Morris <rgm@gnu.org> w= rote:
Mike Alexander wrote:

> Starting the emacs daemon with "emacs --daemon=3D$EMACS_DAEMON_NA= ME", where
> the $EMACS_DAEMON_NAME matches the standard letter, number, underscore=
> requrements, ends up using
> my UID in the socket creation since my username is longer than 8
> characters ("/tmp/emacs$(id -u)/$EMACS_DAEMON_NAME").

I've never seen this use anything BUT the UID, no matter how long your<= br> username is. That's what it has always used for me, with a two characte= r
username, and emacsclient works fine.

Nevertheless, I tried with a username with more than 8 chars, and that
too worked fine.

> However, running "emacsclient -c -s $EMACS_DAEMON_NAME" fail= s with a
> refused connection because it attempts to connect using my username > instead of the UID and fails to find the socket
> ("/tmp/emacs$USER/$EMACS_DAEMON_NAME").

How did you conclude that it was trying to use your username?

I don't suppose you have a huge UID?

Are you sure your version of emacsclient matches your version of emacs?
--001a11414af451c4eb051a4e79c5--