tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp (2.0.51); sudo method changes permissions


From: Michael Albinus
Subject: Re: tramp (2.0.51); sudo method changes permissions
Date: Sat, 12 Nov 2005 22:29:56 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

"Otto Maddox" <address@hidden> writes:

> I have repeated it (on a different machine, but the effect is the
> same).  The requested buffers are attached.  Hope it helps.

The appended patch towards Tramp 2.0.51 should solve the problem.

Best regards, Michael.

Index: tramp.el
===================================================================
RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v
retrieving revision 2.359.2.53
diff -u -c -r2.359.2.53 tramp.el
*** tramp.el    5 Oct 2005 21:21:20 -0000       2.359.2.53
--- tramp.el    12 Nov 2005 21:21:27 -0000
***************
*** 1596,1603 ****
  };
  $uid = ($ARGV[1] eq \"integer\") ? $stat[4] : \"\\\"\" . getpwuid($stat[4]) . 
\"\\\"\";
  $gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" . getgrgid($stat[5]) . 
\"\\\"\";
  printf(
!     \"(%s %u %s %s (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) -1)\\n\",
      $type,
      $stat[3],
      $uid,
--- 1596,1612 ----
  };
  $uid = ($ARGV[1] eq \"integer\") ? $stat[4] : \"\\\"\" . getpwuid($stat[4]) . 
\"\\\"\";
  $gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" . getgrgid($stat[5]) . 
\"\\\"\";
+ $mygid = ($ARGV[1] eq \"integer\") ? getgrnam($ENV{GROUP}) : \"\\\"\" . 
$ENV{GROUP} . \"\\\"\";
+ if ($ARGV[1] eq \"integer\")
+ {
+     $diff = ($gid == $mygid) ? \"nil\" : \"t\";
+ }
+ else
+ {
+     $diff = ($gid eq $mygid) ? \"nil\" : \"t\";
+ }
  printf(
!     \"(%s %u %s %s (%u %u) (%u %u) (%u %u) %u %u %s (%u . %u) -1)\\n\",
      $type,
      $stat[3],
      $uid,
***************
*** 1610,1615 ****
--- 1619,1625 ----
      $stat[10] & 0xffff,
      $stat[7],
      $stat[2],
+     $diff,
      $stat[1] >> 16 & 0xffff,
      $stat[1] & 0xffff
  );"

reply via email to

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