NetBSD Problem Report #28998
From jukka@bart.stasoft.ch Tue Jan 18 12:05:23 2005
Return-Path: <jukka@bart.stasoft.ch>
Received: from smtp.tiscali.ch (smtp.tiscali.ch [212.40.5.52])
by narn.netbsd.org (Postfix) with ESMTP id 1BA2463B845
for <gnats-bugs@gnats.NetBSD.org>; Tue, 18 Jan 2005 12:05:22 +0000 (UTC)
Message-Id: <20050118120515.237ED58B0@bart.stasoft.ch>
Date: Tue, 18 Jan 2005 13:05:15 +0100 (CET)
From: jukka@salmi.ch
Reply-To: jukka@salmi.ch
To: gnats-bugs@netbsd.org
Subject: security/sudo: sudoedit not working for non-root users
X-Send-Pr-Version: 3.95
>Number: 28998
>Category: pkg
>Synopsis: security/sudo: sudoedit not working for non-root users
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kim
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 18 12:06:00 +0000 2005
>Closed-Date: Sun Jan 30 21:53:40 +0000 2005
>Last-Modified: Sun Jan 30 21:53:40 +0000 2005
>Originator: jukka@salmi.ch
>Release: NetBSD 2.0
>Organization:
>Environment:
System: NetBSD bart.stasoft.ch 2.0 NetBSD 2.0 (GENERIC) #0: Mon Nov 29 17:05:06 CET 2004 build@bart.stasoft.ch:/build/nbsd/i386/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
sudoedit (or 'sudo -e') is not working properly: the temporary file created
by sudoedit is owned by root and has mode 0600; it should be owned by the
user invoking sudoedit.
>How-To-Repeat:
$ id
uid=1001(jukka) gid=1001(jukka) groups=1001(jukka),0(wheel),5(operator)
$ sudoedit file
+=+=+=+=+=+=+=+
Error: /var/tmp/file.024736aa: Permission denied.
/var/tmp/file.024736aa: unmodified, readonly: line 1
Press any key to continue:
:!ls -l /var/tmp/file.024736aa
-rw------- 1 root wheel 0 Jan 1 1970 /var/tmp/file.024736aa
Press any key to continue [: to enter more ex commands]:
:q
>Fix:
As a workaround, I removed the --disable-setreuid configure option from
pkgsrc/security/sudo/Makefile and rebuilt; this made sudoedit work as
expected.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->kim
Responsible-Changed-By: reed@netbsd.org
Responsible-Changed-When: Tue, 18 Jan 2005 17:19:05 +0000
Responsible-Changed-Why:
Assigned to package maintainer.
State-Changed-From-To: open->closed
State-Changed-By: kim@netbsd.org
State-Changed-When: Sun, 30 Jan 2005 21:53:40 +0000
State-Changed-Why:
Fixed as suggested, in sudo-1.6.8pl5nb1.
Maybe the commit message will get appended here one day...
Thanks for the PR, Jukka!
Regards,
+ Kim
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.