From owner-svn-src-head@FreeBSD.ORG Sun Nov 6 20:30:22 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EE431065670; Sun, 6 Nov 2011 20:30:22 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F363E8FC14; Sun, 6 Nov 2011 20:30:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pA6KUL8c040447; Sun, 6 Nov 2011 20:30:21 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pA6KUL73040444; Sun, 6 Nov 2011 20:30:21 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201111062030.pA6KUL73040444@svn.freebsd.org> From: Ed Schouten Date: Sun, 6 Nov 2011 20:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227269 - head/usr.bin/at X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2011 20:30:22 -0000 Author: ed Date: Sun Nov 6 20:30:21 2011 New Revision: 227269 URL: http://svn.freebsd.org/changeset/base/227269 Log: Partially revert r227233. The privs.h header is not only used by at(1), it's also used by atrun(8). Just let the code the way it used to be (for now). Reported by: kwm, tinderbox Hat to: me Modified: head/usr.bin/at/at.c head/usr.bin/at/privs.h Modified: head/usr.bin/at/at.c ============================================================================== --- head/usr.bin/at/at.c Sun Nov 6 20:29:18 2011 (r227268) +++ head/usr.bin/at/at.c Sun Nov 6 20:30:21 2011 (r227269) @@ -63,6 +63,8 @@ __FBSDID("$FreeBSD$"); #include "panic.h" #include "parsetime.h" #include "perm.h" + +#define MAIN #include "privs.h" /* Macros */ @@ -102,8 +104,6 @@ int fcreated; char atfile[] = ATJOB_DIR "12345678901234"; char atverify = 0; /* verify time instead of queuing job */ char *namep; -uid_t real_uid, effective_uid; -gid_t real_gid, effective_gid; /* Function declarations */ Modified: head/usr.bin/at/privs.h ============================================================================== --- head/usr.bin/at/privs.h Sun Nov 6 20:29:18 2011 (r227268) +++ head/usr.bin/at/privs.h Sun Nov 6 20:30:21 2011 (r227269) @@ -59,8 +59,15 @@ * to the real userid before calling any of them. */ -extern uid_t real_uid, effective_uid; -extern gid_t real_gid, effective_gid; +#ifndef MAIN +extern +#endif +uid_t real_uid, effective_uid; + +#ifndef MAIN +extern +#endif +gid_t real_gid, effective_gid; #define RELINQUISH_PRIVS { \ real_uid = getuid(); \