From owner-svn-src-all@FreeBSD.ORG Sat Feb 6 19:56:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8C37106566C; Sat, 6 Feb 2010 19:56:32 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C61508FC0A; Sat, 6 Feb 2010 19:56:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o16JuW5I023240; Sat, 6 Feb 2010 19:56:32 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o16JuWYg023237; Sat, 6 Feb 2010 19:56:32 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201002061956.o16JuWYg023237@svn.freebsd.org> From: Tim Kientzle Date: Sat, 6 Feb 2010 19:56:32 +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: r203560 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 19:56:32 -0000 Author: kientzle Date: Sat Feb 6 19:56:32 2010 New Revision: 203560 URL: http://svn.freebsd.org/changeset/base/203560 Log: Remove all traces of an experiment for handling "root" on Windows systems. Modified: head/usr.bin/tar/bsdtar.c head/usr.bin/tar/bsdtar_platform.h Modified: head/usr.bin/tar/bsdtar.c ============================================================================== --- head/usr.bin/tar/bsdtar.c Sat Feb 6 19:53:48 2010 (r203559) +++ head/usr.bin/tar/bsdtar.c Sat Feb 6 19:56:32 2010 (r203560) @@ -159,8 +159,10 @@ main(int argc, char **argv) /* Default: Perform basic security checks. */ bsdtar->extract_flags |= SECURITY; - /* Defaults for root user: */ - if (bsdtar_is_privileged(bsdtar)) { +#ifndef _WIN32 + /* On POSIX systems, assume --same-owner and -p when run by + * the root user. This doesn't make any sense on Windows. */ + if (bsdtar->user_uid == 0) { /* --same-owner */ bsdtar->extract_flags |= ARCHIVE_EXTRACT_OWNER; /* -p */ @@ -169,6 +171,7 @@ main(int argc, char **argv) bsdtar->extract_flags |= ARCHIVE_EXTRACT_XATTR; bsdtar->extract_flags |= ARCHIVE_EXTRACT_FFLAGS; } +#endif bsdtar->argv = argv; bsdtar->argc = argc; Modified: head/usr.bin/tar/bsdtar_platform.h ============================================================================== --- head/usr.bin/tar/bsdtar_platform.h Sat Feb 6 19:53:48 2010 (r203559) +++ head/usr.bin/tar/bsdtar_platform.h Sat Feb 6 19:56:32 2010 (r203560) @@ -164,12 +164,8 @@ #define __LA_DEAD #endif -#if defined(__CYGWIN__) -#include "bsdtar_cygwin.h" -#elif defined(_WIN32) /* && !__CYGWIN__ */ +#if defined(_WIN32) && !defined(__CYGWIN__) #include "bsdtar_windows.h" -#else -#define bsdtar_is_privileged(bsdtar) (bsdtar->user_uid == 0) #endif #endif /* !BSDTAR_PLATFORM_H_INCLUDED */