From nobody@FreeBSD.ORG Fri Jun 30 14:56:12 2000 Return-Path: Received: by hub.freebsd.org (Postfix, from userid 32767) id 6FBF337B50B; Fri, 30 Jun 2000 14:56:12 -0700 (PDT) Message-Id: <20000630215612.6FBF337B50B@hub.freebsd.org> Date: Fri, 30 Jun 2000 14:56:12 -0700 (PDT) From: gerti-freebsd@bitart.com Sender: nobody@FreeBSD.ORG To: freebsd-gnats-submit@FreeBSD.org Subject: ee silently overwrites write-protected files X-Send-Pr-Version: www-1.0 >Number: 19611 >Category: bin >Synopsis: ee silently overwrites write-protected files >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jun 30 15:00:00 PDT 2000 >Closed-Date: Mon Jul 3 02:46:39 PDT 2000 >Last-Modified: Tue Jul 4 01:00:00 PDT 2000 >Originator: Gerd Knops >Release: 4.0 stable >Organization: BITart Consulting >Environment: FreeBSD zeus.interfaxx.com 4.0-STABLE FreeBSD 4.0-STABLE #0: Sun Jun 25 08:38:26 CDT 2000 gerti@newcentral.interfaxx.com:/usr/obj/usr/src/sys/CENTRAL i386 >Description: ee run under root silently overwrites write-protected files. >How-To-Repeat: Obvious. >Fix: >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: sheldonh State-Changed-When: Mon Jul 3 02:46:39 PDT 2000 State-Changed-Why: Deferred to author. http://www.freebsd.org/cgi/query-pr.cgi?pr=19611 From: Sheldon Hearn To: gerti-freebsd@bitart.com Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: bin/19611: ee silently overwrites write-protected files Date: Mon, 03 Jul 2000 11:46:27 +0200 On Fri, 30 Jun 2000 14:56:12 MST, gerti-freebsd@bitart.com wrote: > >Description: > ee run under root silently overwrites write-protected files. It would be possible to introduce an extra check for file permissions when ee is run under root, but this would introduce an artificial limit. At the moment, the software expects anyone running as root to be clueful enough to realize that root pays no heed to file permissions. The alternative which you suggests introduces a new frustration -- the "root" user has to bail out of ee to change the access permissions of the file and then restart ee. This would be quite annoying. It _would_ be possible to pop a dialogue up when root is about to save to a file which is read-only. If you feel that this is something you want to work on, I'd suggest that you first chat to the author, High Mahon about whether he wants the software to behave like this, before working on a patch. I think it would be a bad idea for our ee to differ in its interface from the standard ee, which new users often rely on. Ciao, Sheldon. From: Sheldon Hearn To: gerti@BITart.com Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: bin/19611: ee silently overwrites write-protected files Date: Tue, 04 Jul 2000 09:53:49 +0200 On Mon, 03 Jul 2000 17:04:36 EST, Gerd Knops wrote: > Agreed. Actually the current ee behavior seems consistent with other > tools when used as root. I still think a warning would be in order for > any tool writing to a file without write permision, but reality is > different. At least one other person agrees with you that a warning is in order, since vi(1) gives a warning. So if you want to take this further, try to get hold of ee(1)'s author and see if he's happy with the idea. You can post his feedback as a follow-up to your own PR by making sure that you use this subject line and send a message to freebsd-gnats-submit@FreeBSD.org: Subject: Re: bin/19611: ee silently overwrites write-protected files Ciao, Sheldon. >Unformatted: