From owner-freebsd-security Tue Sep 4 9:18:16 2001 Delivered-To: freebsd-security@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 792B337B401 for ; Tue, 4 Sep 2001 09:18:07 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f84GI1j12709 for security@FreeBSD.org; Tue, 4 Sep 2001 19:18:01 +0300 (EEST) (envelope-from ru) Date: Tue, 4 Sep 2001 19:18:01 +0300 From: Ruslan Ermilov To: security@FreeBSD.org Subject: Re: at(1) sugid fixes Message-ID: <20010904191801.F1669@sunbay.com> References: <20010903143510.D49997@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010903143510.D49997@sunbay.com>; from ru@FreeBSD.org on Mon, Sep 03, 2001 at 02:35:10PM +0300 Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This patch has just been committed. On Mon, Sep 03, 2001 at 02:35:10PM +0300, Ruslan Ermilov wrote: > Hi! > > The attached patch fixes at(1) macros that manipulate user > and group IDs of the proccess so that they don't change the > real user and group IDs of the process, and instead use the > saved user and group IDs feature. > > The setre[ug]id() calls are still used with the REDUCE_PERM > macro (with the r[ug]id arguments of -1) so that the call > changes the saved user/group ID of the process to that > specified. > > That is to say, if the process was initially run ``setuid > root'', the call to ``REDUCE_PERM(1, ...)'' changes the > process's saved-user-ID to that of the user "daemon", and > the process then becomes ``setuid daemon'' (with effective > privileges temporarily relinquished to the real privileges). > > Also, the panic() and perr() functions had insufficient > privileges to delete the problematic file under /var/at. > > Comments/reviews are welcome. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message