Date: 13 Oct 2004 15:04:15 -0300 From: Renato Botelho <renato@galle.com.br> To: FreeBSD-gnats-submit@FreeBSD.org Cc: s_bschmi@ira.uka.de Subject: ports/72652: [PATCH] editors/jed: Fix a bug - lost setuid and setgid bits when save file Message-ID: <20041013180415.86106.qmail@srv1.galle.com.br> Resent-Message-ID: <200410131810.i9DIAGBK042111@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 72652 >Category: ports >Synopsis: [PATCH] editors/jed: Fix a bug - lost setuid and setgid bits when save file >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Oct 13 18:10:16 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Renato Botelho >Release: FreeBSD 5.2.1-RELEASE-p8 i386 >Organization: Galle Folheados >Environment: System: FreeBSD srv1.galle.com.br 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #27: Wed May 26 10:21:14 BRT 2004 >Description: When you save a file itīs loosing setuid and setgid bit Added file(s): - files/patch-file - files/patch-unix Port maintainer (s_bschmi@ira.uka.de) is cc'd. Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: touch x chmod 4755 x ls -l x The permissions will be -rwsr-xr-x jed x Change & save the file ls -l x The permissions will be -rwxr-xr-x >Fix: --- jed-0.99.16.patch begins here --- diff -ruN --exclude=CVS /var/jail/data/usr/ports/editors/jed.orig/files/patch-file /var/jail/data/usr/ports/editors/jed/files/patch-file --- /var/jail/data/usr/ports/editors/jed.orig/files/patch-file Wed Dec 31 21:00:00 1969 +++ /var/jail/data/usr/ports/editors/jed/files/patch-file Wed Oct 13 14:53:32 2004 @@ -0,0 +1,20 @@ +--- src/file.c.orig Wed Oct 13 14:52:57 2004 ++++ src/file.c Wed Oct 13 14:53:07 2004 +@@ -173,7 +173,7 @@ + case FAB$C_STMLF: rfm = "stmlf"; break; + case FAB$C_STMCR: rfm = "stmcr"; break; + } +- mode = s.st_mode & 0777; ++ mode = s.st_mode & 07777; + } + else strcpy (rat_buf, "rat=cr"); + +@@ -1729,7 +1729,7 @@ + #ifdef REAL_UNIX_SYSTEM + int u; + +- u = umask (mask & 0777); ++ u = umask (mask & 07777); + if (default_umask == 0) default_umask = u; + #endif + } diff -ruN --exclude=CVS /var/jail/data/usr/ports/editors/jed.orig/files/patch-unix /var/jail/data/usr/ports/editors/jed/files/patch-unix --- /var/jail/data/usr/ports/editors/jed.orig/files/patch-unix Wed Dec 31 21:00:00 1969 +++ /var/jail/data/usr/ports/editors/jed/files/patch-unix Wed Oct 13 14:53:42 2004 @@ -0,0 +1,11 @@ +--- src/unix.c.orig Wed Oct 13 14:52:19 2004 ++++ src/unix.c Wed Oct 13 14:52:32 2004 +@@ -722,7 +722,7 @@ + # endif + #endif + +- *mode = m & 0777; ++ *mode = m & 07777; + + if (S_ISDIR(m)) return (2); + return(1); --- jed-0.99.16.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041013180415.86106.qmail>