all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Tramp brocken selinux support: can't safe file.
@ 2010-04-22 10:52 Sascha Wilde
  2010-04-22 11:32 ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Sascha Wilde @ 2010-04-22 10:52 UTC (permalink / raw)
  To: emacs-devel; +Cc: Michael Albinus

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

Hi,

in the current trunk I can't safe remote files in tramp.  It errors out
with a miss matching number of arguments for a copy-file operation.  The
following quick and dirty hot fix makes it work for me again, but I'm
110% positive that it is incomplete and most likely totally wrong:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: tramp-selinux-quick-and-dirty-hotfix-20100422.patch --]
[-- Type: text/x-patch, Size: 834 bytes --]

diff -r c580edae3c4c lisp/net/tramp.el
--- a/lisp/net/tramp.el	Thu Apr 22 08:25:46 2010 +0000
+++ b/lisp/net/tramp.el	Thu Apr 22 12:39:14 2010 +0200
@@ -3437,7 +3437,7 @@
 	 (buffer-name))))))
 
 (defun tramp-handle-copy-file
-  (filename newname &optional ok-if-already-exists keep-date preserve-uid-gid)
+  (filename newname &optional ok-if-already-exists keep-date preserve-uid-gid preserve-selinux-context)
   "Like `copy-file' for Tramp files."
   ;; Check if both files are local -- invoke normal copy-file.
   ;; Otherwise, use Tramp from local system.
@@ -5338,6 +5338,7 @@
 		  'unhandled-file-name-directory 'vc-registered
 		  ;; Emacs 22+ only.
 		  'set-file-times
+		  'set-file-selinux-context
 		  ;; XEmacs only.
 		  'abbreviate-file-name 'create-file-buffer
 		  'dired-file-modtime 'dired-make-compressed-filename

[-- Attachment #3: Type: text/plain, Size: 354 bytes --]


I use (setq backup-by-copying t) -- not sure if its related.

cheers
sascha
-- 
Parents strongly cautioned  --  this  posting  is  intended for mature
audiences  over  18.  It  may  contain some material that many parents
would not find suitable for children and may include intense violence,
sexual situations, coarse language and suggestive dialogue.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tramp brocken selinux support: can't safe file.
  2010-04-22 10:52 Tramp brocken selinux support: can't safe file Sascha Wilde
@ 2010-04-22 11:32 ` Michael Albinus
  2010-04-22 16:06   ` Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2010-04-22 11:32 UTC (permalink / raw)
  To: Sascha Wilde; +Cc: emacs-devel

Sascha Wilde <wilde@sha-bang.de> writes:

> Hi,

Hi,

> in the current trunk I can't safe remote files in tramp.  It errors out
> with a miss matching number of arguments for a copy-file operation.  The
> following quick and dirty hot fix makes it work for me again, but I'm
> 110% positive that it is incomplete and most likely totally wrong:

I've seen it also, and I have committed a similar patch an hour
ago. Unfortunately, the change in `copy-file' was done silently (at
least I haven't seen an announcement emacs-devel).

The corresponding handlers in Tramp I will implement later on. However,
I believe, that the changed parameter list of `copy-file' as well as the
new primitives `file-selinux-context' and `set-file-selinux-context'
shall be documented in doc/lispref. Who will care?

Other file name handlers might be affected as well.

> cheers
> sascha

Best regards, Michael.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tramp brocken selinux support: can't safe file.
  2010-04-22 11:32 ` Michael Albinus
@ 2010-04-22 16:06   ` Glenn Morris
  2010-04-22 19:00     ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2010-04-22 16:06 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Sascha Wilde, emacs-devel

Michael Albinus wrote:

> I've seen it also, and I have committed a similar patch an hour
> ago. Unfortunately, the change in `copy-file' was done silently (at
> least I haven't seen an announcement emacs-devel).

Sorry, my bad. SELinux discussion is at following link. No-one
commented at all, despite my repeated appeals; but I should have
pointed out the Tramp piece to you personally.

http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00081.html

> The corresponding handlers in Tramp I will implement later on. However,
> I believe, that the changed parameter list of `copy-file' as well as the
> new primitives `file-selinux-context' and `set-file-selinux-context'
> shall be documented in doc/lispref.

Sure. That's why they are in the NEWS file with no markup, as is
standard practice.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tramp brocken selinux support: can't safe file.
  2010-04-22 16:06   ` Glenn Morris
@ 2010-04-22 19:00     ` Michael Albinus
  2010-04-23  5:43       ` Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2010-04-22 19:00 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Sascha Wilde, emacs-devel

Glenn Morris <rgm@gnu.org> writes:

>> I've seen it also, and I have committed a similar patch an hour
>> ago. Unfortunately, the change in `copy-file' was done silently (at
>> least I haven't seen an announcement emacs-devel).
>
> Sorry, my bad. SELinux discussion is at following link. No-one
> commented at all, despite my repeated appeals; but I should have
> pointed out the Tramp piece to you personally.

No problem. I was trapped the default way: "something is wrong" :-)

>> The corresponding handlers in Tramp I will implement later on. However,
>> I believe, that the changed parameter list of `copy-file' as well as the
>> new primitives `file-selinux-context' and `set-file-selinux-context'
>> shall be documented in doc/lispref.
>
> Sure. That's why they are in the NEWS file with no markup, as is
> standard practice.

Maybe it is also worth to mention the new parameter of `copy-file' in NEWS?

Best regards, Michael.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tramp brocken selinux support: can't safe file.
  2010-04-22 19:00     ` Michael Albinus
@ 2010-04-23  5:43       ` Glenn Morris
  0 siblings, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2010-04-23  5:43 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Sascha Wilde, emacs-devel

Michael Albinus wrote:

> Maybe it is also worth to mention the new parameter of `copy-file' in NEWS?

Thanks; added.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-04-23  5:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22 10:52 Tramp brocken selinux support: can't safe file Sascha Wilde
2010-04-22 11:32 ` Michael Albinus
2010-04-22 16:06   ` Glenn Morris
2010-04-22 19:00     ` Michael Albinus
2010-04-23  5:43       ` Glenn Morris

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.