[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs server fails to start with large uid on unix

From: Benjamin Rutt
Subject: Re: emacs server fails to start with large uid on unix
Date: Mon, 8 Jan 2007 16:03:04 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Richard Stallman <rms <at> gnu.org> writes:

> Does this fix it?

Yes, it fixes part of the problem.  But the next bug is revealed when I use 
your fix:

address@hidden emacs]$ \rm -fr /tmp/emacs800154870/
address@hidden emacs]$ cat fixsrvbug.el
(defvar server-socket-dir
  (let ((uid (user-uid)))
    (if (floatp uid)
        (format "/tmp/emacs%1.0f" uid)
      (format "/tmp/emacs%d" uid))))
(require 'server)
(server-ensure-safe-dir server-socket-dir)
address@hidden emacs]$ emacs -f toggle-debug-on-error -q -l fixsrvbug.el

[... produces this stacktrace: ]

Debugger entered--Lisp error: (error "The directory /tmp/emacs800154870 is 
  signal(error ("The directory /tmp/emacs800154870 is unsafe"))
  error("The directory %s is unsafe" "/tmp/emacs800154870")
  eval-buffer(#<buffer  *load*> nil "/home/ruttbe/emacs/fixsrvbug.el" nil 
t)  ; Reading at buffer position 203
("/home/ruttbe/emacs/fixsrvbug.el" "/home/ruttbe/emacs/fixsrvbug.el" nil t)
  load("/home/ruttbe/emacs/fixsrvbug.el" nil t)
  command-line-1(("-f" "toggle-debug-on-error" "-l" "fixsrvbug.el"))

address@hidden emacs]$ ls -al /tmp/emacs800154870/
total 64
drwx------   2 ruttbe   www          117 Jan  8 10:55 ./
drwxrwxrwt  39 root     sys        20552 Jan  8 10:55 ../

I think that it's due to some problem in `file-attributes' based on stepping 
through previously with edebug but I cannot use edebug now via C-u C-M-x on 
`server-ensure-safe-dir' in server.el.gz for some reason (I get error edebug-
syntax-error: Invalid read syntax: "Expected lambda expression") and at the 
same time the cursor is put at the following place:

      (letf (((default-file-modes) ?\700)) (make-directory dir t))

Any help is appreciated.  Thanks. --BR

reply via email to

[Prev in Thread] Current Thread [Next in Thread]