Remove all traces of an experiment for handling "root" on Windows systems.

This commit is contained in:
Tim Kientzle 2010-02-06 19:56:32 +00:00
parent 2be336325b
commit 82fb15c15a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=203560
2 changed files with 6 additions and 7 deletions

View File

@ -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;

View File

@ -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 */