diff options
Diffstat (limited to 'lisp/net')
61 files changed, 368 insertions, 139 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 265a855b842..bf6afae45da 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -1,6 +1,7 @@ ;;; ange-ftp.el --- transparent FTP support for GNU Emacs -;; Copyright (C) 1989-1996, 1998, 2000-2012 Free Software Foundation, Inc. +;; Copyright (C) 1989-1996, 1998, 2000-2013 Free Software Foundation, +;; Inc. ;; Author: Andy Norman (ange@hplb.hpl.hp.com) ;; Maintainer: FSF diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index c1c83d2245e..19e513a3354 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1,6 +1,6 @@ ;;; browse-url.el --- pass a URL to a WWW browser -;; Copyright (C) 1995-2012 Free Software Foundation, Inc. +;; Copyright (C) 1995-2013 Free Software Foundation, Inc. ;; Author: Denis Howe <dbh@doc.ic.ac.uk> ;; Maintainer: FSF diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index c95e901c39d..cf2cd0f311b 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -1,6 +1,6 @@ ;;; dbus.el --- Elisp bindings for D-Bus. -;; Copyright (C) 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 2007-2013 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, hardware diff --git a/lisp/net/dig.el b/lisp/net/dig.el index 6fffce679d1..73c2d871824 100644 --- a/lisp/net/dig.el +++ b/lisp/net/dig.el @@ -1,6 +1,6 @@ ;;; dig.el --- Domain Name System dig interface -;; Copyright (C) 2000-2012 Free Software Foundation, Inc. +;; Copyright (C) 2000-2013 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Keywords: DNS BIND dig comm diff --git a/lisp/net/dns.el b/lisp/net/dns.el index b94c161da31..1c456eb8202 100644 --- a/lisp/net/dns.el +++ b/lisp/net/dns.el @@ -1,6 +1,6 @@ ;;; dns.el --- Domain Name Service lookups -;; Copyright (C) 2002-2012 Free Software Foundation, Inc. +;; Copyright (C) 2002-2013 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: network comm diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el index 17ea7f7fcd3..45f15b14a54 100644 --- a/lisp/net/eudc-bob.el +++ b/lisp/net/eudc-bob.el @@ -1,6 +1,6 @@ ;;; eudc-bob.el --- Binary Objects Support for EUDC -;; Copyright (C) 1999-2012 Free Software Foundation, Inc. +;; Copyright (C) 1999-2013 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el index beaceedd788..690a5f15c40 100644 --- a/lisp/net/eudc-export.el +++ b/lisp/net/eudc-export.el @@ -1,6 +1,6 @@ ;;; eudc-export.el --- functions to export EUDC query results -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el index a4b98f9864b..0322fa766f3 100644 --- a/lisp/net/eudc-hotlist.el +++ b/lisp/net/eudc-hotlist.el @@ -1,6 +1,6 @@ ;;; eudc-hotlist.el --- hotlist management for EUDC -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> diff --git a/lisp/net/eudc-vars.el b/lisp/net/eudc-vars.el index c6b42b2ba72..c2cc0154151 100644 --- a/lisp/net/eudc-vars.el +++ b/lisp/net/eudc-vars.el @@ -1,6 +1,6 @@ ;;; eudc-vars.el --- Emacs Unified Directory Client -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index 0e9707e57f3..621b9b90879 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -1,6 +1,6 @@ ;;; eudc.el --- Emacs Unified Directory Client -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el index 42b618815f5..58d94622486 100644 --- a/lisp/net/eudcb-bbdb.el +++ b/lisp/net/eudcb-bbdb.el @@ -1,6 +1,6 @@ ;;; eudcb-bbdb.el --- Emacs Unified Directory Client - BBDB Backend -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el index ba664e41362..23eed4b3c0a 100644 --- a/lisp/net/eudcb-ldap.el +++ b/lisp/net/eudcb-ldap.el @@ -1,6 +1,6 @@ ;;; eudcb-ldap.el --- Emacs Unified Directory Client - LDAP Backend -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> diff --git a/lisp/net/eudcb-mab.el b/lisp/net/eudcb-mab.el index 69058c7af5c..75b3382f511 100644 --- a/lisp/net/eudcb-mab.el +++ b/lisp/net/eudcb-mab.el @@ -1,6 +1,6 @@ ;;; eudcb-mab.el --- Emacs Unified Directory Client - AddressBook backend -;; Copyright (C) 2003-2012 Free Software Foundation, Inc. +;; Copyright (C) 2003-2013 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@newartisans.com> ;; Maintainer: FSF diff --git a/lisp/net/eudcb-ph.el b/lisp/net/eudcb-ph.el index 8da98e9d7ce..3033e945c24 100644 --- a/lisp/net/eudcb-ph.el +++ b/lisp/net/eudcb-ph.el @@ -1,6 +1,6 @@ ;;; eudcb-ph.el --- Emacs Unified Directory Client - CCSO PH/QI Backend -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: Pavel Janík <Pavel@Janik.cz> diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index d33480afb28..243c64ec459 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -1,6 +1,6 @@ ;;; gnutls.el --- Support SSL/TLS connections through GnuTLS -;; Copyright (C) 2010-2012 Free Software Foundation, Inc. +;; Copyright (C) 2010-2013 Free Software Foundation, Inc. ;; Author: Ted Zlatanov <tzz@lifelogs.com> ;; Keywords: comm, tls, ssl, encryption diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index f9e31788527..1005285917e 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -1,6 +1,6 @@ ;;; goto-addr.el --- click to browse URL or to send to e-mail address -;; Copyright (C) 1995, 2000-2012 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2000-2013 Free Software Foundation, Inc. ;; Author: Eric Ding <ericding@alum.mit.edu> ;; Maintainer: FSF diff --git a/lisp/net/hmac-def.el b/lisp/net/hmac-def.el index ae604767a79..bf80ce153c9 100644 --- a/lisp/net/hmac-def.el +++ b/lisp/net/hmac-def.el @@ -1,6 +1,6 @@ ;;; hmac-def.el --- A macro for defining HMAC functions. -;; Copyright (C) 1999, 2001, 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001, 2007-2013 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp> ;; Keywords: HMAC, RFC2104 diff --git a/lisp/net/hmac-md5.el b/lisp/net/hmac-md5.el index 8d33750df25..3aaa1a8ab31 100644 --- a/lisp/net/hmac-md5.el +++ b/lisp/net/hmac-md5.el @@ -1,6 +1,6 @@ ;;; hmac-md5.el --- Compute HMAC-MD5. -;; Copyright (C) 1999, 2001, 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001, 2007-2013 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp> ;; Keywords: HMAC, RFC2104, HMAC-MD5, MD5, KEYED-MD5, CRAM-MD5 diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 531f0730652..9584ceb24d0 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -1,6 +1,6 @@ ;;; imap.el --- imap library -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Keywords: mail diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 6ef713de93d..724904280ef 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -1,6 +1,6 @@ ;;; ldap.el --- client interface to LDAP for Emacs -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> ;; Maintainer: FSF diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el index f85983e6e9f..e6a5f8299ac 100644 --- a/lisp/net/mairix.el +++ b/lisp/net/mairix.el @@ -1,6 +1,6 @@ ;;; mairix.el --- Mairix interface for Emacs -;; Copyright (C) 2008-2012 Free Software Foundation, Inc. +;; Copyright (C) 2008-2013 Free Software Foundation, Inc. ;; Author: David Engster <dengste@eml.cc> ;; Keywords: mail searching @@ -222,14 +222,12 @@ Currently there are 'threads and 'flags.") ;;; RMail -;; Display function: -(autoload 'rmail "rmail") -(autoload 'rmail-summary-displayed "rmail") -(autoload 'rmail-summary "rmailsum") -(defvar rmail-buffer) +(declare-function rmail-summary-displayed "rmail" ()) +(declare-function rmail-summary "rmailsum" ()) ; autoloaded in rmail (defun mairix-rmail-display (folder) "Display mbox file FOLDER with RMail." + (require 'rmail) (let (show-summary) ;; If it exists, select existing RMail window (when (and (boundp 'rmail-buffer) @@ -249,6 +247,8 @@ Currently there are 'threads and 'flags.") (when show-summary (rmail-summary)))) +(defvar rmail-buffer) + ;; Fetching mail header field: (defun mairix-rmail-fetch-field (field) "Get mail header FIELD for current message using RMail." diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el index 7fa8bdfbf70..28fd5c67ff8 100644 --- a/lisp/net/net-utils.el +++ b/lisp/net/net-utils.el @@ -1,6 +1,6 @@ ;;; net-utils.el --- network functions -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; Author: Peter Breton <pbreton@cs.umb.edu> ;; Created: Sun Mar 16 1997 diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el index b01b8697825..b08c052eb71 100644 --- a/lisp/net/netrc.el +++ b/lisp/net/netrc.el @@ -1,5 +1,5 @@ ;;; netrc.el --- .netrc parsing functionality -;; Copyright (C) 1996-2012 Free Software Foundation, Inc. +;; Copyright (C) 1996-2013 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index 81d05eabc5a..8cf9ec67e53 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el @@ -1,6 +1,6 @@ ;;; network-stream.el --- open network processes, possibly with encryption -;; Copyright (C) 2010-2012 Free Software Foundation, Inc. +;; Copyright (C) 2010-2013 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: network diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el index bc6fd38f713..f017345e8cb 100644 --- a/lisp/net/newst-backend.el +++ b/lisp/net/newst-backend.el @@ -1,6 +1,6 @@ ;;; newst-backend.el --- Retrieval backend for newsticker. -;; Copyright (C) 2003-2012 Free Software Foundation, Inc. +;; Copyright (C) 2003-2013 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newst-backend.el diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el index 5597e0a6ddc..2eb04787bea 100644 --- a/lisp/net/newst-plainview.el +++ b/lisp/net/newst-plainview.el @@ -1,6 +1,6 @@ ;;; newst-plainview.el --- Single buffer frontend for newsticker. -;; Copyright (C) 2003-2012 Free Software Foundation, Inc. +;; Copyright (C) 2003-2013 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newst-plainview.el diff --git a/lisp/net/newst-reader.el b/lisp/net/newst-reader.el index 40da787cb19..21bb890f742 100644 --- a/lisp/net/newst-reader.el +++ b/lisp/net/newst-reader.el @@ -1,6 +1,6 @@ ;;; newst-reader.el --- Generic RSS reader functions. -;; Copyright (C) 2003-2012 Free Software Foundation, Inc. +;; Copyright (C) 2003-2013 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newst-reader.el diff --git a/lisp/net/newst-ticker.el b/lisp/net/newst-ticker.el index 4b5ac3143d3..1ff231aabfb 100644 --- a/lisp/net/newst-ticker.el +++ b/lisp/net/newst-ticker.el @@ -1,6 +1,6 @@ ;; newst-ticker.el --- mode line ticker for newsticker. -;; Copyright (C) 2003-2012 Free Software Foundation, Inc. +;; Copyright (C) 2003-2013 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newst-ticker.el diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index 0bc7d6ad6ea..d6c8f6f557d 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el @@ -1,6 +1,6 @@ ;;; newst-treeview.el --- Treeview frontend for newsticker. -;; Copyright (C) 2008-2012 Free Software Foundation, Inc. +;; Copyright (C) 2008-2013 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newst-treeview.el diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el index 91eca84ce53..bc95ad30452 100644 --- a/lisp/net/newsticker.el +++ b/lisp/net/newsticker.el @@ -1,6 +1,6 @@ ;;; newsticker.el --- A Newsticker for Emacs. -;; Copyright (C) 2003-2012 Free Software Foundation, Inc. +;; Copyright (C) 2003-2013 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Filename: newsticker.el diff --git a/lisp/net/ntlm.el b/lisp/net/ntlm.el index 9626aef558d..1a9d99e012f 100644 --- a/lisp/net/ntlm.el +++ b/lisp/net/ntlm.el @@ -1,6 +1,6 @@ ;;; ntlm.el --- NTLM (NT LanManager) authentication support -;; Copyright (C) 2001, 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2007-2013 Free Software Foundation, Inc. ;; Author: Taro Kawagishi <tarok@transpulse.org> ;; Keywords: NTLM, SASL diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index f7d41fcd97a..ce9ef55f499 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -1,6 +1,6 @@ ;;; quickurl.el --- insert a URL based on text at point in buffer -;; Copyright (C) 1999-2012 Free Software Foundation, Inc. +;; Copyright (C) 1999-2013 Free Software Foundation, Inc. ;; Author: Dave Pearson <davep@davep.org> ;; Maintainer: Dave Pearson <davep@davep.org> diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 16644b57549..086043c2b4a 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1,6 +1,6 @@ ;;; rcirc.el --- default, simple IRC client. -;; Copyright (C) 2005-2012 Free Software Foundation, Inc. +;; Copyright (C) 2005-2013 Free Software Foundation, Inc. ;; Author: Ryan Yeske <rcyeske@gmail.com> ;; Maintainers: Ryan Yeske <rcyeske@gmail.com>, diff --git a/lisp/net/rcompile.el b/lisp/net/rcompile.el index 09677a654c0..e7bfbf386f4 100644 --- a/lisp/net/rcompile.el +++ b/lisp/net/rcompile.el @@ -1,6 +1,6 @@ ;;; rcompile.el --- run a compilation on a remote machine -;; Copyright (C) 1993-1994, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1993-1994, 2001-2013 Free Software Foundation, Inc. ;; Author: Alon Albert <alon@milcse.rtsg.mot.com> ;; Maintainer: FSF diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el index cef615dc320..9ad79d694f8 100644 --- a/lisp/net/rlogin.el +++ b/lisp/net/rlogin.el @@ -1,7 +1,7 @@ ;;; rlogin.el --- remote login interface -;; Copyright (C) 1992-1995, 1997-1998, 2001-2012 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992-1995, 1997-1998, 2001-2013 Free Software +;; Foundation, Inc. ;; Author: Noah Friedman ;; Maintainer: Noah Friedman <friedman@splode.com> diff --git a/lisp/net/sasl-cram.el b/lisp/net/sasl-cram.el index dd2a0c3c505..2a132a5fcd9 100644 --- a/lisp/net/sasl-cram.el +++ b/lisp/net/sasl-cram.el @@ -1,6 +1,6 @@ ;;; sasl-cram.el --- CRAM-MD5 module for the SASL client framework -;; Copyright (C) 2000, 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2007-2013 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Kenichi OKADA <okada@opaopa.org> diff --git a/lisp/net/sasl-digest.el b/lisp/net/sasl-digest.el index 52a4a226008..6adbf444a9e 100644 --- a/lisp/net/sasl-digest.el +++ b/lisp/net/sasl-digest.el @@ -1,6 +1,6 @@ ;;; sasl-digest.el --- DIGEST-MD5 module for the SASL client framework -;; Copyright (C) 2000, 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2007-2013 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Kenichi OKADA <okada@opaopa.org> diff --git a/lisp/net/sasl-ntlm.el b/lisp/net/sasl-ntlm.el index 312941816c7..487a1d03538 100644 --- a/lisp/net/sasl-ntlm.el +++ b/lisp/net/sasl-ntlm.el @@ -1,6 +1,6 @@ ;;; sasl-ntlm.el --- NTLM (NT Lan Manager) module for the SASL client framework -;; Copyright (C) 2000, 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2007-2013 Free Software Foundation, Inc. ;; Author: Taro Kawagishi <tarok@transpulse.org> ;; Keywords: SASL, NTLM diff --git a/lisp/net/sasl.el b/lisp/net/sasl.el index 4e759a4e6b2..a5efdd620e9 100644 --- a/lisp/net/sasl.el +++ b/lisp/net/sasl.el @@ -1,6 +1,6 @@ ;;; sasl.el --- SASL client framework -;; Copyright (C) 2000, 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2007-2013 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Keywords: SASL diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index 96b74b2f8e2..9555cb41cfe 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el @@ -1,6 +1,6 @@ ;;; secrets.el --- Client interface to gnome-keyring and kwallet. -;; Copyright (C) 2010-2012 Free Software Foundation, Inc. +;; Copyright (C) 2010-2013 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm password passphrase diff --git a/lisp/net/snmp-mode.el b/lisp/net/snmp-mode.el index 217f9dc8b30..98a7ea68589 100644 --- a/lisp/net/snmp-mode.el +++ b/lisp/net/snmp-mode.el @@ -1,6 +1,6 @@ ;;; snmp-mode.el --- SNMP & SNMPv2 MIB major mode -;; Copyright (C) 1995, 1998, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1998, 2001-2013 Free Software Foundation, Inc. ;; Author: Paul D. Smith <psmith@BayNetworks.com> ;; Keywords: data diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 93ba0a7e167..6b4bc16c111 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -1,6 +1,6 @@ ;;;; soap-client.el -- Access SOAP web services from Emacs -;; Copyright (C) 2009-2012 Free Software Foundation, Inc. +;; Copyright (C) 2009-2013 Free Software Foundation, Inc. ;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com> ;; Created: December, 2009 diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el index 877ac71f4c1..874a68588c7 100644 --- a/lisp/net/soap-inspect.el +++ b/lisp/net/soap-inspect.el @@ -1,6 +1,6 @@ ;;;; soap-inspect.el -- Interactive inspector for soap WSDL structures -;; Copyright (C) 2010-2012 Free Software Foundation, Inc. +;; Copyright (C) 2010-2013 Free Software Foundation, Inc. ;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com> ;; Created: October 2010 diff --git a/lisp/net/socks.el b/lisp/net/socks.el index 306376f8af2..75b0ebe55ff 100644 --- a/lisp/net/socks.el +++ b/lisp/net/socks.el @@ -1,6 +1,7 @@ ;;; socks.el --- A Socks v5 Client for Emacs -;; Copyright (C) 1996-2000, 2002, 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 1996-2000, 2002, 2007-2013 Free Software Foundation, +;; Inc. ;; Author: William M. Perry <wmperry@gnu.org> ;; Dave Love <fx@gnu.org> diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el index 00a556813c1..e3c42f59315 100644 --- a/lisp/net/telnet.el +++ b/lisp/net/telnet.el @@ -1,7 +1,7 @@ ;;; telnet.el --- run a telnet session from within an Emacs buffer -;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2012 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2013 Free Software +;; Foundation, Inc. ;; Author: William F. Schelter ;; Maintainer: FSF diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 116c7e9d84a..7fc314ef088 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -1,6 +1,6 @@ ;;; tls.el --- TLS/SSL support via wrapper around GnuTLS -;; Copyright (C) 1996-1999, 2002-2012 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2002-2013 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Keywords: comm, tls, gnutls, ssl diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index d34980fe22e..fd8fdb51796 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -1,6 +1,6 @@ ;;; tramp-adb.el --- Functions for calling Android Debug Bridge from Tramp -;; Copyright (C) 2011-2012 Free Software Foundation, Inc. +;; Copyright (C) 2011-2013 Free Software Foundation, Inc. ;; Author: Juergen Hoetzel <juergen@archlinux.org> ;; Keywords: comm, processes @@ -46,13 +46,24 @@ (defconst tramp-adb-method "adb" "*When this method name is used, forward all calls to Android Debug Bridge.") -(defcustom tramp-adb-prompt "^\\(?:[[:alnum:]]*@[[:alnum:]]*[^#\\$]*\\)?[#\\$][[:space:]]" +(defcustom tramp-adb-prompt + "^\\(?:[[:alnum:]]*@[[:alnum:]]*[^#\\$]*\\)?[#\\$][[:space:]]" "Regexp used as prompt in almquist shell." :type 'string :version "24.4" :group 'tramp) -(defconst tramp-adb-ls-date-regexp "[[:space:]][0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9][[:space:]][0-9][0-9]:[0-9][0-9][[:space:]]") +(defconst tramp-adb-ls-date-regexp + "[[:space:]][0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9][[:space:]][0-9][0-9]:[0-9][0-9][[:space:]]") + +(defconst tramp-adb-ls-toolbox-regexp + (concat + "^[[:space:]]*\\([-[:alpha:]]+\\)" ; \1 permissions + "[[:space:]]*\\([^[:space:]]+\\)" ; \2 username + "[[:space:]]+\\([^[:space:]]+\\)" ; \3 group + "[[:space:]]+\\([[:digit:]]\\)" ; \4 size + "[[:space:]]+\\([-[:digit:]]+[[:space:]][:[:digit:]]+\\)" ; \5 date + "[[:space:]]+\\(.*\\)$")) ; \6 filename ;;;###tramp-autoload (add-to-list 'tramp-methods `(,tramp-adb-method)) @@ -80,6 +91,7 @@ (file-name-as-directory . tramp-handle-file-name-as-directory) (file-regular-p . tramp-handle-file-regular-p) (file-remote-p . tramp-handle-file-remote-p) + (file-accessible-directory-p . tramp-handle-file-accessible-directory-p) (file-directory-p . tramp-adb-handle-file-directory-p) (file-symlink-p . tramp-handle-file-symlink-p) ;; FIXME: This is too sloppy. @@ -92,6 +104,9 @@ (expand-file-name . tramp-adb-handle-expand-file-name) (find-backup-file-name . tramp-handle-find-backup-file-name) (directory-files . tramp-handle-directory-files) + (directory-files-and-attributes + . tramp-adb-handle-directory-files-and-attributes) + (file-name-all-completions . tramp-sh-handle-file-name-all-completions) (make-directory . tramp-adb-handle-make-directory) (delete-directory . tramp-adb-handle-delete-directory) (delete-file . tramp-adb-handle-delete-file) @@ -269,33 +284,102 @@ pass to the OPERATION." (unless id-format (setq id-format 'integer)) (ignore-errors (with-parsed-tramp-file-name filename nil - (with-tramp-file-property v localname (format "file-attributes-%s" id-format) + (with-tramp-file-property + v localname (format "file-attributes-%s" id-format) + (tramp-adb-barf-unless-okay + v (format "%s -d -l %s" + (tramp-adb-get-ls-command v) + (tramp-shell-quote-argument localname)) "") + (with-current-buffer (tramp-get-buffer v) + (tramp-adb-sh-fix-ls-output) + (cdar (tramp-do-parse-file-attributes-with-ls v id-format))))))) + +(defun tramp-do-parse-file-attributes-with-ls (vec &optional id-format) + "Parse `file-attributes' for Tramp files using the ls(1) command." + (with-current-buffer (tramp-get-buffer vec) + (goto-char (point-min)) + (let ((file-properties nil)) + (while (re-search-forward tramp-adb-ls-toolbox-regexp nil t) + (let* ((mod-string (match-string 1)) + (is-dir (eq ?d (aref mod-string 0))) + (is-symlink (eq ?l (aref mod-string 0))) + (uid (match-string 2)) + (gid (match-string 3)) + (size (string-to-number (match-string 4))) + (date (match-string 5)) + (name (match-string 6)) + (symlink-target + (and is-symlink + (cadr (split-string name "\\( -> \\|\n\\)"))))) + (push (list + name + (or is-dir symlink-target) + 1 ;link-count + ;; no way to handle numeric ids in Androids ash + (if (eq id-format 'integer) 0 uid) + (if (eq id-format 'integer) 0 gid) + '(0 0) ; atime + (date-to-time date) ; mtime + '(0 0) ; ctime + size + mod-string + ;; fake + t 1 + (tramp-get-device vec)) + file-properties))) + file-properties))) + +(defun tramp-adb-handle-directory-files-and-attributes + (directory &optional full match nosort id-format) + "Like `directory-files-and-attributes' for Tramp files." + (when (file-directory-p directory) + (with-parsed-tramp-file-name (expand-file-name directory) nil + (with-tramp-file-property + v localname (format "directory-files-attributes-%s-%s-%s-%s" + full match id-format nosort) (tramp-adb-barf-unless-okay - v (format "ls -d -l %s" (tramp-shell-quote-argument localname)) "") + v (format "%s -a -l %s" + (tramp-adb-get-ls-command v) + (tramp-shell-quote-argument localname)) "") (with-current-buffer (tramp-get-buffer v) (tramp-adb-sh-fix-ls-output) - (let* ((columns (split-string (buffer-string))) - (mod-string (nth 0 columns)) - (is-dir (eq ?d (aref mod-string 0))) - (is-symlink (eq ?l (aref mod-string 0))) - (symlink-target (and is-symlink (cadr (split-string (buffer-string) "\\( -> \\|\n\\)")))) - (uid (nth 1 columns)) - (gid (nth 2 columns)) - (date (format "%s %s" (nth 4 columns) (nth 5 columns))) - (size (string-to-number (nth 3 columns)))) - (list - (or is-dir symlink-target) - 1 ;link-count - ;; no way to handle numeric ids in Androids ash - (if (eq id-format 'integer) 0 uid) - (if (eq id-format 'integer) 0 gid) - '(0 0) ; atime - (date-to-time date) ; mtime - '(0 0) ; ctime - size - mod-string - ;; fake - t 1 1))))))) + (let ((result (tramp-do-parse-file-attributes-with-ls + v (or id-format 'integer)))) + (when full + (setq result + (mapcar + (lambda (x) + (cons (expand-file-name (car x) directory) (cdr x))) + result))) + (unless nosort + (setq result + (sort result (lambda (x y) (string< (car x) (car y)))))) + (delq nil + (mapcar (lambda (x) + (if (or (not match) (string-match match (car x))) + x)) + result)))))))) + +(defun tramp-adb-get-ls-command (vec) + (with-tramp-connection-property vec "ls" + (tramp-message vec 5 "Finding a suitable `ls' command") + (if (zerop (tramp-adb-command-exit-status + vec "ls --color=never -al /dev/null")) + ;; On CyanogenMod based system BusyBox is used and "ls" output + ;; coloring is enabled by default. So we try to disable it + ;; when possible. + "ls --color=never" + "ls"))) + +(defun tramp-adb-get-toolbox (vec) + "Get shell toolbox implementation: `toolbox' for orginal distributions +or `busybox' for CynagenMode based distributions" + (with-tramp-connection-property vec "toolbox" + (tramp-message vec 5 "Checking shell toolbox implementation") + (cond + ((zerop (tramp-adb-command-exit-status vec "busybox")) 'busybox) + ((zerop (tramp-adb-command-exit-status vec "toolbox")) 'toolbox) + (t 'unkown)))) (defun tramp-adb--gnu-switches-to-ash (switches) @@ -310,7 +394,8 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"." ;; FIXME: Warning about removed switches (long and non-dash). (delq nil (mapcar - (lambda (s) (and (not (string-match "\\(^--\\|^[^-]\\)" s)) s)) + (lambda (s) + (and (not (string-match "\\(^--\\|^[^-]\\)" s)) s)) switches)))))) (defun tramp-adb-handle-insert-directory @@ -325,14 +410,15 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"." (switch-t (member "-t" switches)) (switches (mapconcat 'identity (remove "-t" switches) " "))) (tramp-adb-barf-unless-okay - v (format "ls %s %s" switches name) + v (format "%s %s %s" (tramp-adb-get-ls-command v) switches name) "Cannot insert directory listing: %s" filename) (unless switch-d ;; We insert also filename/. and filename/.., because "ls" doesn't. (narrow-to-region (point) (point)) (ignore-errors (tramp-adb-barf-unless-okay - v (format "ls -d %s %s %s" + v (format "%s -d %s %s %s" + (tramp-adb-get-ls-command v) switches (concat (file-name-as-directory name) ".") (concat (file-name-as-directory name) "..")) @@ -342,11 +428,15 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"." (insert-buffer-substring (tramp-get-buffer v)))) (defun tramp-adb-sh-fix-ls-output (&optional sort-by-time) - "Androids ls command doesn't insert size column for directories: Emacs dired can't find files. Insert dummy 0 in empty size columns." + "Insert dummy 0 in empty size columns. +Androids \"ls\" command doesn't insert size column for directories: +Emacs dired can't find files." (save-excursion ;; Insert missing size. (goto-char (point-min)) - (while (search-forward-regexp "[[:space:]]\\([[:space:]][0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9][[:space:]]\\)" nil t) + (while + (search-forward-regexp + "[[:space:]]\\([[:space:]][0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9][[:space:]]\\)" nil t) (replace-match "0\\1" "\\1" nil) ;; Insert missing "/". (when (looking-at "[0-9][0-9]:[0-9][0-9][[:space:]]+$") @@ -429,7 +519,9 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"." (with-tramp-file-property v localname "file-name-all-completions" (save-match-data (tramp-adb-send-command - v (format "ls %s" (tramp-shell-quote-argument localname))) + v (format "%s %s" + (tramp-adb-get-ls-command v) + (tramp-shell-quote-argument localname))) (mapcar (lambda (f) (if (file-directory-p f) @@ -526,9 +618,9 @@ But handle the case, if the \"test\" command is not available." (defun tramp-adb-handle-copy-file (filename newname &optional ok-if-already-exists keep-date - preserve-uid-gid preserve-selinux-context) + preserve-uid-gid preserve-extended-attributes) "Like `copy-file' for Tramp files. -PRESERVE-UID-GID and PRESERVE-SELINUX-CONTEXT are completely ignored." +PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (setq filename (expand-file-name filename) newname (expand-file-name newname)) @@ -787,7 +879,7 @@ PRESERVE-UID-GID and PRESERVE-SELINUX-CONTEXT are completely ignored." (tramp-compat-funcall 'display-message-or-buffer output-buffer) (pop-to-buffer output-buffer)))))))) -;; We use BUFFER also as connection buffer during setup. Because of +;; We use BUFFER also as connection buffer during setup. Because of ;; this, its original contents must be saved, and restored once ;; connection has been setup. (defun tramp-adb-handle-start-file-process (name buffer program &rest args) @@ -961,11 +1053,24 @@ COMMAND is nil, just sends `echo $?'. Returns the exit status found." Does not do anything if a connection is already open, but re-opens the connection if a previous connection has died for some reason." (let* ((buf (tramp-get-connection-buffer vec)) - (p (get-buffer-process buf))) + (p (get-buffer-process buf)) + (devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))) (unless (and p (processp p) (memq (process-status p) '(run open))) (save-match-data (when (and p (processp p)) (delete-process p)) + (if (not devices) + (tramp-error vec 'file-error "No device connected")) + (if (and (tramp-file-name-host vec) + (not (member (tramp-file-name-host vec) devices))) + (tramp-error + vec 'file-error + "Device %s not connected" (tramp-file-name-host vec))) + (if (and (not (eq (length devices) 1)) + (not (tramp-file-name-host vec))) + (tramp-error + vec 'file-error + "Multiple Devices connected: No Host/Device specified")) (with-tramp-progress-reporter vec 3 "Opening adb shell connection" (let* ((coding-system-for-read 'utf-8-dos) ;is this correct? (process-connection-type tramp-process-connection-type) @@ -982,7 +1087,31 @@ connection if a previous connection has died for some reason." (tramp-adb-wait-for-output p) (unless (eq 'run (process-status p)) (tramp-error vec 'file-error "Terminated!")) - (set-process-query-on-exit-flag p nil))))))) + (set-process-query-on-exit-flag p nil) + + ;; Check whether the properties have been changed. If + ;; yes, this is a strong indication that we must expire all + ;; connection properties. We start again. + (tramp-message vec 5 "Checking system information") + (tramp-adb-send-command + vec "echo \\\"`getprop ro.product.model` `getprop ro.product.version` `getprop ro.build.version.release`\\\"") + (let ((old-getprop + (tramp-get-connection-property vec "getprop" nil)) + (new-getprop + (tramp-set-connection-property + vec "getprop" + (with-current-buffer (tramp-get-connection-buffer vec) + ;; Read the expression. + (goto-char (point-min)) + (read (current-buffer)))))) + (when (and (stringp old-getprop) + (not (string-equal old-getprop new-getprop))) + (tramp-cleanup vec) + (tramp-message + vec 3 + "Connection reset, because remote host changed from `%s' to `%s'" + old-getprop new-getprop) + (tramp-adb-maybe-open-connection vec))))))))) (provide 'tramp-adb) ;;; tramp-adb.el ends here diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index e4fca46ce2d..d1ef1739bf7 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -1,6 +1,6 @@ ;;; tramp-cache.el --- file information caching for Tramp -;; Copyright (C) 2000, 2005-2012 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2005-2013 Free Software Foundation, Inc. ;; Author: Daniel Pittman <daniel@inanna.danann.net> ;; Michael Albinus <michael.albinus@gmx.de> diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index abca6b3ea01..58469b22447 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -1,6 +1,6 @@ ;;; tramp-cmds.el --- Interactive commands for Tramp -;; Copyright (C) 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 2007-2013 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 3d37a0cfc39..00ef43b1a66 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -1,6 +1,6 @@ ;;; tramp-compat.el --- Tramp compatibility functions -;; Copyright (C) 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 2007-2013 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes @@ -304,16 +304,17 @@ Not actually used. Use `(format \"%o\" i)' instead?" (wrong-number-of-arguments (file-attributes filename)))))) ;; PRESERVE-UID-GID does not exist in XEmacs. -;; PRESERVE-SELINUX-CONTEXT has been introduced with Emacs 24.1. +;; PRESERVE-EXTENDED-ATTRIBUTES has been introduced with Emacs 24.1 +;; (as PRESERVE-SELINUX-CONTEXT), and renamed in Emacs 24.3. (defun tramp-compat-copy-file (filename newname &optional ok-if-already-exists keep-date - preserve-uid-gid preserve-selinux-context) + preserve-uid-gid preserve-extended-attributes) "Like `copy-file' for Tramp files (compat function)." (cond - (preserve-selinux-context + (preserve-extended-attributes (tramp-compat-funcall 'copy-file filename newname ok-if-already-exists keep-date - preserve-uid-gid preserve-selinux-context)) + preserve-uid-gid preserve-extended-attributes)) (preserve-uid-gid (tramp-compat-funcall 'copy-file filename newname ok-if-already-exists keep-date diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el index 77e36292ef9..7d266d4d172 100644 --- a/lisp/net/tramp-ftp.el +++ b/lisp/net/tramp-ftp.el @@ -1,6 +1,6 @@ ;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -;; Copyright (C) 2002-2012 Free Software Foundation, Inc. +;; Copyright (C) 2002-2013 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 1467aede2c3..7473871e564 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -1,6 +1,6 @@ ;;; tramp-gvfs.el --- Tramp access functions for GVFS daemon -;; Copyright (C) 2009-2012 Free Software Foundation, Inc. +;; Copyright (C) 2009-2013 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes @@ -384,7 +384,8 @@ Every entry is a list (NAME ADDRESS).") (dired-uncache . tramp-handle-dired-uncache) ;; `executable-find' is not official yet. performed by default handler. (expand-file-name . tramp-gvfs-handle-expand-file-name) - ;; `file-accessible-directory-p' performed by default handler. + (file-accessible-directory-p . tramp-handle-file-accessible-directory-p) + (file-acl . tramp-gvfs-handle-file-acl) (file-attributes . tramp-gvfs-handle-file-attributes) (file-directory-p . tramp-gvfs-handle-file-directory-p) (file-executable-p . tramp-gvfs-handle-file-executable-p) @@ -417,6 +418,7 @@ Every entry is a list (NAME ADDRESS).") (make-symbolic-link . ignore) (process-file . tramp-gvfs-handle-process-file) (rename-file . tramp-gvfs-handle-rename-file) + (set-file-acl . tramp-gvfs-handle-set-file-acl) (set-file-modes . tramp-gvfs-handle-set-file-modes) (set-file-selinux-context . tramp-gvfs-handle-set-file-selinux-context) (set-visited-file-modtime . tramp-gvfs-handle-set-visited-file-modtime) @@ -539,7 +541,7 @@ is no information where to trace the message.") (defun tramp-gvfs-handle-copy-file (filename newname &optional ok-if-already-exists keep-date - preserve-uid-gid preserve-selinux-context) + preserve-uid-gid preserve-extended-attributes) "Like `copy-file' for Tramp files." (with-parsed-tramp-file-name (if (tramp-tramp-file-p filename) filename newname) nil @@ -555,8 +557,8 @@ is no information where to trace the message.") (tramp-gvfs-fuse-file-name newname) newname) ok-if-already-exists keep-date preserve-uid-gid))) - (when preserve-selinux-context - (setq args (append args (list preserve-selinux-context)))) + (when preserve-extended-attributes + (setq args (append args (list preserve-extended-attributes)))) (apply 'copy-file args)) ;; Error case. Let's try it with the GVFS utilities. @@ -655,6 +657,10 @@ is no information where to trace the message.") (tramp-run-real-handler 'expand-file-name (list localname)))))) +(defun tramp-gvfs-handle-file-acl (filename) + "Like `file-acl' for Tramp files." + (tramp-compat-funcall 'file-acl (tramp-gvfs-fuse-file-name filename))) + (defun tramp-gvfs-handle-file-attributes (filename &optional id-format) "Like `file-attributes' for Tramp files." (file-attributes (tramp-gvfs-fuse-file-name filename) id-format)) @@ -781,6 +787,11 @@ is no information where to trace the message.") (tramp-flush-file-property v (file-name-directory localname)) (tramp-flush-file-property v localname)))) +(defun tramp-gvfs-handle-set-file-acl (filename acl-string) + "Like `set-file-acl' for Tramp files." + (with-tramp-gvfs-error-message filename 'set-file-acl + (tramp-gvfs-fuse-file-name filename) acl-string)) + (defun tramp-gvfs-handle-set-file-modes (filename mode) "Like `set-file-modes' for Tramp files." (with-tramp-gvfs-error-message filename 'set-file-modes diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el index 3aa25e2caa6..13f2964f938 100644 --- a/lisp/net/tramp-gw.el +++ b/lisp/net/tramp-gw.el @@ -1,6 +1,6 @@ ;;; tramp-gw.el --- Tramp utility functions for HTTP tunnels and SOCKS gateways -;; Copyright (C) 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 2007-2013 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 3008601d9ca..79f8d82b02b 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1,6 +1,6 @@ ;;; tramp-sh.el --- Tramp access functions for (s)sh-like connections -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; (copyright statements below in code to be updated with the above notice) @@ -805,7 +805,7 @@ on the remote host.") (defconst tramp-perl-encode "%s -e ' # This script contributed by Juanma Barranquero <lektu@terra.es>. -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. use strict; my %%trans = do { @@ -843,7 +843,7 @@ This string is passed to `format', so percent characters need to be doubled.") (defconst tramp-perl-decode "%s -e ' # This script contributed by Juanma Barranquero <lektu@terra.es>. -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. use strict; my %%trans = do { @@ -935,6 +935,7 @@ This is used to map a mode number to a permission string.") (file-name-nondirectory . tramp-handle-file-name-nondirectory) (file-truename . tramp-sh-handle-file-truename) (file-exists-p . tramp-sh-handle-file-exists-p) + (file-accessible-directory-p . tramp-handle-file-accessible-directory-p) (file-directory-p . tramp-sh-handle-file-directory-p) (file-executable-p . tramp-sh-handle-file-executable-p) (file-readable-p . tramp-sh-handle-file-readable-p) @@ -985,6 +986,8 @@ This is used to map a mode number to a permission string.") (verify-visited-file-modtime . tramp-sh-handle-verify-visited-file-modtime) (file-selinux-context . tramp-sh-handle-file-selinux-context) (set-file-selinux-context . tramp-sh-handle-set-file-selinux-context) + (file-acl . tramp-sh-handle-file-acl) + (set-file-acl . tramp-sh-handle-set-file-acl) (vc-registered . tramp-sh-handle-vc-registered)) "Alist of handler functions. Operations not mentioned here will be handled by the normal Emacs functions.") @@ -1449,7 +1452,8 @@ of." (defun tramp-set-file-uid-gid (filename &optional uid gid) "Set the ownership for FILENAME. If UID and GID are provided, these values are used; otherwise uid -and gid of the corresponding user is taken. Both parameters must be integers." +and gid of the corresponding user is taken. Both parameters must +be non-negative integers." ;; Modern Unices allow chown only for root. So we might need ;; another implementation, see `dired-do-chown'. OTOH, it is mostly ;; working with su(do)? when it is needed, so it shall succeed in @@ -1461,9 +1465,9 @@ and gid of the corresponding user is taken. Both parameters must be integers." (if (and (zerop (user-uid)) (tramp-local-host-p v)) ;; If we are root on the local host, we can do it directly. (tramp-set-file-uid-gid localname uid gid) - (let ((uid (or (and (integerp uid) uid) + (let ((uid (or (and (natnump uid) uid) (tramp-get-remote-uid v 'integer))) - (gid (or (and (integerp gid) gid) + (gid (or (and (natnump gid) gid) (tramp-get-remote-gid v 'integer)))) (tramp-send-command v (format @@ -1472,8 +1476,8 @@ and gid of the corresponding user is taken. Both parameters must be integers." ;; We handle also the local part, because there doesn't exist ;; `set-file-uid-gid'. On W32 "chown" might not work. - (let ((uid (or (and (integerp uid) uid) (tramp-get-local-uid 'integer))) - (gid (or (and (integerp gid) gid) (tramp-get-local-gid 'integer)))) + (let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer))) + (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer)))) (tramp-compat-call-process "chown" nil nil nil (format "%d:%d" uid gid) (tramp-shell-quote-argument filename)))))) @@ -1527,10 +1531,49 @@ and gid of the corresponding user is taken. Both parameters must be integers." (if (stringp (nth 3 context)) (format "--range=%s" (nth 3 context)) "") (tramp-shell-quote-argument localname)))) - (tramp-set-file-property v localname "file-selinux-context" context) - (tramp-set-file-property v localname "file-selinux-context" 'undef))) - ;; We always return nil. - nil) + (progn + (tramp-set-file-property v localname "file-selinux-context" context) + t) + (tramp-set-file-property v localname "file-selinux-context" 'undef) + nil))) + +(defun tramp-remote-acl-p (vec) + "Check, whether ACL is enabled on the remote host." + (with-tramp-connection-property (tramp-get-connection-process vec) "acl-p" + (tramp-send-command-and-check vec "getfacl /"))) + +(defun tramp-sh-handle-file-acl (filename) + "Like `file-acl' for Tramp files." + (with-parsed-tramp-file-name filename nil + (with-tramp-file-property v localname "file-acl" + (when (and (tramp-remote-acl-p v) + (tramp-send-command-and-check + v (format + "getfacl -acs %s 2>/dev/null" + (tramp-shell-quote-argument localname)))) + (with-current-buffer (tramp-get-connection-buffer v) + (goto-char (point-max)) + (delete-blank-lines) + (when (> (point-max) (point-min)) + (substring-no-properties (buffer-string)))))))) + +(defun tramp-sh-handle-set-file-acl (filename acl-string) + "Like `set-file-acl' for Tramp files." + (with-parsed-tramp-file-name filename nil + (when (tramp-remote-acl-p v) + (condition-case nil + (when (stringp acl-string) + (tramp-set-file-property v localname "file-acl" acl-string) + (dolist (line (split-string acl-string nil t) t) + (unless (tramp-send-command-and-check + v (format + "setfacl -m %s %s" + line (tramp-shell-quote-argument localname))) + (error nil)))) + ;; In case of errors, we return `nil'. + (error + (tramp-set-file-property v localname "file-acl" 'undef) + nil))))) ;; Simple functions using the `test' command. @@ -1883,7 +1926,7 @@ tramp-sh-handle-file-name-all-completions: internal error accessing `%s': `%s'" (defun tramp-sh-handle-copy-file (filename newname &optional ok-if-already-exists keep-date - preserve-uid-gid preserve-selinux-context) + preserve-uid-gid preserve-extended-attributes) "Like `copy-file' for Tramp files." (setq filename (expand-file-name filename)) (setq newname (expand-file-name newname)) @@ -1893,13 +1936,13 @@ tramp-sh-handle-file-name-all-completions: internal error accessing `%s': `%s'" (tramp-tramp-file-p newname)) (tramp-do-copy-or-rename-file 'copy filename newname ok-if-already-exists keep-date - preserve-uid-gid preserve-selinux-context)) + preserve-uid-gid preserve-extended-attributes)) ;; Compat section. - (preserve-selinux-context + (preserve-extended-attributes (tramp-run-real-handler 'copy-file (list filename newname ok-if-already-exists keep-date - preserve-uid-gid preserve-selinux-context))) + preserve-uid-gid preserve-extended-attributes))) (preserve-uid-gid (tramp-run-real-handler 'copy-file @@ -1962,7 +2005,7 @@ tramp-sh-handle-file-name-all-completions: internal error accessing `%s': `%s'" (defun tramp-do-copy-or-rename-file (op filename newname &optional ok-if-already-exists keep-date - preserve-uid-gid preserve-selinux-context) + preserve-uid-gid preserve-extended-attributes) "Copy or rename a remote file. OP must be `copy' or `rename' and indicates the operation to perform. FILENAME specifies the file to copy or rename, NEWNAME is the name of @@ -1971,7 +2014,7 @@ OK-IF-ALREADY-EXISTS means don't barf if NEWNAME exists already. KEEP-DATE means to make sure that NEWNAME has the same timestamp as FILENAME. PRESERVE-UID-GID, when non-nil, instructs to keep the uid and gid if both files are on the same host. -PRESERVE-SELINUX-CONTEXT activates selinux commands. +PRESERVE-EXTENDED-ATTRIBUTES activates selinux and acl commands. This function is invoked by `tramp-sh-handle-copy-file' and `tramp-sh-handle-rename-file'. It is an error if OP is neither @@ -1982,8 +2025,8 @@ file names." (let ((t1 (tramp-tramp-file-p filename)) (t2 (tramp-tramp-file-p newname)) (length (nth 7 (file-attributes (file-truename filename)))) - (context (and preserve-selinux-context - (apply 'file-selinux-context (list filename)))) + (attributes (and preserve-extended-attributes + (apply 'file-extended-attributes (list filename)))) pr tm) (with-parsed-tramp-file-name (if t1 filename newname) nil @@ -2053,8 +2096,11 @@ file names." ;; One of them must be a Tramp file. (error "Tramp implementation says this cannot happen"))) - ;; Handle `preserve-selinux-context'. - (when context (apply 'set-file-selinux-context (list newname context))) + ;; Handle `preserve-extended-attributes'. We ignore possible + ;; errors, because ACL strings could be incompatible. + (when attributes + (ignore-errors + (apply 'set-file-extended-attributes (list newname attributes)))) ;; In case of `rename', we must flush the cache of the source file. (when (and t1 (eq op 'rename)) @@ -4618,7 +4664,7 @@ raises an error." command (buffer-string)))))))) (defun tramp-convert-file-attributes (vec attr) - "Convert file-attributes ATTR generated by perl script, stat or ls. + "Convert `file-attributes' ATTR generated by perl script, stat or ls. Convert file mode bits to string and set virtual device number. Return ATTR." (when attr @@ -4626,6 +4672,17 @@ Return ATTR." (when (stringp (car attr)) (while (string-match tramp-color-escape-sequence-regexp (car attr)) (setcar attr (replace-match "" nil nil (car attr))))) + ;; Convert uid and gid. Use -1 as indication of unusable value. + (when (and (numberp (nth 2 attr)) (< (nth 2 attr) 0)) + (setcar (nthcdr 2 attr) -1)) + (when (and (floatp (nth 2 attr)) + (<= (nth 2 attr) (tramp-compat-most-positive-fixnum))) + (setcar (nthcdr 2 attr) (round (nth 2 attr)))) + (when (and (numberp (nth 3 attr)) (< (nth 3 attr) 0)) + (setcar (nthcdr 3 attr) -1)) + (when (and (floatp (nth 3 attr)) + (<= (nth 3 attr) (tramp-compat-most-positive-fixnum))) + (setcar (nthcdr 3 attr) (round (nth 3 attr)))) ;; Convert last access time. (unless (listp (nth 4 attr)) (setcar (nthcdr 4 attr) diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index d4386a5374c..0f143100906 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -1,6 +1,6 @@ ;;; tramp-smb.el --- Tramp access functions for SMB servers -;; Copyright (C) 2002-2012 Free Software Foundation, Inc. +;; Copyright (C) 2002-2013 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, processes @@ -195,6 +195,7 @@ See `tramp-actions-before-shell' for more info.") (dired-uncache . tramp-handle-dired-uncache) (expand-file-name . tramp-smb-handle-expand-file-name) (file-accessible-directory-p . tramp-smb-handle-file-directory-p) + (file-acl . tramp-smb-handle-file-acl) (file-attributes . tramp-smb-handle-file-attributes) (file-directory-p . tramp-smb-handle-file-directory-p) (file-executable-p . tramp-handle-file-exists-p) @@ -227,8 +228,9 @@ See `tramp-actions-before-shell' for more info.") (make-symbolic-link . tramp-smb-handle-make-symbolic-link) (process-file . tramp-smb-handle-process-file) (rename-file . tramp-smb-handle-rename-file) + (set-file-acl . ignore) (set-file-modes . tramp-smb-handle-set-file-modes) - ;; `set-file-selinux-context' performed by default handler. + (set-file-selinux-context . ignore) (set-file-times . ignore) (set-visited-file-modtime . ignore) (shell-command . tramp-handle-shell-command) @@ -487,10 +489,10 @@ pass to the OPERATION." (defun tramp-smb-handle-copy-file (filename newname &optional ok-if-already-exists keep-date - preserve-uid-gid preserve-selinux-context) + preserve-uid-gid preserve-extended-attributes) "Like `copy-file' for Tramp files. KEEP-DATE has no effect in case NEWNAME resides on an SMB server. -PRESERVE-UID-GID and PRESERVE-SELINUX-CONTEXT are completely ignored." +PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (setq filename (expand-file-name filename) newname (expand-file-name newname)) (with-tramp-progress-reporter @@ -639,6 +641,22 @@ PRESERVE-UID-GID and PRESERVE-SELINUX-CONTEXT are completely ignored." method user host (tramp-run-real-handler 'expand-file-name (list localname)))))) +(defun tramp-smb-handle-file-acl (filename) + "Like `file-acl' for Tramp files." + (with-parsed-tramp-file-name filename nil + (with-tramp-file-property v localname "file-acl" + (when (tramp-smb-send-command + v (format "getfacl \"%s\"" (tramp-smb-get-localname v))) + (with-current-buffer (tramp-get-connection-buffer v) + (goto-char (point-min)) + (while (looking-at-p "^#") + (forward-line) + (delete-region (point-min) (point))) + (goto-char (point-max)) + (delete-blank-lines) + (when (> (point-max) (point-min)) + (substring-no-properties (buffer-string)))))))) + (defun tramp-smb-handle-file-attributes (filename &optional id-format) "Like `file-attributes' for Tramp files." (unless id-format (setq id-format 'integer)) diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el index be612d011eb..c64d8dfa046 100644 --- a/lisp/net/tramp-uu.el +++ b/lisp/net/tramp-uu.el @@ -1,6 +1,6 @@ ;;; tramp-uu.el --- uuencode in Lisp -;; Copyright (C) 2002-2012 Free Software Foundation, Inc. +;; Copyright (C) 2002-2013 Free Software Foundation, Inc. ;; Author: Kai Großjohann <kai.grossjohann@gmx.net> ;; Keywords: comm, terminals diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index a4d36cbe72c..7c393622ffc 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1,6 +1,6 @@ ;;; tramp.el --- Transparent Remote Access, Multiple Protocol -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2013 Free Software Foundation, Inc. ;; Author: Kai Großjohann <kai.grossjohann@gmx.net> ;; Michael Albinus <michael.albinus@gmx.de> @@ -1455,6 +1455,11 @@ an input event arrives. The other arguments are passed to `tramp-error'." (or (and (bufferp buffer) buffer) (and (processp vec-or-proc) (process-buffer vec-or-proc)) (tramp-get-connection-buffer vec-or-proc))) + (when (string-equal fmt-string "Process died") + (message + "%s\n %s" + "Tramp failed to connect. If this happens repeatedly, try" + "`M-x tramp-cleanup-this-connection'")) (sit-for 30)))))) (defmacro with-parsed-tramp-file-name (filename var &rest body) @@ -1879,7 +1884,8 @@ ARGS are the arguments OPERATION has been called with." ;; Emacs 22+ only. 'set-file-times ;; Emacs 24+ only. - 'file-selinux-context 'set-file-selinux-context + 'file-acl 'file-selinux-context + 'set-file-acl 'set-file-selinux-context ;; XEmacs only. 'abbreviate-file-name 'create-file-buffer 'dired-file-modtime 'dired-make-compressed-filename @@ -2751,6 +2757,11 @@ User is always nil." (if (or dir-p (file-directory-p dir)) dir (file-name-directory dir)) nil (tramp-flush-directory-property v localname))) +(defun tramp-handle-file-accessible-directory-p (filename) + "Like `file-accessible-directory-p' for Tramp files." + (and (file-directory-p filename) + (file-executable-p filename))) + (defun tramp-handle-file-exists-p (filename) "Like `file-exists-p' for Tramp files." (not (null (file-attributes filename)))) diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 331884691f4..b346d085307 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -1,7 +1,7 @@ ;;; trampver.el --- Transparent Remote Access, Multiple Protocol ;;; lisp/trampver.el. Generated from trampver.el.in by configure. -;; Copyright (C) 2003-2012 Free Software Foundation, Inc. +;; Copyright (C) 2003-2013 Free Software Foundation, Inc. ;; Author: Kai Großjohann <kai.grossjohann@gmx.net> ;; Keywords: comm, processes diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el index d5de2f410c5..8e23a719f8b 100644 --- a/lisp/net/webjump.el +++ b/lisp/net/webjump.el @@ -1,6 +1,6 @@ ;;; webjump.el --- programmable Web hotlist -;; Copyright (C) 1996-1997, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 2001-2013 Free Software Foundation, Inc. ;; Author: Neil W. Van Dyke <nwv@acm.org> ;; Created: 09-Aug-1996 diff --git a/lisp/net/xesam.el b/lisp/net/xesam.el index 585e5eed52d..461cadd21ad 100644 --- a/lisp/net/xesam.el +++ b/lisp/net/xesam.el @@ -1,6 +1,6 @@ ;;; xesam.el --- Xesam interface to search engines. -;; Copyright (C) 2008-2012 Free Software Foundation, Inc. +;; Copyright (C) 2008-2013 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: tools, hypermedia diff --git a/lisp/net/zeroconf.el b/lisp/net/zeroconf.el index 6a1a009410b..2160443c395 100644 --- a/lisp/net/zeroconf.el +++ b/lisp/net/zeroconf.el @@ -1,6 +1,6 @@ ;;; zeroconf.el --- Service browser using Avahi. -;; Copyright (C) 2008-2012 Free Software Foundation, Inc. +;; Copyright (C) 2008-2013 Free Software Foundation, Inc. ;; Author: Michael Albinus <michael.albinus@gmx.de> ;; Keywords: comm, hardware |
