all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mike Alexander <mikealexander1860@gmail.com>
To: 20999@debbugs.gnu.org
Subject: bug#20999: 24.4; Inconsistent UID vs USER resolution between emacsclient and emacs daemon
Date: Tue, 07 Jul 2015 20:00:19 +0000	[thread overview]
Message-ID: <CADS_YnysOvP3Snkq8W=Xyrx4QMXVxNTXW+yJv30xxvDJ-WJevw@mail.gmail.com> (raw)
In-Reply-To: <m81tgkt1dz.fsf@fencepost.gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2294 bytes --]

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 <rgm@gnu.org> 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?
>

[-- Attachment #2: Type: text/html, Size: 2793 bytes --]

  reply	other threads:[~2015-07-07 20:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07  1:57 bug#20999: 24.4; Inconsistent UID vs USER resolution between emacsclient and emacs daemon Mike Alexander
2015-07-07 15:48 ` Glenn Morris
2015-07-07 20:00   ` Mike Alexander [this message]
2015-07-08 18:03     ` Wolfgang Jenkner
2015-07-09 15:35       ` Glenn Morris
2016-12-07 19:01         ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADS_YnysOvP3Snkq8W=Xyrx4QMXVxNTXW+yJv30xxvDJ-WJevw@mail.gmail.com' \
    --to=mikealexander1860@gmail.com \
    --cc=20999@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.