emacs-devel
[Top][All Lists]
Advanced

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

File locking and emacs_readlinkat


From: Eli Zaretskii
Subject: File locking and emacs_readlinkat
Date: Mon, 25 Feb 2013 19:57:52 +0200

On Posix platforms, we use emacs_readlinkat in filelock.c to read
information about a locked file.  That information is encoded as the
name of the target of the symlink, and it has the following format:

    address@hidden:BOOT-TIME

However, emacs_readlinkat has a special feature up its sleeve intended
to support symlinks to remote files:

  val = build_string (buf);
  if (buf[0] == '/' && strchr (buf, ':'))
    val = concat2 (build_string ("/:"), val);

But since in the case of filelock.c, the target of the symlink is not
a file name at all, couldn't this magic cause surprising effects for
unusual USER names?  Can a user name on a Posix system begin with a
slash?



reply via email to

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