comparison lisp/server.el @ 90737:95d0cdf160ea

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 586-614) - Update from CVS - Update from erc--emacs--22 - Merge from gnus--rel--5.10 - Merge from erc--main--0 - Make byte compiler correctly write circular constants * gnus--rel--5.10 (patch 186-196) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-162
author Miles Bader <miles@gnu.org>
date Fri, 26 Jan 2007 06:16:11 +0000
parents f1d13e615070 54c43f5d4c8b
children f83d17e1ace6
comparison
equal deleted inserted replaced
90736:ef1369583937 90737:95d0cdf160ea
1 ;;; server.el --- Lisp code for GNU Emacs running as server process 1 ;;; server.el --- Lisp code for GNU Emacs running as server process
2 2
3 ;; Copyright (C) 1986, 1987, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 3 ;; Copyright (C) 1986, 1987, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
4 ;; 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 4 ;; 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5 5
6 ;; Author: William Sommerfeld <wesommer@athena.mit.edu> 6 ;; Author: William Sommerfeld <wesommer@athena.mit.edu>
7 ;; Maintainer: FSF 7 ;; Maintainer: FSF
8 ;; Keywords: processes 8 ;; Keywords: processes
9 9
296 (let ((attrs (file-attributes dir))) 296 (let ((attrs (file-attributes dir)))
297 (unless attrs 297 (unless attrs
298 (letf (((default-file-modes) ?\700)) (make-directory dir t)) 298 (letf (((default-file-modes) ?\700)) (make-directory dir t))
299 (setq attrs (file-attributes dir))) 299 (setq attrs (file-attributes dir)))
300 ;; Check that it's safe for use. 300 ;; Check that it's safe for use.
301 (unless (and (eq t (car attrs)) (eq (nth 2 attrs) (user-uid)) 301 (unless (and (eq t (car attrs)) (eql (nth 2 attrs) (user-uid))
302 (or (eq system-type 'windows-nt) 302 (or (eq system-type 'windows-nt)
303 (zerop (logand ?\077 (file-modes dir))))) 303 (zerop (logand ?\077 (file-modes dir)))))
304 (error "The directory %s is unsafe" dir)))) 304 (error "The directory %s is unsafe" dir))))
305 305
306 ;;;###autoload 306 ;;;###autoload